gcluster create

NAME

gcluster create - creates a new deployment directory.

SYNOPSIS

gcluster create BLUEPRINT_PATH [FLAGS]

DESCRIPTION

The gcluster create command validates an environment blueprint YAML file and generates a deployment directory containing Terraform and Packer configurations for Google Cloud. During validation, the gcluster create command batches metadata validation errors. If a required module input is missing, then the gcluster create command suggests compatible modules that output the missing variable so that you can add them to the module's use list.

After creating the deployment directory, you can deploy the resources by using the gcluster deploy command.

FLAGS

  • -o, --out OUTPUT_DIR: The directory where the deployment directory is created.
  • -w, --overwrite-deployment: Lets you overwrite an existing deployment directory.
  • --force: Forces an overwrite without prompting.
  • -d, --deployment-file DEPLOYMENT_FILE: A deployment file to override blueprint variables and backend configuration.
  • --vars VARS: A comma-separated list of name=value variables to override YAML configuration. You can specify this flag multiple times.
  • --backend-config BACKEND_CONFIG: A comma-separated list of name=value variables to set Terraform backend configuration. You can specify this flag multiple times.
  • -l, --validation-level LEVEL: Sets the validation level to one of ERROR, WARNING, or IGNORE. The default value is ERROR.
  • --skip-validators VALIDATORS: A comma-separated list of validators to skip during validation.
  • --add-creator-label: Adds the ghpc_creator label with your account identity to the expanded blueprint. Turned on by default for @google.com accounts. To turn off this label, pass the --add-creator-label=false flag.

EXAMPLES

To create a deployment directory from a blueprint YAML file:

gcluster create blueprint.yaml -o ./my-deployment

To create a deployment directory and override specific variables:

gcluster create blueprint.yaml \
    -o ./my-deployment \
    --vars project_id=my-project,zone=us-central1-a

To overwrite an existing deployment directory:

gcluster create blueprint.yaml -o ./my-deployment --overwrite-deployment