- NAME
-
- gcloud compute network-firewall-policies associations create - create a new association between a firewall policy and a network
- SYNOPSIS
-
-
gcloud compute network-firewall-policies associations create--firewall-policy=FIREWALL_POLICY--network=NETWORK[--name=NAME] [--replace-association-on-target] [--firewall-policy-region=FIREWALL_POLICY_REGION|--global-firewall-policy] [GCLOUD_WIDE_FLAG …]
-
- DESCRIPTION
-
gcloud compute network-firewall-policies associations createis used to create network firewall policy associations. A network firewall policy is a set of rules that controls access to various resources. - EXAMPLES
-
To associate a global network firewall policy with name
to networkmy-policywith an association namedmy-network, run:my-associationgcloud compute network-firewall-policies associations create --firewall-policy=my-policy --network=my-network --name=my-association --global-firewall-policyTo associate a network firewall policy with name
in regionmy-region-policyto networkregion-awith an association namedmy-network, run:my-associationgcloud compute network-firewall-policies associations create --firewall-policy=my-policy --network=my-network --name=my-association --firewall-policy-region=region-a - REQUIRED FLAGS
-
--firewall-policy=FIREWALL_POLICY- Firewall policy ID with which to create association.
--network=NETWORK- Name of the network with which the association is created.
- OPTIONAL FLAGS
-
--name=NAME- Name of the association.
--replace-association-on-target- By default, if you attempt to insert an association to a network that is already associated with a firewall policy the method will fail. If this is set, the existing association will be deleted at the same time that the new association is created.
-
At most one of these can be specified:
--firewall-policy-region=FIREWALL_POLICY_REGION-
Region of the firewall policy to create. Overrides the default
compute/regionproperty value for this command invocation. --global-firewall-policy- If set, the firewall policy is global.
- GCLOUD WIDE FLAGS
-
These flags are available to all commands:
--access-token-file,--account,--billing-project,--configuration,--flags-file,--flatten,--format,--help,--impersonate-service-account,--log-http,--project,--quiet,--trace-token,--user-output-enabled,--verbosity.Run
$ gcloud helpfor details. - NOTES
-
These variants are also available:
gcloud alpha compute network-firewall-policies associations creategcloud beta compute network-firewall-policies associations create
gcloud compute network-firewall-policies associations create
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-05-07 UTC.