# TerraformBlueprint

- [JSON representation](https://docs.cloud.google.com/infrastructure-manager/docs/reference/rest/v1/TerraformBlueprint#SCHEMA_REPRESENTATION)
- [GitSource](https://docs.cloud.google.com/infrastructure-manager/docs/reference/rest/v1/TerraformBlueprint#GitSource)
  - [JSON representation](https://docs.cloud.google.com/infrastructure-manager/docs/reference/rest/v1/TerraformBlueprint#GitSource.SCHEMA_REPRESENTATION)
- [TerraformVariable](https://docs.cloud.google.com/infrastructure-manager/docs/reference/rest/v1/TerraformBlueprint#TerraformVariable)
  - [JSON representation](https://docs.cloud.google.com/infrastructure-manager/docs/reference/rest/v1/TerraformBlueprint#TerraformVariable.SCHEMA_REPRESENTATION)
- [ExternalValueSource](https://docs.cloud.google.com/infrastructure-manager/docs/reference/rest/v1/TerraformBlueprint#ExternalValueSource)
  - [JSON representation](https://docs.cloud.google.com/infrastructure-manager/docs/reference/rest/v1/TerraformBlueprint#ExternalValueSource.SCHEMA_REPRESENTATION)
- [DeploymentSource](https://docs.cloud.google.com/infrastructure-manager/docs/reference/rest/v1/TerraformBlueprint#DeploymentSource)
  - [JSON representation](https://docs.cloud.google.com/infrastructure-manager/docs/reference/rest/v1/TerraformBlueprint#DeploymentSource.SCHEMA_REPRESENTATION)

TerraformBlueprint describes the source of a Terraform root module which describes the resources and configs to be deployed.

| JSON representation |
|---|
| ``` { "inputValues": { string: { object (`https://docs.cloud.google.com/infrastructure-manager/docs/reference/rest/v1/TerraformBlueprint#TerraformVariable`) }, ... }, "externalValues": { string: { object (`https://docs.cloud.google.com/infrastructure-manager/docs/reference/rest/v1/TerraformBlueprint#ExternalValueSource`) }, ... }, // Union field `source` can be only one of the following: "gcsSource": string, "gitSource": { object (`https://docs.cloud.google.com/infrastructure-manager/docs/reference/rest/v1/TerraformBlueprint#GitSource`) } // End of list of possible types for union field `source`. } ``` |

| Fields ||
|---|---|
| `inputValues` | ``map (key: string, value: object (`https://docs.cloud.google.com/infrastructure-manager/docs/reference/rest/v1/TerraformBlueprint#TerraformVariable`))`` Optional. Input variable values for the Terraform blueprint. An object containing a list of `"key": value` pairs. Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`. |
| `externalValues` | ``map (key: string, value: object (`https://docs.cloud.google.com/infrastructure-manager/docs/reference/rest/v1/TerraformBlueprint#ExternalValueSource`))`` Optional. Map of input variable names in this blueprint to configurations for importing values from external sources. An object containing a list of `"key": value` pairs. Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`. |
| Union field `source`. Location of the source configs. Required. `source` can be only one of the following: ||
| `gcsSource` | `string` URI of an object in Google Cloud Storage. Format: `gs://{bucket}/{object}` URI may also specify an object version for zipped objects. Format: `gs://{bucket}/{object}#{version}` |
| `gitSource` | ``object (`https://docs.cloud.google.com/infrastructure-manager/docs/reference/rest/v1/TerraformBlueprint#GitSource`)`` URI of a public Git repo. |

## GitSource

A set of files in a Git repository.

| JSON representation |
|---|
| ``` { "repo": string, "directory": string, "ref": string } ``` |

| Fields ||
|---|---|
| `repo` | `string` Optional. Repository URL. Example: 'https://github.com/kubernetes/examples.git' |
| `directory` | `string` Optional. Subdirectory inside the repository. Example: 'staging/my-package' |
| `ref` | `string` Optional. Git reference (e.g. branch or tag). |

## TerraformVariable

A Terraform input variable.

| JSON representation |
|---|
| ``` { "inputValue": value } ``` |

| Fields ||
|---|---|
| `inputValue` | ``value (`https://protobuf.dev/reference/protobuf/google.protobuf#value` format)`` Optional. Input variable value. |

## ExternalValueSource

Configuration for a source of an external value.

| JSON representation |
|---|
| ``` { // Union field `source` can be only one of the following: "deploymentSource": { object (`https://docs.cloud.google.com/infrastructure-manager/docs/reference/rest/v1/TerraformBlueprint#DeploymentSource`) } // End of list of possible types for union field `source`. } ``` |

| Fields ||
|---|---|
| Union field `source`. The source of the external value. `source` can be only one of the following: ||
| `deploymentSource` | ``object (`https://docs.cloud.google.com/infrastructure-manager/docs/reference/rest/v1/TerraformBlueprint#DeploymentSource`)`` A source from a Deployment. |

## DeploymentSource

Configuration for a value sourced from a Deployment.

| JSON representation |
|---|
| ``` { "deployment": string, "outputName": string } ``` |

| Fields ||
|---|---|
| `deployment` | `string` Required. The resource name of the source Deployment to import the output from. Format: projects/{project}/locations/{location}/deployments/{deployment} The source deployment must be in the same project and location. |
| `outputName` | `string` Required. The name of the output variable in the source deployment's latest successfully applied revision. |