Skip to main content

revisions

Creates, updates, deletes, gets or lists a revisions resource.

Overview

Namerevisions
TypeResource
Idgoogle.config.revisions

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringRevision name. Format: projects/{project}/locations/{location}/deployments/{deployment}/ revisions/{revision}
actionstringOutput only. The action which created this revision
applyResultsobjectOutput only. Outputs and artifacts from applying a deployment. (id: ApplyResults)
buildstringOutput only. Cloud Build instance UUID associated with this revision.
createTimestring (google-datetime)Output only. Time when the revision was created.
errorCodestringOutput only. Code describing any errors that may have occurred.
errorLogsstringOutput only. Location of Terraform error logs in Google Cloud Storage. Format: gs://{bucket}/{object}.
importExistingResourcesbooleanOutput only. 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.
logsstringOutput only. Location of Revision operation logs in gs://{bucket}/{object} format.
providerConfigobjectOutput only. This field specifies the provider configurations. (id: ProviderConfig)
quotaValidationstringOptional. Input to control quota checks for resources in terraform configuration files. There are limited resources on which quota validation applies.
quotaValidationResultsstringOutput only. Cloud Storage path containing quota validation results. This field is set when a user sets Deployment.quota_validation field to ENABLED or ENFORCED. Format: gs://{bucket}/{object}.
serviceAccountstringOutput only. User-specified Service Account (SA) to be used as credential to manage resources. Format: projects/{projectID}/serviceAccounts/{serviceAccount}
statestringOutput only. Current state of the revision.
stateDetailstringOutput only. Additional info regarding the current state.
terraformBlueprintobjectOutput only. A blueprint described using Terraform's HashiCorp Configuration Language as a root module. (id: TerraformBlueprint)
tfErrorsarrayOutput only. Errors encountered when creating or updating this deployment. Errors are truncated to 10 entries, see delete_results and error_logs for full details.
tfVersionstringOutput only. The version of Terraform used to create the Revision. It is in the format of "Major.Minor.Patch", for example, "1.3.10".
tfVersionConstraintstringOutput only. The user-specified Terraform version constraint. Example: "=1.3.10".
updateTimestring (google-datetime)Output only. Time when the revision was last modified.
workerPoolstringOutput only. 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.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, deploymentsId, revisionsIdGets details about a Revision.
listselectprojectsId, locationsId, deploymentsIdpageSize, pageToken, filter, orderByLists Revisions of a deployment.
export_stateexecprojectsId, locationsId, deploymentsId, revisionsIdExports Terraform state file from a given revision.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
deploymentsIdstring
locationsIdstring
projectsIdstring
revisionsIdstring
filterstring
orderBystring
pageSizeinteger (int32)
pageTokenstring

SELECT examples

Gets details about a Revision.

SELECT
name,
action,
applyResults,
build,
createTime,
errorCode,
errorLogs,
importExistingResources,
logs,
providerConfig,
quotaValidation,
quotaValidationResults,
serviceAccount,
state,
stateDetail,
terraformBlueprint,
tfErrors,
tfVersion,
tfVersionConstraint,
updateTime,
workerPool
FROM google.config.revisions
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND deploymentsId = '{{ deploymentsId }}' -- required
AND revisionsId = '{{ revisionsId }}' -- required;

Lifecycle Methods

Exports Terraform state file from a given revision.

EXEC google.config.revisions.export_state 
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@deploymentsId='{{ deploymentsId }}' --required,
@revisionsId='{{ revisionsId }}' --required;