This page describes how to view information about deployments, including:
- Listing deployments in a project.
- Viewing details of a deployment, including the following:
- The state of the deployment.
- The version of Terraform used to create the deployment.
- Listing revisions in a deployment.
- Viewing details of a revision, including the following:
- The state of the revision.
- The version of Terraform used to create the revision.
Before you begin
- Ensure Infra Manager is enabled.
- Ensure that you have the IAM permissions needed to view deployments:
roles/config.admin
orroles/config.viewer
.
List deployments in a project
Deployments are specific to a project and location. You can list the deployments if you want to assess which deployments exist.
To list the deployments in a project and location, use the following command:
gcloud infra-manager deployments list --project PROJECT_ID --location "LOCATION"
Replace the following:
- PROJECT_ID: the project ID where Infrastructure Manager runs.
- LOCATION with the location where the deployments exist. See Infrastructure Manager locations for the list of valid locations.
View details of a deployment
After you create a deployment, you might want to view details about the deployment, including the following:
- The state of the deployment. View the state to verify if the deployment was successful, failed, or had any issues such as a partial deployment.
- The version of Terraform that Infra Manager used to create the deployment.
To view details of a deployment, use the following command:
gcloud infra-manager deployments describe projects/PROJECT_ID/locations/LOCATION/deployments/DEPLOYMENT_ID
Replace the following:
- PROJECT_ID: the project ID where Infrastructure Manager runs.
- LOCATION: the location where Infra Manager runs. See Infrastructure Manager locations for the list of valid locations.
- DEPLOYMENT_ID: the deployment identifier of the deployment you're viewing.
For the list of possible states and details about each state, see State in the REST API reference.
The version of Terraform used to create the deployment is listed in the output
next to tfVersion
. For more information, see
Supported Terraform versions.
To troubleshoot failed deployments, see Troubleshoot deployment errors.
List revisions in a deployment
You might want to see the list of the different revisions that a deployment has gone through.
To list the revisions in a deployment, use the following command:
gcloud infra-manager revisions list --deployment=projects/PROJECT_ID/locations/LOCATION/deployments/DEPLOYMENT_ID
Replace the following:
- PROJECT_ID: the project ID where Infrastructure Manager runs.
- LOCATION: the location where Infra Manager runs. See Infrastructure Manager locations for the list of valid locations.
- DEPLOYMENT_ID: the deployment identifier of the deployment you're viewing.
View details of a revision
To view details of a specific revision, use the following command:
gcloud infra-manager revisions describe projects/PROJECT_ID/locations/LOCATION/deployments/DEPLOYMENT_ID/revisions/REVISION_ID
Replace the following:
- PROJECT_ID: the project ID where Infrastructure Manager runs.
- LOCATION: the location where Infra Manager runs. See Infrastructure Manager locations for the list of valid locations.
- DEPLOYMENT_ID: the deployment identifier of the deployment you're viewing.
- REVISION_ID: the revision identifier of the revision you're viewing.
For the list of possible states and details about each state, see State in the REST API reference.
The version of Terraform used to create the revision is listed in the output
next to tfVersion
. For more details, see
Supported Terraform versions.
To troubleshoot failed deployments, which includes failed revisions, see Troubleshoot deployment errors.
What's next
- Learn more about Terraform with Google Cloud.
- Automate deployments.
- Update a deployment.
- View resources deployed.
- Delete a deployment.