|
| 1 | +--- |
| 2 | +# ---------------------------------------------------------------------------- |
| 3 | +# |
| 4 | +# *** AUTO GENERATED CODE *** Type: MMv1 *** |
| 5 | +# |
| 6 | +# ---------------------------------------------------------------------------- |
| 7 | +# |
| 8 | +# This file is automatically generated by Magic Modules and manual |
| 9 | +# changes will be clobbered when the file is regenerated. |
| 10 | +# |
| 11 | +# Please read more about how to change this file in |
| 12 | +# .github/CONTRIBUTING.md. |
| 13 | +# |
| 14 | +# ---------------------------------------------------------------------------- |
| 15 | +subcategory: "Network security" |
| 16 | +description: |- |
| 17 | + Creates an association between a VPC and an Intercept Endpoint Group in order to intercept traffic in that VPC. |
| 18 | +--- |
| 19 | + |
| 20 | +# google_network_security_intercept_endpoint_group_association |
| 21 | + |
| 22 | +Creates an association between a VPC and an Intercept Endpoint Group in order to intercept traffic in that VPC. |
| 23 | + |
| 24 | +~> **Warning:** This resource is in beta, and should be used with the terraform-provider-google-beta provider. |
| 25 | +See [Provider Versions](https://terraform.io/docs/providers/google/guides/provider_versions.html) for more details on beta resources. |
| 26 | + |
| 27 | + |
| 28 | +<div class = "oics-button" style="float: right; margin: 0 0 -15px"> |
| 29 | + <a href="https://console.cloud.google.com/cloudshell/open?cloudshell_git_repo=https%3A%2F%2Fgithub.com%2Fterraform-google-modules%2Fdocs-examples.git&cloudshell_image=gcr.io%2Fcloudshell-images%2Fcloudshell%3Alatest&cloudshell_print=.%2Fmotd&cloudshell_tutorial=.%2Ftutorial.md&cloudshell_working_dir=network_security_intercept_endpoint_group_association_basic&open_in_editor=main.tf" target="_blank"> |
| 30 | + <img alt="Open in Cloud Shell" src="//gstatic.com/cloudssh/images/open-btn.svg" style="max-height: 44px; margin: 32px auto; max-width: 100%;"> |
| 31 | + </a> |
| 32 | +</div> |
| 33 | +## Example Usage - Network Security Intercept Endpoint Group Association Basic |
| 34 | + |
| 35 | + |
| 36 | +```hcl |
| 37 | +resource "google_compute_network" "producer_network" { |
| 38 | + provider = google-beta |
| 39 | + name = "example-prod-network" |
| 40 | + auto_create_subnetworks = false |
| 41 | +} |
| 42 | +
|
| 43 | +resource "google_compute_network" "consumer_network" { |
| 44 | + provider = google-beta |
| 45 | + name = "example-cons-network" |
| 46 | + auto_create_subnetworks = false |
| 47 | +} |
| 48 | +
|
| 49 | +resource "google_network_security_intercept_deployment_group" "deployment_group" { |
| 50 | + provider = google-beta |
| 51 | + intercept_deployment_group_id = "example-dg" |
| 52 | + location = "global" |
| 53 | + network = google_compute_network.producer_network.id |
| 54 | +} |
| 55 | +
|
| 56 | +resource "google_network_security_intercept_endpoint_group" "endpoint_group" { |
| 57 | + provider = google-beta |
| 58 | + intercept_endpoint_group_id = "example-eg" |
| 59 | + location = "global" |
| 60 | + intercept_deployment_group = google_network_security_intercept_deployment_group.deployment_group.id |
| 61 | +} |
| 62 | +
|
| 63 | +resource "google_network_security_intercept_endpoint_group_association" "default" { |
| 64 | + provider = google-beta |
| 65 | + intercept_endpoint_group_association_id = "example-ega" |
| 66 | + location = "global" |
| 67 | + network = google_compute_network.consumer_network.id |
| 68 | + intercept_endpoint_group = google_network_security_intercept_endpoint_group.endpoint_group.id |
| 69 | + labels = { |
| 70 | + foo = "bar" |
| 71 | + } |
| 72 | +} |
| 73 | +``` |
| 74 | + |
| 75 | +## Argument Reference |
| 76 | + |
| 77 | +The following arguments are supported: |
| 78 | + |
| 79 | + |
| 80 | +* `intercept_endpoint_group` - |
| 81 | + (Required) |
| 82 | + Immutable. The Intercept Endpoint Group that this resource is connected to. Format |
| 83 | + is: |
| 84 | + `projects/{project}/locations/global/interceptEndpointGroups/{interceptEndpointGroup}`. |
| 85 | + |
| 86 | +* `network` - |
| 87 | + (Required) |
| 88 | + Immutable. The VPC network associated. Format: |
| 89 | + `projects/{project}/global/networks/{network}`. |
| 90 | + |
| 91 | +* `location` - |
| 92 | + (Required) |
| 93 | + The location of the Intercept Endpoint Group Association, currently restricted to `global`. |
| 94 | + |
| 95 | + |
| 96 | +- - - |
| 97 | + |
| 98 | + |
| 99 | +* `labels` - |
| 100 | + (Optional) |
| 101 | + Optional. Labels as key value pairs. |
| 102 | + **Note**: This field is non-authoritative, and will only manage the labels present in your configuration. |
| 103 | + Please refer to the field `effective_labels` for all of the labels present on the resource. |
| 104 | + |
| 105 | +* `intercept_endpoint_group_association_id` - |
| 106 | + (Optional) |
| 107 | + ID of the Intercept Endpoint Group Association. |
| 108 | + |
| 109 | +* `project` - (Optional) The ID of the project in which the resource belongs. |
| 110 | + If it is not provided, the provider project is used. |
| 111 | + |
| 112 | + |
| 113 | +## Attributes Reference |
| 114 | + |
| 115 | +In addition to the arguments listed above, the following computed attributes are exported: |
| 116 | + |
| 117 | +* `id` - an identifier for the resource with format `projects/{{project}}/locations/{{location}}/interceptEndpointGroupAssociations/{{intercept_endpoint_group_association_id}}` |
| 118 | + |
| 119 | +* `name` - |
| 120 | + Identifier. The name of the Intercept Endpoint Group Association. |
| 121 | + |
| 122 | +* `create_time` - |
| 123 | + Create time stamp. |
| 124 | + |
| 125 | +* `update_time` - |
| 126 | + Update time stamp. |
| 127 | + |
| 128 | +* `locations_details` - |
| 129 | + The list of locations that are currently supported by the associated Intercept Deployment Group and their state. |
| 130 | + Structure is [documented below](#nested_locations_details). |
| 131 | + |
| 132 | +* `state` - |
| 133 | + Current state of the Intercept Endpoint Group Association. |
| 134 | + Possible values: |
| 135 | + STATE_UNSPECIFIED |
| 136 | + ACTIVE |
| 137 | + CREATING |
| 138 | + DELETING |
| 139 | + CLOSED |
| 140 | + OUT_OF_SYNC |
| 141 | + DELETE_FAILED |
| 142 | + |
| 143 | +* `reconciling` - |
| 144 | + Whether reconciling is in progress. |
| 145 | + |
| 146 | +* `terraform_labels` - |
| 147 | + The combination of labels configured directly on the resource |
| 148 | + and default labels configured on the provider. |
| 149 | + |
| 150 | +* `effective_labels` - |
| 151 | + All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Terraform, other clients and services. |
| 152 | + |
| 153 | + |
| 154 | +<a name="nested_locations_details"></a>The `locations_details` block contains: |
| 155 | + |
| 156 | +* `location` - |
| 157 | + (Output) |
| 158 | + Location supported by the Intercept Deployment Group, for example `us-central1-a` |
| 159 | + |
| 160 | +* `state` - |
| 161 | + (Output) |
| 162 | + The association state in this location. |
| 163 | + Possible values: |
| 164 | + STATE_UNSPECIFIED |
| 165 | + ACTIVE |
| 166 | + OUT_OF_SYNC |
| 167 | + |
| 168 | +## Timeouts |
| 169 | + |
| 170 | +This resource provides the following |
| 171 | +[Timeouts](https://developer.hashicorp.com/terraform/plugin/sdkv2/resources/retries-and-customizable-timeouts) configuration options: |
| 172 | + |
| 173 | +- `create` - Default is 20 minutes. |
| 174 | +- `update` - Default is 20 minutes. |
| 175 | +- `delete` - Default is 20 minutes. |
| 176 | + |
| 177 | +## Import |
| 178 | + |
| 179 | + |
| 180 | +InterceptEndpointGroupAssociation can be imported using any of these accepted formats: |
| 181 | + |
| 182 | +* `projects/{{project}}/locations/{{location}}/interceptEndpointGroupAssociations/{{intercept_endpoint_group_association_id}}` |
| 183 | +* `{{project}}/{{location}}/{{intercept_endpoint_group_association_id}}` |
| 184 | +* `{{location}}/{{intercept_endpoint_group_association_id}}` |
| 185 | + |
| 186 | + |
| 187 | +In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import InterceptEndpointGroupAssociation using one of the formats above. For example: |
| 188 | + |
| 189 | +```tf |
| 190 | +import { |
| 191 | + id = "projects/{{project}}/locations/{{location}}/interceptEndpointGroupAssociations/{{intercept_endpoint_group_association_id}}" |
| 192 | + to = google_network_security_intercept_endpoint_group_association.default |
| 193 | +} |
| 194 | +``` |
| 195 | + |
| 196 | +When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), InterceptEndpointGroupAssociation can be imported using one of the formats above. For example: |
| 197 | + |
| 198 | +``` |
| 199 | +$ terraform import google_network_security_intercept_endpoint_group_association.default projects/{{project}}/locations/{{location}}/interceptEndpointGroupAssociations/{{intercept_endpoint_group_association_id}} |
| 200 | +$ terraform import google_network_security_intercept_endpoint_group_association.default {{project}}/{{location}}/{{intercept_endpoint_group_association_id}} |
| 201 | +$ terraform import google_network_security_intercept_endpoint_group_association.default {{location}}/{{intercept_endpoint_group_association_id}} |
| 202 | +``` |
| 203 | + |
| 204 | +## User Project Overrides |
| 205 | + |
| 206 | +This resource supports [User Project Overrides](https://registry.terraform.io/providers/hashicorp/google/latest/docs/guides/provider_reference#user_project_override). |
0 commit comments