pulumi_wasm_providers_gcp_mini::compute

Module network_firewall_policy_association

source
Expand description

The Compute NetworkFirewallPolicyAssociation resource

To get more information about NetworkFirewallPolicyAssociation, see:

§Example Usage

§Network Firewall Policy Association

use pulumi_wasm_rust::Output;
use pulumi_wasm_rust::{add_export, pulumi_main};
#[pulumi_main]
fn test_main() -> Result<(), Error> {
    let default = network_firewall_policy_association::create(
        "default",
        NetworkFirewallPolicyAssociationArgs::builder()
            .attachment_target("${network.id}")
            .firewall_policy("${policy.id}")
            .name("my-association")
            .project("my-project-name")
            .build_struct(),
    );
    let network = network::create(
        "network",
        NetworkArgs::builder()
            .auto_create_subnetworks(false)
            .name("my-network")
            .build_struct(),
    );
    let policy = network_firewall_policy::create(
        "policy",
        NetworkFirewallPolicyArgs::builder()
            .description("Sample global network firewall policy")
            .name("my-policy")
            .project("my-project-name")
            .build_struct(),
    );
}

§Import

NetworkFirewallPolicyAssociation can be imported using any of these accepted formats:

  • projects/{{project}}/global/firewallPolicies/{{firewall_policy}}/associations/{{name}}

  • {{project}}/{{firewall_policy}}/{{name}}

  • {{firewall_policy}}/{{name}}

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

$ pulumi import gcp:compute/networkFirewallPolicyAssociation:NetworkFirewallPolicyAssociation default projects/{{project}}/global/firewallPolicies/{{firewall_policy}}/associations/{{name}}
$ pulumi import gcp:compute/networkFirewallPolicyAssociation:NetworkFirewallPolicyAssociation default {{project}}/{{firewall_policy}}/{{name}}
$ pulumi import gcp:compute/networkFirewallPolicyAssociation:NetworkFirewallPolicyAssociation default {{firewall_policy}}/{{name}}

Structs§

Functions§

  • Registers a new resource with the given unique name and arguments