|
| 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 | + MirroringDeployment represents the collectors within a Zone and is associated with a deployment group. |
| 18 | +--- |
| 19 | + |
| 20 | +# google_network_security_mirroring_deployment |
| 21 | + |
| 22 | +MirroringDeployment represents the collectors within a Zone and is associated with a deployment group. |
| 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 | +To get more information about MirroringDeployment, see: |
| 28 | + |
| 29 | +* [API documentation](https://cloud.google.com/network-security-integration/docs/reference/rest/v1beta1/projects.locations.mirroringDeployments) |
| 30 | +* How-to Guides |
| 31 | + * [Mirroring deployment overview](https://cloud.google.com/network-security-integration/docs/out-of-band/deployments-overview) |
| 32 | + |
| 33 | +<div class = "oics-button" style="float: right; margin: 0 0 -15px"> |
| 34 | + <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_mirroring_deployment_basic&open_in_editor=main.tf" target="_blank"> |
| 35 | + <img alt="Open in Cloud Shell" src="//gstatic.com/cloudssh/images/open-btn.svg" style="max-height: 44px; margin: 32px auto; max-width: 100%;"> |
| 36 | + </a> |
| 37 | +</div> |
| 38 | +## Example Usage - Network Security Mirroring Deployment Basic |
| 39 | + |
| 40 | + |
| 41 | +```hcl |
| 42 | +resource "google_compute_network" "network" { |
| 43 | + provider = google-beta |
| 44 | + name = "example-network" |
| 45 | + auto_create_subnetworks = false |
| 46 | +} |
| 47 | +
|
| 48 | +resource "google_compute_subnetwork" "subnetwork" { |
| 49 | + provider = google-beta |
| 50 | + name = "example-subnet" |
| 51 | + region = "us-central1" |
| 52 | + ip_cidr_range = "10.1.0.0/16" |
| 53 | + network = google_compute_network.network.name |
| 54 | +} |
| 55 | +
|
| 56 | +resource "google_compute_region_health_check" "health_check" { |
| 57 | + provider = google-beta |
| 58 | + name = "example-hc" |
| 59 | + region = "us-central1" |
| 60 | + http_health_check { |
| 61 | + port = 80 |
| 62 | + } |
| 63 | +} |
| 64 | +
|
| 65 | +resource "google_compute_region_backend_service" "backend_service" { |
| 66 | + provider = google-beta |
| 67 | + name = "example-bs" |
| 68 | + region = "us-central1" |
| 69 | + health_checks = [google_compute_region_health_check.health_check.id] |
| 70 | + protocol = "UDP" |
| 71 | + load_balancing_scheme = "INTERNAL" |
| 72 | +} |
| 73 | +
|
| 74 | +resource "google_compute_forwarding_rule" "forwarding_rule" { |
| 75 | + provider = google-beta |
| 76 | + name = "example-fwr" |
| 77 | + region = "us-central1" |
| 78 | + network = google_compute_network.network.name |
| 79 | + subnetwork = google_compute_subnetwork.subnetwork.name |
| 80 | + backend_service = google_compute_region_backend_service.backend_service.id |
| 81 | + load_balancing_scheme = "INTERNAL" |
| 82 | + ports = [6081] |
| 83 | + ip_protocol = "UDP" |
| 84 | + is_mirroring_collector = true |
| 85 | +} |
| 86 | +
|
| 87 | +resource "google_network_security_mirroring_deployment_group" "deployment_group" { |
| 88 | + provider = google-beta |
| 89 | + mirroring_deployment_group_id = "example-dg" |
| 90 | + location = "global" |
| 91 | + network = google_compute_network.network.id |
| 92 | +} |
| 93 | +
|
| 94 | +resource "google_network_security_mirroring_deployment" "default" { |
| 95 | + provider = google-beta |
| 96 | + mirroring_deployment_id = "example-deployment" |
| 97 | + location = "us-central1-a" |
| 98 | + forwarding_rule = google_compute_forwarding_rule.forwarding_rule.id |
| 99 | + mirroring_deployment_group = google_network_security_mirroring_deployment_group.deployment_group.id |
| 100 | + labels = { |
| 101 | + foo = "bar" |
| 102 | + } |
| 103 | +} |
| 104 | +``` |
| 105 | + |
| 106 | +## Argument Reference |
| 107 | + |
| 108 | +The following arguments are supported: |
| 109 | + |
| 110 | + |
| 111 | +* `forwarding_rule` - |
| 112 | + (Required) |
| 113 | + Required. Immutable. The regional load balancer which the mirrored traffic should be forwarded |
| 114 | + to. Format is: |
| 115 | + projects/{project}/regions/{region}/forwardingRules/{forwardingRule} |
| 116 | + |
| 117 | +* `mirroring_deployment_group` - |
| 118 | + (Required) |
| 119 | + Required. Immutable. The Mirroring Deployment Group that this resource is part of. Format is: |
| 120 | + `projects/{project}/locations/global/mirroringDeploymentGroups/{mirroringDeploymentGroup}` |
| 121 | + |
| 122 | +* `location` - |
| 123 | + (Required) |
| 124 | + Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122. See documentation for resource type `networksecurity.googleapis.com/MirroringDeployment`. |
| 125 | + |
| 126 | +* `mirroring_deployment_id` - |
| 127 | + (Required) |
| 128 | + Required. Id of the requesting object |
| 129 | + If auto-generating Id server-side, remove this field and |
| 130 | + mirroring_deployment_id from the method_signature of Create RPC |
| 131 | + |
| 132 | + |
| 133 | +- - - |
| 134 | + |
| 135 | + |
| 136 | +* `labels` - |
| 137 | + (Optional) |
| 138 | + Optional. Labels as key value pairs |
| 139 | + **Note**: This field is non-authoritative, and will only manage the labels present in your configuration. |
| 140 | + Please refer to the field `effective_labels` for all of the labels present on the resource. |
| 141 | + |
| 142 | +* `project` - (Optional) The ID of the project in which the resource belongs. |
| 143 | + If it is not provided, the provider project is used. |
| 144 | + |
| 145 | + |
| 146 | +## Attributes Reference |
| 147 | + |
| 148 | +In addition to the arguments listed above, the following computed attributes are exported: |
| 149 | + |
| 150 | +* `id` - an identifier for the resource with format `projects/{{project}}/locations/{{location}}/mirroringDeployments/{{mirroring_deployment_id}}` |
| 151 | + |
| 152 | +* `name` - |
| 153 | + Immutable. Identifier. The name of the MirroringDeployment. |
| 154 | + |
| 155 | +* `create_time` - |
| 156 | + Output only. [Output only] Create time stamp |
| 157 | + |
| 158 | +* `update_time` - |
| 159 | + Output only. [Output only] Update time stamp |
| 160 | + |
| 161 | +* `state` - |
| 162 | + Output only. Current state of the deployment. |
| 163 | + Possible values: |
| 164 | + STATE_UNSPECIFIED |
| 165 | + ACTIVE |
| 166 | + CREATING |
| 167 | + DELETING |
| 168 | + OUT_OF_SYNC |
| 169 | + DELETE_FAILED |
| 170 | + |
| 171 | +* `reconciling` - |
| 172 | + Output only. Whether reconciling is in progress, recommended per |
| 173 | + https://google.aip.dev/128. |
| 174 | + |
| 175 | +* `terraform_labels` - |
| 176 | + The combination of labels configured directly on the resource |
| 177 | + and default labels configured on the provider. |
| 178 | + |
| 179 | +* `effective_labels` - |
| 180 | + All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Terraform, other clients and services. |
| 181 | + |
| 182 | + |
| 183 | +## Timeouts |
| 184 | + |
| 185 | +This resource provides the following |
| 186 | +[Timeouts](https://developer.hashicorp.com/terraform/plugin/sdkv2/resources/retries-and-customizable-timeouts) configuration options: |
| 187 | + |
| 188 | +- `create` - Default is 20 minutes. |
| 189 | +- `update` - Default is 20 minutes. |
| 190 | +- `delete` - Default is 20 minutes. |
| 191 | + |
| 192 | +## Import |
| 193 | + |
| 194 | + |
| 195 | +MirroringDeployment can be imported using any of these accepted formats: |
| 196 | + |
| 197 | +* `projects/{{project}}/locations/{{location}}/mirroringDeployments/{{mirroring_deployment_id}}` |
| 198 | +* `{{project}}/{{location}}/{{mirroring_deployment_id}}` |
| 199 | +* `{{location}}/{{mirroring_deployment_id}}` |
| 200 | + |
| 201 | + |
| 202 | +In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import MirroringDeployment using one of the formats above. For example: |
| 203 | + |
| 204 | +```tf |
| 205 | +import { |
| 206 | + id = "projects/{{project}}/locations/{{location}}/mirroringDeployments/{{mirroring_deployment_id}}" |
| 207 | + to = google_network_security_mirroring_deployment.default |
| 208 | +} |
| 209 | +``` |
| 210 | + |
| 211 | +When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), MirroringDeployment can be imported using one of the formats above. For example: |
| 212 | + |
| 213 | +``` |
| 214 | +$ terraform import google_network_security_mirroring_deployment.default projects/{{project}}/locations/{{location}}/mirroringDeployments/{{mirroring_deployment_id}} |
| 215 | +$ terraform import google_network_security_mirroring_deployment.default {{project}}/{{location}}/{{mirroring_deployment_id}} |
| 216 | +$ terraform import google_network_security_mirroring_deployment.default {{location}}/{{mirroring_deployment_id}} |
| 217 | +``` |
| 218 | + |
| 219 | +## User Project Overrides |
| 220 | + |
| 221 | +This resource supports [User Project Overrides](https://registry.terraform.io/providers/hashicorp/google/latest/docs/guides/provider_reference#user_project_override). |
0 commit comments