gcloud design-center spaces application-templates import-iac

NAME
gcloud design-center spaces application-templates import-iac - import Infrastructure as Code(IaC) for an Application Template
SYNOPSIS
gcloud design-center spaces application-templates import-iac(APPLICATION_TEMPLATE :--location=LOCATION--space=SPACE)(--gcs-uri=GCS_URI    |--iac-module-from-file=PATH_TO_FILE)[--allow-partial-import][--validate-iac][GCLOUD_WIDE_FLAG]
DESCRIPTION
Import Infrastructure as Code (IaC) for a Design Center Application Template.
EXAMPLES
To import IaC from a Google Cloud Storage URI into the application templatemy-template in spacedev-space and locationus-central1, run:
gclouddesign-centerspacesapplication-templatesimport-iacmy-template--location=us-central1--space=dev-space--gcs-uri=gs://my-bucket/iac

To import IaC from a local YAML file namediac_module.yaml into theapplication templatemy-template in spacedev-spaceand locationus-central1, run:

gclouddesign-centerspacesapplication-templatesimport-iacmy-template--location=us-central1--space=dev-space--iac-module-from-file=iac_module.yaml

To import IaC from a Google Cloud Storage URI and allow partial import of validedits into the application templatemy-template, run:

gclouddesign-centerspacesapplication-templatesimport-iacmy-template--location=us-central1--space=dev-space--gcs-uri=gs://my-bucket/iac--allow-partial-import

To import IaC from a local YAML file and allow partial import of valid editsinto the application templatemy-template, run:

gclouddesign-centerspacesapplication-templatesimport-iacmy-template--location=us-central1--space=dev-space--iac-module-from-file=iac_module.yaml--allow-partial-import

To validate IaC from a Google Cloud Storage URI without importing into theapplication templatemy-template, run:

gclouddesign-centerspacesapplication-templatesimport-iacmy-template--location=us-central1--space=dev-space--gcs-uri=gs://my-bucket/iac--validate-iac

To validate IaC from a local YAML file without importing into the applicationtemplatemy-template, run:

gclouddesign-centerspacesapplication-templatesimport-iacmy-template--location=us-central1--space=dev-space--iac-module-from-file=iac_module.yaml--validate-iac
POSITIONAL ARGUMENTS
Application template resource - The application template to import IaC into IaC.The arguments in this group can be used to specify the attributes of thisresource. (NOTE) Some attributes are not given arguments in this group but canbe set in other ways.

To set theproject attribute:

  • provide the argumentAPPLICATION_TEMPLATE on the command line witha fully specified name;
  • provide the argument--project on the command line;
  • set the propertycore/project.

This must be specified.

APPLICATION_TEMPLATE
ID of the application_template or fully qualified identifier for theapplication_template.

To set theapplication_template_id attribute:

  • provide the argumentAPPLICATION_TEMPLATE on the command line.

This positional argument must be specified if any of the other arguments in thisgroup are specified.

--location=LOCATION
The Cloud location for the application_template.

To set thelocation attribute:

  • provide the argumentAPPLICATION_TEMPLATE on the command line witha fully specified name;
  • provide the argument--location on the command line.
--space=SPACE
The ID of the space.

To set thespace attribute:

  • provide the argumentAPPLICATION_TEMPLATE on the command line witha fully specified name;
  • provide the argument--space on the command line.
REQUIRED FLAGS
Exactly one of these must be specified:
--gcs-uri=GCS_URI
The Cloud Storage URI of the Terraform code (e.g., gs://my-bucket/iac).
--iac-module-from-file=PATH_TO_FILE
Path to a local YAML or JSON file containing the IaC module definition. Use afull or relative path to a local file containing the value of iac_module.
OPTIONAL FLAGS
--allow-partial-import
If set, partially import valid IaC changes and ignore invalid ones.
--validate-iac
Validate the IaC without performing the import.
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 help for details.

API REFERENCE
This command uses the designcenter/v1alpha API. The full documentation for thisAPI can be found at:http://cloud.google.com/application-design-center/docs
NOTES
This variant is also available:
gcloudalphadesign-centerspacesapplication-templatesimport-iac

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-11-18 UTC.