Package google.cloud.config.v1

Index

ApplyResults

Outputs and artifacts from applying a deployment.

Fields
content

string

Location of a blueprint copy and other manifests in Google Cloud Storage. Format: gs://{bucket}/{object}

artifacts

string

Location of artifacts (e.g. logs) in Google Cloud Storage. Format: gs://{bucket}/{object}

outputs

map<string, TerraformOutput>

Map of output name to output info.

Deployment

A Deployment is a group of resources and configs managed and provisioned by Infra Manager.

Fields
name

string

Identifier. Resource name of the deployment. Format: projects/{project}/locations/{location}/deployments/{deployment}

create_time

Timestamp

Output only. Time when the deployment was created.

update_time

Timestamp

Output only. Time when the deployment was last modified.

labels

map<string, string>

Optional. User-defined metadata for the deployment.

state

State

Output only. Current state of the deployment.

latest_revision

string

Output only. Revision name that was most recently applied. Format: projects/{project}/locations/{location}/deployments/{deployment}/ revisions/{revision}

state_detail

string

Output only. Additional information regarding the current state.

error_code

ErrorCode

Output only. Error code describing errors that may have occurred.

delete_results

ApplyResults

Output only. Location of artifacts from a DeleteDeployment operation.

delete_build

string

Output only. Cloud Build instance UUID associated with deleting this deployment.

delete_logs

string

Output only. Location of Cloud Build logs in Google Cloud Storage, populated when deleting this deployment. Format: gs://{bucket}/{object}.

tf_errors[]

TerraformError

Output only. Errors encountered when deleting this deployment. Errors are truncated to 10 entries, see delete_results and error_logs for full details.

error_logs

string

Output only. Location of Terraform error logs in Google Cloud Storage. Format: gs://{bucket}/{object}.

lock_state

LockState

Output only. Current lock state of the deployment.

tf_version

string

Output only. The current Terraform version set on the deployment. It is in the format of "Major.Minor.Patch", for example, "1.3.10".

quota_validation

QuotaValidation

Optional. Input to control quota checks for resources in terraform configuration files. There are limited resources on which quota validation applies.

annotations

map<string, string>

Optional. Arbitrary key-value metadata storage e.g. to help client tools identify deployments during automation. See https://google.aip.dev/148#annotations for details on format and size limitations.

Union field blueprint. Blueprint to deploy. blueprint can be only one of the following:
terraform_blueprint

TerraformBlueprint

A blueprint described using Terraform's HashiCorp Configuration Language as a root module.

artifacts_gcs_bucket

string

Optional. User-defined location of Cloud Build logs and artifacts in Google Cloud Storage. Format: gs://{bucket}/{folder}

A default bucket will be bootstrapped if the field is not set or empty. Default bucket format: gs://<project number>-<region>-blueprint-config Constraints: - The bucket needs to be in the same project as the deployment - The path cannot be within the path of gcs_source - The field cannot be updated, including changing its presence

service_account

string

Required. User-specified Service Account (SA) credentials to be used when actuating resources. Format: projects/{projectID}/serviceAccounts/{serviceAccount}

import_existing_resources

bool

By default, Infra Manager will return a failure when Terraform encounters a 409 code (resource conflict error) during actuation. If this flag is set to true, Infra Manager will instead attempt to automatically import the resource into the Terraform state (for supported resource types) and continue actuation.

Not all resource types are supported, refer to documentation.

worker_pool

string

Optional. The user-specified Cloud Build worker pool resource in which the Cloud Build job will execute. Format: projects/{project}/locations/{location}/workerPools/{workerPoolId}. If this field is unspecified, the default Cloud Build worker pool will be used.

tf_version_constraint

string

Optional. The user-specified Terraform version constraint. Example: "=1.3.10".

ErrorCode

Possible errors that can occur with deployments.

Enums
ERROR_CODE_UNSPECIFIED No error code was specified.
REVISION_FAILED The revision failed. See Revision for more details.
CLOUD_BUILD_PERMISSION_DENIED Cloud Build failed due to a permission issue.
DELETE_BUILD_API_FAILED Cloud Build job associated with a deployment deletion could not be started.
DELETE_BUILD_RUN_FAILED Cloud Build job associated with a deployment deletion was started but failed.
BUCKET_CREATION_PERMISSION_DENIED Cloud Storage bucket creation failed due to a permission issue.
BUCKET_CREATION_FAILED Cloud Storage bucket creation failed due to an issue unrelated to permissions.

LockState

Possible lock states of a deployment.

Enums
LOCK_STATE_UNSPECIFIED The default value. This value is used if the lock state is omitted.
LOCKED The deployment is locked.
UNLOCKED The deployment is unlocked.
LOCKING The deployment is being locked.
UNLOCKING The deployment is being unlocked.
LOCK_FAILED The deployment has failed to lock.
UNLOCK_FAILED The deployment has failed to unlock.

State

Possible states of a deployment.

Enums
STATE_UNSPECIFIED The default value. This value is used if the state is omitted.
CREATING The deployment is being created.
ACTIVE The deployment is healthy.
UPDATING The deployment is being updated.
DELETING The deployment is being deleted.
FAILED The deployment has encountered an unexpected error.
SUSPENDED The deployment is no longer being actively reconciled. This may be the result of recovering the project after deletion.
DELETED The deployment has been deleted.

GitSource

A set of files in a Git repository.

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).

Preview

A preview represents a set of actions Infra Manager would perform to move the resources towards the desired state as specified in the configuration.

Fields
name

string

Identifier. Resource name of the preview. Resource name can be user provided or server generated ID if unspecified. Format: projects/{project}/locations/{location}/previews/{preview}

create_time

Timestamp

Output only. Time the preview was created.

labels

map<string, string>

