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:

Example Usage - Network Security Address Groups Basic

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

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

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:


Attributes Reference

In addition to the arguments listed above, the following computed attributes are exported:

Timeouts

This resource provides the following Timeouts configuration options:

Import

AddressGroup can be imported using any of these accepted formats:

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}}