google_compute_region_network_firewall_policy_association

The Compute NetworkFirewallPolicyAssociation resource

Example Usage - regional

resource "google_compute_region_network_firewall_policy" "basic_regional_network_firewall_policy" {
  name = "policy"
  project = "my-project-name"
  description = "Sample global network firewall policy"
  region = "us-west1"
}

resource "google_compute_network" "basic_network" {
  name = "network"
}

resource "google_compute_region_network_firewall_policy_association" "primary" {
  name = "association"
  attachment_target = google_compute_network.basic_network.id
  firewall_policy =  google_compute_region_network_firewall_policy.basic_regional_network_firewall_policy.name
  project =  "my-project-name"
  region = "us-west1"
}

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

NetworkFirewallPolicyAssociation can be imported using any of these accepted formats:

In Terraform v1.5.0 and later, use an import block to import NetworkFirewallPolicyAssociation using one of the formats above. For example:

import {
  id = "projects/{{project}}/regions/{{region}}/firewallPolicies/{{firewall_policy}}/associations/{{name}}"
  to = google_compute_region_network_firewall_policy_association.default
}

When using the terraform import command, NetworkFirewallPolicyAssociation can be imported using one of the formats above. For example:

$ terraform import google_compute_region_network_firewall_policy_association.default projects/{{project}}/regions/{{region}}/firewallPolicies/{{firewall_policy}}/associations/{{name}}
$ terraform import google_compute_region_network_firewall_policy_association.default {{project}}/{{region}}/{{firewall_policy}}/{{name}}