Skip to content

googleComputeNetworkFirewallPolicyAssociation

The Compute NetworkFirewallPolicyAssociation resource

Example Usage - global

/*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 googleComputeNetworkNetwork = new google.computeNetwork.ComputeNetwork(
  this,
  "network",
  {
    name: "network",
  }
);
const googleComputeNetworkFirewallPolicyNetworkFirewallPolicy =
  new google.computeNetworkFirewallPolicy.ComputeNetworkFirewallPolicy(
    this,
    "network_firewall_policy",
    {
      description: "Sample global network firewall policy",
      name: "policy",
      project: "my-project-name",
    }
  );
new google.computeNetworkFirewallPolicyAssociation.ComputeNetworkFirewallPolicyAssociation(
  this,
  "primary",
  {
    attachment_target: googleComputeNetworkNetwork.id,
    firewall_policy:
      googleComputeNetworkFirewallPolicyNetworkFirewallPolicy.name,
    name: "association",
    project: "my-project-name",
  }
);

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.


  • 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}}/global/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_network_firewall_policy_association.default projects/{{project}}/global/firewallPolicies/{{firewall_policy}}/associations/{{name}}
$ terraform import google_compute_network_firewall_policy_association.default {{project}}/{{firewall_policy}}/{{name}}