Optional. User-defined labels for the preview.

state

State

Output only. Current state of the preview.

deployment

string

Optional. Optional deployment reference. If specified, the preview will be performed using the provided deployment's current state and use any relevant fields from the deployment unless explicitly specified in the preview create request.

preview_mode

PreviewMode

Optional. Current mode of preview.

service_account

string

Required. User-specified Service Account (SA) credentials to be used when previewing resources. Format: projects/{projectID}/serviceAccounts/{serviceAccount}

error_code

ErrorCode

Output only. Code describing any errors that may have occurred.

error_status

Status

Output only. Additional information regarding the current state.

build

string

Output only. Cloud Build instance UUID associated with this preview.

tf_errors[]

TerraformError

Output only. Summary of errors encountered during Terraform preview. It has a size limit of 10, i.e. only top 10 errors will be summarized here.

error_logs

string

Output only. Link to tf-error.ndjson file, which contains the full list of the errors encountered during a Terraform preview. Format: gs://{bucket}/{object}.

preview_artifacts

PreviewArtifacts

Output only. Artifacts from preview.

logs

string

Output only. Location of preview logs in gs://{bucket}/{object} format.

tf_version

string

Output only. The current Terraform version set on the preview. It is in the format of "Major.Minor.Patch", for example, "1.3.10".

annotations

map<string, string>

Optional. Arbitrary key-value metadata storage e.g. to help client tools identify preview during automation. See https://google.aip.dev/148#annotations for details on format and size limitations.

Union field blueprint. Blueprint to preview. blueprint can be only one of the following:
terraform_blueprint

TerraformBlueprint

The terraform blueprint to preview.

artifacts_gcs_bucket

string

Optional. User-defined location of Cloud Build logs, artifacts, and in Google Cloud Storage. Format: gs://{bucket}/{folder} A default bucket will be bootstrapped if the field is not set or empty Default Bucket Format: gs://<project number>-<region>-blueprint-config Constraints: - The bucket needs to be in the same project as the deployment - The path cannot be within the path of gcs_source If omitted and deployment resource ref provided has artifacts_gcs_bucket defined, that artifact bucket is used.

worker_pool

string

Optional. The user-specified Worker Pool resource in which the Cloud Build job will execute. Format projects/{project}/locations/{location}/workerPools/{workerPoolId} If this field is unspecified, the default Cloud Build worker pool will be used. If omitted and deployment resource ref provided has worker_pool defined, that worker pool is used.

tf_version_constraint

string

Optional. The user-specified Terraform version constraint. Example: "=1.3.10".

ErrorCode

Possible errors that can occur with previews.

Enums
ERROR_CODE_UNSPECIFIED No error code was specified.
CLOUD_BUILD_PERMISSION_DENIED Cloud Build failed due to a permissions issue.
BUCKET_CREATION_PERMISSION_DENIED Cloud Storage bucket failed to create due to a permissions issue.
BUCKET_CREATION_FAILED Cloud Storage bucket failed for a non-permissions-related issue.
DEPLOYMENT_LOCK_ACQUIRE_FAILED Acquiring lock on provided deployment reference failed.
PREVIEW_BUILD_API_FAILED Preview encountered an error when trying to access Cloud Build API.
PREVIEW_BUILD_RUN_FAILED Preview created a build but build failed and logs were generated.

PreviewMode

Preview mode provides options for customizing preview operations.

Enums
PREVIEW_MODE_UNSPECIFIED Unspecified policy, default mode will be used.
DEFAULT DEFAULT mode generates an execution plan for reconciling current resource state into expected resource state.
DELETE DELETE mode generates as execution plan for destroying current resources.

State

Possible states of a preview.

Enums
STATE_UNSPECIFIED The default value. This value is used if the state is unknown.
CREATING The preview is being created.
SUCCEEDED The preview has succeeded.
APPLYING The preview is being applied.
STALE The preview is stale. A preview can become stale if a revision has been applied after this preview was created.
DELETING The preview is being deleted.
FAILED The preview has encountered an unexpected error.
DELETED The preview has been deleted.

PreviewArtifacts

Artifacts created by preview.

Fields
content

string

Output only. Location of a blueprint copy and other content in Google Cloud Storage. Format: gs://{bucket}/{object}

artifacts

string

Output only. Location of artifacts in Google Cloud Storage. Format: gs://{bucket}/{object}

QuotaValidation

Enum values to control quota checks for resources in terraform configuration files.

Enums
QUOTA_VALIDATION_UNSPECIFIED The default value. QuotaValidation on terraform configuration files will be disabled in this case.
ENABLED Enable computing quotas for resources in terraform configuration files to get visibility on resources with insufficient quotas.
ENFORCED Enforce quota checks so deployment fails if there isn't sufficient quotas available to deploy resources in terraform configuration files.

TerraformBlueprint

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

Fields
input_values

map<string, TerraformVariable>

Optional. Input variable values for the Terraform blueprint.

Union field source. Location of the source configs. Required. source can be only one of the following:
gcs_source

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}

git_source

GitSource

URI of a public Git repo.

TerraformError

Errors encountered during actuation using Terraform

Fields
resource_address

string

Address of the resource associated with the error, e.g. google_compute_network.vpc_network.

http_response_code

int32

HTTP response code returned from Google Cloud Platform APIs when Terraform fails to provision the resource. If unset or 0, no HTTP response code was returned by Terraform.

error_description

string

A human-readable error description.

error

Status

Output only. Original error response from underlying Google API, if available.

TerraformOutput

Describes a Terraform output.

Fields
sensitive

bool

Identifies whether Terraform has set this output as a potential sensitive value.

value

Value

Value of output.

TerraformVariable

A Terraform input variable.

Fields
input_value

Value

Optional. Input variable value.