A global network endpoint group contains endpoints that reside outside of Google Cloud. Currently a global network endpoint group can only support a single endpoint.
Recreating a global network endpoint group that's in use by another resource will give a
resourceInUseByAnotherResource
error. Use lifecycle.create_before_destroy
to avoid this type of error.
To get more information about GlobalNetworkEndpointGroup, see:
resource "google_compute_global_network_endpoint_group" "neg" {
name = "my-lb-neg"
default_port = "90"
network_endpoint_type = "INTERNET_FQDN_PORT"
}
resource "google_compute_global_network_endpoint_group" "neg" {
name = "my-lb-neg"
network_endpoint_type = "INTERNET_IP_PORT"
default_port = 90
}
The following arguments are supported:
name
-
(Required)
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.
network_endpoint_type
-
(Required)
Type of network endpoints in this network endpoint group.
Possible values are: INTERNET_IP_PORT
, INTERNET_FQDN_PORT
.
description
-
(Optional)
An optional description of this resource. Provide this property when
you create the resource.
default_port
-
(Optional)
The default port used if the port number is not specified in the
network endpoint.
project
- (Optional) The ID of the project in which the resource belongs.
If it is not provided, the provider project is used.
In addition to the arguments listed above, the following computed attributes are exported:
id
- an identifier for the resource with format projects/{{project}}/global/networkEndpointGroups/{{name}}
self_link
- The URI of the created resource.This resource provides the following Timeouts configuration options:
create
- Default is 20 minutes.delete
- Default is 20 minutes.GlobalNetworkEndpointGroup can be imported using any of these accepted formats:
projects/{{project}}/global/networkEndpointGroups/{{name}}
{{project}}/{{name}}
{{name}}
In Terraform v1.5.0 and later, use an import
block to import GlobalNetworkEndpointGroup using one of the formats above. For example:
import {
id = "projects/{{project}}/global/networkEndpointGroups/{{name}}"
to = google_compute_global_network_endpoint_group.default
}
When using the terraform import
command, GlobalNetworkEndpointGroup can be imported using one of the formats above. For example:
$ terraform import google_compute_global_network_endpoint_group.default projects/{{project}}/global/networkEndpointGroups/{{name}}
$ terraform import google_compute_global_network_endpoint_group.default {{project}}/{{name}}
$ terraform import google_compute_global_network_endpoint_group.default {{name}}
This resource supports User Project Overrides.