Expand description
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
ⓘ
use pulumi_wasm_rust::Output;
use pulumi_wasm_rust::{add_export, pulumi_main};
#[pulumi_main]
fn test_main() -> Result<(), Error> {
let default = firewall_policy::create(
"default",
FirewallPolicyArgs::builder()
.description("Example Resource")
.parent("organizations/12345")
.short_name("my-policy")
.build_struct(),
);
let defaultFirewallPolicyAssociation = firewall_policy_association::create(
"defaultFirewallPolicyAssociation",
FirewallPolicyAssociationArgs::builder()
.attachment_target("${folder.name}")
.firewall_policy("${default.id}")
.name("my-association")
.build_struct(),
);
}
§Import
FirewallPolicyAssociation can be imported using any of these accepted formats:
-
locations/global/firewallPolicies/{{firewall_policy}}/associations/{{name}}
-
{{firewall_policy}}/{{name}}
When using the pulumi import
command, FirewallPolicyAssociation can be imported using one of the formats above. For example:
$ pulumi import gcp:compute/firewallPolicyAssociation:FirewallPolicyAssociation default locations/global/firewallPolicies/{{firewall_policy}}/associations/{{name}}
$ pulumi import gcp:compute/firewallPolicyAssociation:FirewallPolicyAssociation default {{firewall_policy}}/{{name}}
Structs§
- Use builder syntax to set the inputs and finish with
build_struct()
.
Functions§
- Registers a new resource with the given unique name and arguments