AddressGroup is a resource that specifies how a collection of IP/DNS used in Firewall Policy.
To get more information about AddressGroup, see:
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"]
}
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"]
}
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"]
}
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}.
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.
This resource provides the following Timeouts configuration options:
create
- Default is 20 minutes.update
- Default is 20 minutes.delete
- Default is 20 minutes.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 to import AddressGroup using one of the formats above. For example:
import {
id = "{{parent}}/locations/{{location}}/addressGroups/{{name}}"
to = google_network_security_address_group.default
}
When using the terraform import
command, 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}}