Terraform - GCP - Get 'gateway_id' from google_compute_ha_vpn_gateway

I’m looking for a way to get the ‘gateway’ ID of a gateway, in terraform from GCP.

The gateway ID is a integer that appears to be created as part of creating a VPN Gateway, and shows up in the monitoring metrics as a field you can filter for your monitoring.
As we have multiple VPN gateways, I want to setup a separate monitoring policy for each one (due to differences in the number of tunnels they should have, etc)

Image of gateway_id shown in metric explorer

I’ve looked at the outputs from google_compute_ha_vpn_gateway however I appear to be missing this, or it’s simply not exposed in this way?

I note it is shown for classic VPN Gateways, exposed as gateway_id but this appears to be missing for the HA VPN gateways.

I note this isn’t the ID in the VPN interfaces field, which is just the numbering of the interface, i.e. 0,1,2,3.

Hi @djsmiley2k

google_compute_ha_vpn_gateway resource Id is a string as per the documentation mentioned API link and for google_compute_vpn_gateway resource id also it is the same string API link