From e52bdd40c8aab1344a7c80a8ebfe93d0ce45bce6 Mon Sep 17 00:00:00 2001 From: The Magician Date: Fri, 13 Dec 2024 12:29:14 -0800 Subject: [PATCH] Add Intercept Endpoint Group resource to Network Security. (#12522) (#20692) [upstream:9ffbaefa36297db91b4e79927bd62e5afe260207] Signed-off-by: Modular Magician --- .changelog/12522.txt | 3 + ...intercept_endpoint_group_generated_test.go | 3 + ...ity_intercept_endpoint_group.html.markdown | 169 ++++++++++++++++++ 3 files changed, 175 insertions(+) create mode 100644 .changelog/12522.txt create mode 100644 google/services/networksecurity/resource_network_security_intercept_endpoint_group_generated_test.go create mode 100644 website/docs/r/network_security_intercept_endpoint_group.html.markdown diff --git a/.changelog/12522.txt b/.changelog/12522.txt new file mode 100644 index 00000000000..7dfacbb9c61 --- /dev/null +++ b/.changelog/12522.txt @@ -0,0 +1,3 @@ +```release-note:new-resource +`google_network_security_intercept_endpoint_group` (beta) +``` \ No newline at end of file diff --git a/google/services/networksecurity/resource_network_security_intercept_endpoint_group_generated_test.go b/google/services/networksecurity/resource_network_security_intercept_endpoint_group_generated_test.go new file mode 100644 index 00000000000..8380ac5af78 --- /dev/null +++ b/google/services/networksecurity/resource_network_security_intercept_endpoint_group_generated_test.go @@ -0,0 +1,3 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 +package networksecurity_test diff --git a/website/docs/r/network_security_intercept_endpoint_group.html.markdown b/website/docs/r/network_security_intercept_endpoint_group.html.markdown new file mode 100644 index 00000000000..f4af2401c18 --- /dev/null +++ b/website/docs/r/network_security_intercept_endpoint_group.html.markdown @@ -0,0 +1,169 @@ +--- +# ---------------------------------------------------------------------------- +# +# *** 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: "Network security" +description: |- + An intercept endpoint group is a global resource in the consumer account representing the producer’s deployment group. +--- + +# google_network_security_intercept_endpoint_group + +An intercept endpoint group is a global resource in the consumer account representing the producer’s deployment group. + +~> **Warning:** This resource is in beta, and should be used with the terraform-provider-google-beta provider. +See [Provider Versions](https://terraform.io/docs/providers/google/guides/provider_versions.html) for more details on beta resources. + + + +## Example Usage - Network Security Intercept Endpoint Group Basic + + +```hcl +resource "google_compute_network" "network" { + provider = google-beta + name = "example-network" + auto_create_subnetworks = false +} + +resource "google_network_security_intercept_deployment_group" "deployment_group" { + provider = google-beta + intercept_deployment_group_id = "example-dg" + location = "global" + network = google_compute_network.network.id +} + +resource "google_network_security_intercept_endpoint_group" "default" { + provider = google-beta + intercept_endpoint_group_id = "example-eg" + location = "global" + intercept_deployment_group = google_network_security_intercept_deployment_group.deployment_group.id + labels = { + foo = "bar" + } +} +``` + +## Argument Reference + +The following arguments are supported: + + +* `intercept_deployment_group` - + (Required) + Immutable. The Intercept Deployment Group that this resource is connected to. Format + is: + `projects/{project}/locations/global/interceptDeploymentGroups/{interceptDeploymentGroup}` + +* `location` - + (Required) + The location of the Intercept Endpoint Group, currently restricted to `global`. + +* `intercept_endpoint_group_id` - + (Required) + ID of the Intercept Endpoint Group. + + +- - - + + +* `labels` - + (Optional) + Optional. Labels as key value pairs + **Note**: This field is non-authoritative, and will only manage the labels present in your configuration. + Please refer to the field `effective_labels` for all of the labels present on the resource. + +* `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 `projects/{{project}}/locations/{{location}}/interceptEndpointGroups/{{intercept_endpoint_group_id}}` + +* `name` - + Identifier. The name of the Intercept Endpoint Group. + +* `create_time` - + Create time stamp. + +* `update_time` - + Update time stamp. + +* `state` - + Current state of the endpoint group. + Possible values: + STATE_UNSPECIFIED + ACTIVE + CLOSED + CREATING + DELETING + OUT_OF_SYNC + +* `reconciling` - + Whether reconciling is in progress, recommended per + https://google.aip.dev/128. + +* `terraform_labels` - + The combination of labels configured directly on the resource + and default labels configured on the provider. + +* `effective_labels` - + All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Terraform, other clients and services. + + +## 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. +- `update` - Default is 20 minutes. +- `delete` - Default is 20 minutes. + +## Import + + +InterceptEndpointGroup can be imported using any of these accepted formats: + +* `projects/{{project}}/locations/{{location}}/interceptEndpointGroups/{{intercept_endpoint_group_id}}` +* `{{project}}/{{location}}/{{intercept_endpoint_group_id}}` +* `{{location}}/{{intercept_endpoint_group_id}}` + + +In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import InterceptEndpointGroup using one of the formats above. For example: + +```tf +import { + id = "projects/{{project}}/locations/{{location}}/interceptEndpointGroups/{{intercept_endpoint_group_id}}" + to = google_network_security_intercept_endpoint_group.default +} +``` + +When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), InterceptEndpointGroup can be imported using one of the formats above. For example: + +``` +$ terraform import google_network_security_intercept_endpoint_group.default projects/{{project}}/locations/{{location}}/interceptEndpointGroups/{{intercept_endpoint_group_id}} +$ terraform import google_network_security_intercept_endpoint_group.default {{project}}/{{location}}/{{intercept_endpoint_group_id}} +$ terraform import google_network_security_intercept_endpoint_group.default {{location}}/{{intercept_endpoint_group_id}} +``` + +## User Project Overrides + +This resource supports [User Project Overrides](https://registry.terraform.io/providers/hashicorp/google/latest/docs/guides/provider_reference#user_project_override).