FirewallPolicyAssociation

class FirewallPolicyAssociation : KotlinCustomResource

Allows associating hierarchical firewall policies with the target where they are applied. This allows creating policies and rules in a different location than they are applied. For more information on applying hierarchical firewall policies see the official documentation

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.compute.FirewallPolicy;
import com.pulumi.gcp.compute.FirewallPolicyArgs;
import com.pulumi.gcp.compute.FirewallPolicyAssociation;
import com.pulumi.gcp.compute.FirewallPolicyAssociationArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var defaultFirewallPolicy = new FirewallPolicy("defaultFirewallPolicy", FirewallPolicyArgs.builder()
.parent("organizations/12345")
.shortName("my-policy")
.description("Example Resource")
.build());
var defaultFirewallPolicyAssociation = new FirewallPolicyAssociation("defaultFirewallPolicyAssociation", FirewallPolicyAssociationArgs.builder()
.firewallPolicy(defaultFirewallPolicy.id())
.attachmentTarget(google_folder.folder().name())
.build());
}
}

Import

FirewallPolicyAssociation can be imported using any of these accepted formats

$ pulumi import gcp:compute/firewallPolicyAssociation:FirewallPolicyAssociation default locations/global/firewallPolicies/{{firewall_policy}}/associations/{{name}}
$ pulumi import gcp:compute/firewallPolicyAssociation:FirewallPolicyAssociation default {{firewall_policy}}/{{name}}

Properties

Link copied to clipboard

The target that the firewall policy is attached to.

Link copied to clipboard
val firewallPolicy: Output<String>

The firewall policy ID of the association.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val name: Output<String>

The name for an association.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val shortName: Output<String>

The short name of the firewall policy of the association.

Link copied to clipboard
val urn: Output<String>