Skip to main content

google_compute_vpn_gateway resource

Use the google_compute_vpn_gateway InSpec audit resource to to test a Google Cloud VpnGateway resource.

Examples

describe google_compute_vpn_gateway(project: 'chef-gcp-inspec', region: ' value_region', vpnGateway: ' ') do
	it { should exist }
	its('kind') { should cmp 'value_kind' }
	its('id') { should cmp 'value_id' }
	its('creation_timestamp') { should cmp 'value_creationtimestamp' }
	its('name') { should cmp 'value_name' }
	its('description') { should cmp 'value_description' }
	its('region') { should cmp 'value_region' }
	its('network') { should cmp 'value_network' }
	its('self_link') { should cmp 'value_selflink' }
	its('label_fingerprint') { should cmp 'value_labelfingerprint' }
	its('stack_type') { should cmp 'value_stacktype' }

end

describe google_compute_vpn_gateway(project: 'chef-gcp-inspec', region: ' value_region', vpnGateway: ' ') do
	it { should_not exist }
end

Properties

Properties that can be accessed from the google_compute_vpn_gateway resource:

  • kind: [Output Only] Type of resource. Always compute#vpnGateway for VPN gateways.

  • id: [Output Only] The unique identifier for the resource. This identifier is defined by the server.

  • creation_timestamp: [Output Only] Creation timestamp in RFC3339 text format.

  • name: Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.

  • description: An optional description of this resource. Provide this property when you create the resource.

  • region: [Output Only] URL of the region where the VPN gateway resides.

  • network: URL of the network to which this VPN gateway is attached. Provided by the client when the VPN gateway is created.

  • self_link: [Output Only] Server-defined URL for the resource.

  • labels: Labels for this resource. These can only be added or modified by the setLabels method. Each label key/value pair must comply with RFC1035. Label values may be empty.

    • additional_properties:
  • label_fingerprint: A fingerprint for the labels being applied to this VpnGateway, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve a VpnGateway.

  • vpn_interfaces: The list of VPN interfaces associated with this VPN gateway.

    • id: [Output Only] Numeric identifier for this VPN interface associated with the VPN gateway.

    • ip_address: [Output Only] IP address for this VPN interface associated with the VPN gateway. The IP address could be either a regional external IP address or a regional internal IP address. The two IP addresses for a VPN gateway must be all regional external or regional internal IP addresses. There cannot be a mix of regional external IP addresses and regional internal IP addresses. For HA VPN over Cloud Interconnect, the IP addresses for both interfaces could either be regional internal IP addresses or regional external IP addresses. For regular (non HA VPN over Cloud Interconnect) HA VPN tunnels, the IP address must be a regional external IP address.

    • interconnect_attachment: URL of the VLAN attachment (interconnectAttachment) resource for this VPN gateway interface. When the value of this field is present, the VPN gateway is used for HA VPN over Cloud Interconnect; all egress or ingress traffic for this VPN gateway interface goes through the specified VLAN attachment resource.

  • stack_type: The stack type for this VPN gateway to identify the IP protocols that are enabled. Possible values are: IPV4_ONLY, IPV4_IPV6. If not specified, IPV4_ONLY will be used. Possible values:

    • IPV4_IPV6
    • IPV4_ONLY

GCP permissions

Ensure the Compute Engine API is enabled for the current project.

Thank you for your feedback!

×