# Method: projects.locations.spaces.applicationTemplates.importIaC

- [HTTP request](https://docs.cloud.google.com/application-design-center/docs/reference/rest/v1/projects.locations.spaces.applicationTemplates/importIaC#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/application-design-center/docs/reference/rest/v1/projects.locations.spaces.applicationTemplates/importIaC#body.PATH_PARAMETERS)
- [Request body](https://docs.cloud.google.com/application-design-center/docs/reference/rest/v1/projects.locations.spaces.applicationTemplates/importIaC#body.request_body)
  - [JSON representation](https://docs.cloud.google.com/application-design-center/docs/reference/rest/v1/projects.locations.spaces.applicationTemplates/importIaC#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://docs.cloud.google.com/application-design-center/docs/reference/rest/v1/projects.locations.spaces.applicationTemplates/importIaC#body.response_body)
- [Authorization scopes](https://docs.cloud.google.com/application-design-center/docs/reference/rest/v1/projects.locations.spaces.applicationTemplates/importIaC#body.aspect)
- [IAM Permissions](https://docs.cloud.google.com/application-design-center/docs/reference/rest/v1/projects.locations.spaces.applicationTemplates/importIaC#body.aspect_1)
- [Try it!](https://docs.cloud.google.com/application-design-center/docs/reference/rest/v1/projects.locations.spaces.applicationTemplates/importIaC#try-it)

Imports IaC for an application template.

### HTTP request

`POST https://designcenter.googleapis.com/v1/{name=projects/*/locations/*/spaces/*/applicationTemplates/*}:importIaC`

The URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Path parameters

| Parameters ||
|---|---|
| `name` | `string` Required. The name of the application template. |

### 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 (`https://docs.cloud.google.com/application-design-center/docs/reference/rest/Shared.Types/IaCModule`) }, "developerConnectSourceConfig": { object (`https://docs.cloud.google.com/application-design-center/docs/reference/rest/v1/DeveloperConnectSourceConfig`) } // 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 (`https://docs.cloud.google.com/application-design-center/docs/reference/rest/Shared.Types/IaCModule`)`` Optional. The IaC module to import. |
| `developerConnectSourceConfig` | ``object (`https://docs.cloud.google.com/application-design-center/docs/reference/rest/v1/DeveloperConnectSourceConfig`)`` Optional. Configuration for fetching content from source code repository such as GitHub or Bitbucket through Developer Connect. |

### Response body

If successful, the response body contains an instance of `https://docs.cloud.google.com/application-design-center/docs/reference/rest/Shared.Types/ImportApplicationTemplateIaCResponse`.

### Authorization scopes

Requires the following OAuth scope:

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

For more information, see the [Authentication Overview](https://docs.cloud.google.com/docs/authentication#authorization-gcp).

### IAM Permissions

Requires the following [IAM](https://cloud.google.com/iam/docs) permission on the `name` resource:

- `designcenter.applicationTemplates.update`

For more information, see the [IAM documentation](https://cloud.google.com/iam/docs).