revisions
Creates, updates, deletes, gets or lists a revisions
resource.
Overview
Name | revisions |
Type | Resource |
Id | google.config.revisions |
Fields
The following fields are returned by SELECT
queries:
- get
- list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Revision name. Format: projects/{project}/locations/{location}/deployments/{deployment}/ revisions/{revision} |
action | string | Output only. The action which created this revision |
applyResults | object | Output only. Outputs and artifacts from applying a deployment. (id: ApplyResults) |
build | string | Output only. Cloud Build instance UUID associated with this revision. |
createTime | string (google-datetime) | Output only. Time when the revision was created. |
errorCode | string | Output only. Code describing any errors that may have occurred. |
errorLogs | string | Output only. Location of Terraform error logs in Google Cloud Storage. Format: gs://{bucket}/{object} . |
importExistingResources | boolean | Output 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. |
logs | string | Output only. Location of Revision operation logs in gs://{bucket}/{object} format. |
providerConfig | object | Output only. This field specifies the provider configurations. (id: ProviderConfig) |
quotaValidation | string | Optional. Input to control quota checks for resources in terraform configuration files. There are limited resources on which quota validation applies. |
quotaValidationResults | string | Output 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} . |
serviceAccount | string | Output only. User-specified Service Account (SA) to be used as credential to manage resources. Format: projects/{projectID}/serviceAccounts/{serviceAccount} |
state | string | Output only. Current state of the revision. |
stateDetail | string | Output only. Additional info regarding the current state. |
terraformBlueprint | object | Output only. A blueprint described using Terraform's HashiCorp Configuration Language as a root module. (id: TerraformBlueprint) |
tfErrors | array | Output only. Errors encountered when creating or updating this deployment. Errors are truncated to 10 entries, see delete_results and error_logs for full details. |
tfVersion | string | Output only. The version of Terraform used to create the Revision. It is in the format of "Major.Minor.Patch", for example, "1.3.10". |
tfVersionConstraint | string | Output only. The user-specified Terraform version constraint. Example: "=1.3.10". |
updateTime | string (google-datetime) | Output only. Time when the revision was last modified. |
workerPool | string | Output 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. |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Revision name. Format: projects/{project}/locations/{location}/deployments/{deployment}/ revisions/{revision} |
action | string | Output only. The action which created this revision |
applyResults | object | Output only. Outputs and artifacts from applying a deployment. (id: ApplyResults) |
build | string | Output only. Cloud Build instance UUID associated with this revision. |
createTime | string (google-datetime) | Output only. Time when the revision was created. |
errorCode | string | Output only. Code describing any errors that may have occurred. |
errorLogs | string | Output only. Location of Terraform error logs in Google Cloud Storage. Format: gs://{bucket}/{object} . |
importExistingResources | boolean | Output 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. |
logs | string | Output only. Location of Revision operation logs in gs://{bucket}/{object} format. |
providerConfig | object | Output only. This field specifies the provider configurations. (id: ProviderConfig) |
quotaValidation | string | Optional. Input to control quota checks for resources in terraform configuration files. There are limited resources on which quota validation applies. |
quotaValidationResults | string | Output 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} . |
serviceAccount | string | Output only. User-specified Service Account (SA) to be used as credential to manage resources. Format: projects/{projectID}/serviceAccounts/{serviceAccount} |
state | string | Output only. Current state of the revision. |
stateDetail | string | Output only. Additional info regarding the current state. |
terraformBlueprint | object | Output only. A blueprint described using Terraform's HashiCorp Configuration Language as a root module. (id: TerraformBlueprint) |
tfErrors | array | Output only. Errors encountered when creating or updating this deployment. Errors are truncated to 10 entries, see delete_results and error_logs for full details. |
tfVersion | string | Output only. The version of Terraform used to create the Revision. It is in the format of "Major.Minor.Patch", for example, "1.3.10". |
tfVersionConstraint | string | Output only. The user-specified Terraform version constraint. Example: "=1.3.10". |
updateTime | string (google-datetime) | Output only. Time when the revision was last modified. |
workerPool | string | Output 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:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | projectsId , locationsId , deploymentsId , revisionsId | Gets details about a Revision. | |
list | select | projectsId , locationsId , deploymentsId | pageSize , pageToken , filter , orderBy | Lists Revisions of a deployment. |
export_state | exec | projectsId , locationsId , deploymentsId , revisionsId | Exports 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.
Name | Datatype | Description |
---|---|---|
deploymentsId | string | |
locationsId | string | |
projectsId | string | |
revisionsId | string | |
filter | string | |
orderBy | string | |
pageSize | integer (int32) | |
pageToken | string |
SELECT
examples
- get
- list
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;
Lists Revisions of a deployment.
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 pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND filter = '{{ filter }}'
AND orderBy = '{{ orderBy }}';
Lifecycle Methods
- export_state
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;