Method: projects.locations.spaces.applications.importIaC

Imports IaC for an application resource.

HTTP request

POST https://designcenter.googleapis.com/v1alpha/{name=projects/*/locations/*/spaces/*/applications/*}:importIaC

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
name

string

Required. The name of the application.

Request body

The request body contains data with the following structure:

JSON representation
{
  "allowPartialImport": boolean,
  "validateIac": boolean,

  // Union field source can be only one of the following:
  "gcsUri": string,
  "iacModule": {
    object (IaCModule)
  }
  // End of list of possible types for union field source.
}
Fields
allowPartialImport

boolean

Optional. If set to true, partially imports the valid edits in the IaC and ignores the invalid changes. Defaults to false, which means any edits which can't be imported must result in an error.

validateIac

boolean

Optional. If set to true, the IaC is validated against the golden terraform without importing. Defaults to false.

Union field source. The source location of terraform code. source can be only one of the following:
gcsUri

string

Optional. The Cloud Storage URI of the terraform code.

iacModule

object (IaCModule)

Optional. The IaC module to import.

Response body

Response message for applications.importIaC method.

If successful, the response body contains data with the following structure:

JSON representation
{
  "application": {
    object (Application)
  },
  "errors": [
    {
      object (ImportIaCError)
    }
  ],
  "state": enum (State)
}
Fields
application

object (Application)

Application template corresponding to the imported IaC.

errors[]

object (ImportIaCError)

Errors encountered during import.

state

enum (State)

The state of the import.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

IAM Permissions

Requires the following IAM permission on the name resource:

  • designcenter.applications.update

For more information, see the IAM documentation.

State

State of Import.

Enums
STATE_UNSPECIFIED Default.
SUCCEEDED The import was successful.
FAILED The import failed.