gcloud compute security-policies import - import security policy configs into your project
gcloud compute security-policies import NAME --file-name=FILE_NAME [--file-format=FILE_FORMAT] [--global | --region=REGION] [GCLOUD_WIDE_FLAG ...]
gcloud compute security-policies import imports a security policy to update an existing policy. The command does not support updating rules for the policy. To create a new policy from a file please use the create command instead.
To import a security policy from a YAML file run this:
$ gcloud compute security-policies import --file-name=myFile
- NAME
Name of the security policy to import.
- --file-name=FILE_NAME
The name of the JSON or YAML file to import the security policy config from.
- --file-format=FILE_FORMAT
The format of the file to import the security policy config from. Specify either yaml or json. Defaults to yaml if not specified. FILE_FORMAT must be one of: json, yaml.
- At most one of these can be specified:
- --global
If set, the security policy is global.
- --region=REGION
Region of the security policy to import. Overrides the default compute/region property value for this command invocation.
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 help for details.
These variants are also available:
$ gcloud alpha compute security-policies import
$ gcloud beta compute security-policies import