gcloud compute security-policies create NAME [--description=DESCRIPTION] [--file-format=FILE_FORMAT] [--file-name=FILE_NAME | --type=SECURITY_POLICY_TYPE] [--global | --region=REGION] [GCLOUD_WIDE_FLAG …]
gcloud compute security-policies create is used to create security
policies. A security policy policy is a set of rules that controls access to
various resources.
gcloud compute security-policies create my-policy --type=CLOUD_ARMOR_EDGE --description="policy description"To create a security from an input file, run:
gcloud compute security-policies create my-policy --file-name=my-file-nameNAME--description=DESCRIPTION--file-format=FILE_FORMATFILE_FORMAT must be one of:
json, yaml.
--file-name=FILE_NAME--type=SECURITY_POLICY_TYPESECURITY_POLICY_TYPE must be one of:
CLOUD_ARMOR, CLOUD_ARMOR_EDGE,
CLOUD_ARMOR_NETWORK.
--global--region=REGIONcompute/region property value for this command invocation.
--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 help for details.
gcloud alpha compute security-policies creategcloud beta compute security-policies creategcloud preview compute security-policies 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 2026-05-27 UTC.