| --- |
| # ---------------------------------------------------------------------------- |
| # |
| # *** AUTO GENERATED CODE *** Type: MMv1 *** |
| # |
| # ---------------------------------------------------------------------------- |
| # |
| # This file is automatically generated by Magic Modules and manual |
| # changes will be clobbered when the file is regenerated. |
| # |
| # Please read more about how to change this file in |
| # .github/CONTRIBUTING.md. |
| # |
| # ---------------------------------------------------------------------------- |
| subcategory: "Compute Engine" |
| description: |- |
| A Region network endpoint represents a IP address/FQDN and port combination that is |
| part of a specific network endpoint group (NEG). |
| --- |
| |
| # google\_compute\_region\_network\_endpoint |
| |
| A Region network endpoint represents a IP address/FQDN and port combination that is |
| part of a specific network endpoint group (NEG). |
| |
| ~> **NOTE**: Network endpoints cannot be created outside of a network endpoint group. |
| |
| |
| To get more information about RegionNetworkEndpoint, see: |
| |
| * [API documentation](https://cloud.google.com/compute/docs/reference/rest/beta/regionNetworkEndpointGroups) |
| * How-to Guides |
| * [Official Documentation](https://cloud.google.com/load-balancing/docs/negs/) |
| * [Internet NEGs Official Documentation](https://cloud.google.com/load-balancing/docs/negs/internet-neg-concepts) |
| |
| <div class = "oics-button" style="float: right; margin: 0 0 -15px"> |
| <a href="https://console.cloud.google.com/cloudshell/open?cloudshell_git_repo=https%3A%2F%2Fgithub.com%2Fterraform-google-modules%2Fdocs-examples.git&cloudshell_working_dir=region_network_endpoint_internet_ip_port&cloudshell_image=gcr.io%2Fcloudshell-images%2Fcloudshell%3Alatest&open_in_editor=main.tf&cloudshell_print=.%2Fmotd&cloudshell_tutorial=.%2Ftutorial.md" target="_blank"> |
| <img alt="Open in Cloud Shell" src="//gstatic.com/cloudssh/images/open-btn.svg" style="max-height: 44px; margin: 32px auto; max-width: 100%;"> |
| </a> |
| </div> |
| ## Example Usage - Region Network Endpoint Internet Ip Port |
| |
| |
| ```hcl |
| resource "google_compute_region_network_endpoint" "region-internet-ip-port-endpoint" { |
| region_network_endpoint_group = google_compute_region_network_endpoint_group.group.name |
| region = "us-central1" |
| |
| ip_address = "8.8.8.8" |
| port = 443 |
| } |
| |
| |
| resource "google_compute_region_network_endpoint_group" "group" { |
| name = "ip-port-neg" |
| network = google_compute_network.default.id |
| |
| region = "us-central1" |
| network_endpoint_type = "INTERNET_IP_PORT" |
| } |
| |
| resource "google_compute_network" "default" { |
| name = "network" |
| auto_create_subnetworks = false |
| } |
| ``` |
| <div class = "oics-button" style="float: right; margin: 0 0 -15px"> |
| <a href="https://console.cloud.google.com/cloudshell/open?cloudshell_git_repo=https%3A%2F%2Fgithub.com%2Fterraform-google-modules%2Fdocs-examples.git&cloudshell_working_dir=region_network_endpoint_internet_fqdn_port&cloudshell_image=gcr.io%2Fcloudshell-images%2Fcloudshell%3Alatest&open_in_editor=main.tf&cloudshell_print=.%2Fmotd&cloudshell_tutorial=.%2Ftutorial.md" target="_blank"> |
| <img alt="Open in Cloud Shell" src="//gstatic.com/cloudssh/images/open-btn.svg" style="max-height: 44px; margin: 32px auto; max-width: 100%;"> |
| </a> |
| </div> |
| ## Example Usage - Region Network Endpoint Internet Fqdn Port |
| |
| |
| ```hcl |
| resource "google_compute_region_network_endpoint" "region-internet-fqdn-port-endpoint" { |
| region_network_endpoint_group = google_compute_region_network_endpoint_group.group.name |
| region = "us-central1" |
| |
| fqdn = "backend.example.com" |
| port = 443 |
| } |
| |
| |
| resource "google_compute_region_network_endpoint_group" "group" { |
| name = "fqdn-port-neg" |
| network = google_compute_network.default.id |
| |
| region = "us-central1" |
| network_endpoint_type = "INTERNET_FQDN_PORT" |
| } |
| |
| resource "google_compute_network" "default" { |
| name = "network" |
| auto_create_subnetworks = false |
| } |
| ``` |
| |
| ## Argument Reference |
| |
| The following arguments are supported: |
| |
| |
| * `port` - |
| (Required) |
| Port number of network endpoint. |
| |
| * `region_network_endpoint_group` - |
| (Required) |
| The network endpoint group this endpoint is part of. |
| |
| |
| - - - |
| |
| |
| * `ip_address` - |
| (Optional) |
| IPv4 address external endpoint. |
| This can only be specified when network_endpoint_type of the NEG is INTERNET_IP_PORT. |
| |
| * `fqdn` - |
| (Optional) |
| Fully qualified domain name of network endpoint. |
| This can only be specified when network_endpoint_type of the NEG is INTERNET_FQDN_PORT. |
| |
| * `region` - |
| (Optional) |
| Region where the containing network endpoint group is located. |
| |
| * `project` - (Optional) The ID of the project in which the resource belongs. |
| If it is not provided, the provider project is used. |
| |
| |
| ## Attributes Reference |
| |
| In addition to the arguments listed above, the following computed attributes are exported: |
| |
| * `id` - an identifier for the resource with format `{{project}}/{{region}}/{{region_network_endpoint_group}}/{{ip_address}}/{{fqdn}}/{{port}}` |
| |
| |
| ## Timeouts |
| |
| This resource provides the following |
| [Timeouts](https://developer.hashicorp.com/terraform/plugin/sdkv2/resources/retries-and-customizable-timeouts) configuration options: |
| |
| - `create` - Default is 20 minutes. |
| - `delete` - Default is 20 minutes. |
| |
| ## Import |
| |
| |
| RegionNetworkEndpoint can be imported using any of these accepted formats: |
| |
| * `projects/{{project}}/regions/{{region}}/networkEndpointGroups/{{region_network_endpoint_group}}/{{ip_address}}/{{fqdn}}/{{port}}` |
| * `{{project}}/{{region}}/{{region_network_endpoint_group}}/{{ip_address}}/{{fqdn}}/{{port}}` |
| * `{{region}}/{{region_network_endpoint_group}}/{{ip_address}}/{{fqdn}}/{{port}}` |
| * `{{region_network_endpoint_group}}/{{ip_address}}/{{fqdn}}/{{port}}` |
| |
| |
| In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import RegionNetworkEndpoint using one of the formats above. For example: |
| |
| ```tf |
| import { |
| id = "projects/{{project}}/regions/{{region}}/networkEndpointGroups/{{region_network_endpoint_group}}/{{ip_address}}/{{fqdn}}/{{port}}" |
| to = google_compute_region_network_endpoint.default |
| } |
| ``` |
| |
| When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), RegionNetworkEndpoint can be imported using one of the formats above. For example: |
| |
| ``` |
| $ terraform import google_compute_region_network_endpoint.default projects/{{project}}/regions/{{region}}/networkEndpointGroups/{{region_network_endpoint_group}}/{{ip_address}}/{{fqdn}}/{{port}} |
| $ terraform import google_compute_region_network_endpoint.default {{project}}/{{region}}/{{region_network_endpoint_group}}/{{ip_address}}/{{fqdn}}/{{port}} |
| $ terraform import google_compute_region_network_endpoint.default {{region}}/{{region_network_endpoint_group}}/{{ip_address}}/{{fqdn}}/{{port}} |
| $ terraform import google_compute_region_network_endpoint.default {{region_network_endpoint_group}}/{{ip_address}}/{{fqdn}}/{{port}} |
| ``` |
| |
| ## User Project Overrides |
| |
| This resource supports [User Project Overrides](https://registry.terraform.io/providers/hashicorp/google/latest/docs/guides/provider_reference#user_project_override). |