Skip to content

googleComputeRegionNetworkFirewallPolicyAssociation

The Compute NetworkFirewallPolicyAssociation resource

Example Usage - regional

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as google from "./.gen/providers/google";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: google.
For a more precise conversion please use the --provider flag in convert.*/
const googleComputeNetworkBasicNetwork =
  new google.computeNetwork.ComputeNetwork(this, "basic_network", {
    name: "network",
  });
const googleComputeRegionNetworkFirewallPolicyBasicRegionalNetworkFirewallPolicy =
  new google.computeRegionNetworkFirewallPolicy.ComputeRegionNetworkFirewallPolicy(
    this,
    "basic_regional_network_firewall_policy",
    {
      description: "Sample global network firewall policy",
      name: "policy",
      project: "my-project-name",
      region: "us-west1",
    }
  );
new google.computeRegionNetworkFirewallPolicyAssociation.ComputeRegionNetworkFirewallPolicyAssociation(
  this,
  "primary",
  {
    attachment_target: googleComputeNetworkBasicNetwork.id,
    firewall_policy:
      googleComputeRegionNetworkFirewallPolicyBasicRegionalNetworkFirewallPolicy.name,
    name: "association",
    project: "my-project-name",
    region: "us-west1",
  }
);

Argument Reference

The following arguments are supported:

  • attachmentTarget - (Required) The target that the firewall policy is attached to.

  • firewallPolicy - (Required) The firewall policy ID of the association.

  • name - (Required) The name for an association.


  • region - (Optional) The location of this resource.

  • project - (Optional) The project for the resource

Attributes Reference

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

  • id - an identifier for the resource with format projects/{{project}}/regions/{{region}}/firewallPolicies/{{firewallPolicy}}/associations/{{name}}

  • shortName - The short name of the firewall policy of the association.

Timeouts

This resource provides the following Timeouts configuration options:

  • create - Default is 20 minutes.
  • delete - Default is 20 minutes.

Import

NetworkFirewallPolicyAssociation can be imported using any of these accepted formats:

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