| --- |
| # ---------------------------------------------------------------------------- |
| # |
| # *** 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: |- |
| AddressGroup is a resource that specifies how a collection of IP/DNS used in Firewall Policy. |
| --- |
| |
| # google\_network\_security\_address\_group |
| |
| AddressGroup is a resource that specifies how a collection of IP/DNS used in Firewall Policy. |
| |
| |
| To get more information about AddressGroup, see: |
| |
| * [API documentation](https://cloud.google.com/traffic-director/docs/reference/network-security/rest/v1beta1/organizations.locations.addressGroups) |
| * How-to Guides |
| * [Use AddressGroups](https://cloud.google.com/vpc/docs/use-address-groups-firewall-policies) |
| |
| ## Example Usage - Network Security Address Groups Basic |
| |
| |
| ```hcl |
| resource "google_network_security_address_group" "default" { |
| name = "my-address-groups" |
| parent = "projects/my-project-name" |
| location = "us-central1" |
| type = "IPV4" |
| capacity = "100" |
| items = ["208.80.154.224/32"] |
| } |
| ``` |
| ## Example Usage - Network Security Address Groups Organization Basic |
| |
| |
| ```hcl |
| resource "google_network_security_address_group" "default" { |
| name = "my-address-groups" |
| parent = "organizations/123456789" |
| location = "us-central1" |
| type = "IPV4" |
| capacity = "100" |
| items = ["208.80.154.224/32"] |
| } |
| ``` |
| ## Example Usage - Network Security Address Groups Advanced |
| |
| |
| ```hcl |
| resource "google_network_security_address_group" "default" { |
| name = "my-address-groups" |
| parent = "projects/my-project-name" |
| location = "us-central1" |
| description = "my description" |
| type = "IPV4" |
| capacity = "100" |
| items = ["208.80.154.224/32"] |
| } |
| ``` |
| |
| ## Argument Reference |
| |
| The following arguments are supported: |
| |
| |
| * `type` - |
| (Required) |
| The type of the Address Group. Possible values are "IPV4" or "IPV6". |
| Possible values are: `IPV4`, `IPV6`. |
| |
| * `capacity` - |
| (Required) |
| Capacity of the Address Group. |
| |
| * `name` - |
| (Required) |
| Name of the AddressGroup resource. |
| |
| * `location` - |
| (Required) |
| The location of the gateway security policy. |
| The default value is `global`. |
| |
| |
| - - - |
| |
| |
| * `description` - |
| (Optional) |
| Free-text description of the resource. |
| |
| * `labels` - |
| (Optional) |
| Set of label tags associated with the AddressGroup resource. |
| An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. |
| |
| **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. |
| |
| * `items` - |
| (Optional) |
| List of items. |
| |
| * `parent` - |
| (Optional) |
| The name of the parent this address group belongs to. Format: organizations/{organization_id} or projects/{project_id}. |
| |
| |
| ## Attributes Reference |
| |
| In addition to the arguments listed above, the following computed attributes are exported: |
| |
| * `id` - an identifier for the resource with format `{{parent}}/locations/{{location}}/addressGroups/{{name}}` |
| |
| * `create_time` - |
| The timestamp when the resource was created. |
| A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. |
| Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z" |
| |
| * `update_time` - |
| The timestamp when the resource was updated. |
| A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. |
| Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z". |
| |
| * `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 |
| |
| |
| AddressGroup can be imported using any of these accepted formats: |
| |
| * `{{parent}}/locations/{{location}}/addressGroups/{{name}}` |
| |
| |
| In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import AddressGroup using one of the formats above. For example: |
| |
| ```tf |
| import { |
| id = "{{parent}}/locations/{{location}}/addressGroups/{{name}}" |
| to = google_network_security_address_group.default |
| } |
| ``` |
| |
| When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), AddressGroup can be imported using one of the formats above. For example: |
| |
| ``` |
| $ terraform import google_network_security_address_group.default {{parent}}/locations/{{location}}/addressGroups/{{name}} |
| ``` |