CLI Workspace Provider
The Terraform Cloud scanner syncs workspaces from your Terraform Cloud account
into Ctrlplane, allowing you to deploy, upgrade and manage workspaces.
Usage
To sync in all Terraform Cloud workspaces, you’ll need:
- A Terraform Cloud API key with read access to your workspaces
- Your Terraform Cloud organization name (e.g.
example
)
To see all available options, run:
Here is a basic example of how to sync in all Terraform Cloud workspaces:
Resource Schemas
Workspace
When syncing workspaces from Terraform Cloud, each workspace will have the
following schema:
version
default:"terraform-cloud/v1"
The version of the schema
The unique identifier of the workspace
config
Terraform Cloud workspace config
The unique identifier of the workspace
The name of the workspace
The organization the workspace belongs to
Whether auto apply is enabled for the workspace
The version of Terraform used by the workspace
The VCS repository configuration
The repository identifier
The HTTP URL of the repository
metadata
Terraform Cloud workspace metadata
The unique identifier of the workspace (e.g. ws-a7b3c9d2e5f8g1h4
)
Links to related resources (e.g. {"Terraform Workspace":"<url to workspace>"}
)
terraform-cloud/organization
The organization the workspace belongs to (e.g. myorg
)
terraform-cloud/workspace-name
The name of the workspace (e.g. ci-kubernetes-runtime
)
terraform-cloud/workspace-auto-apply
Whether auto apply is enabled (e.g. true
)
terraform-cloud/vcs-repo/identifier
The repository identifier (e.g. myorg/myrepo
)
terraform-cloud/vcs-repo/branch
terraform-cloud/vcs-repo/repository-http-url
The HTTP URL of the repository (e.g. https://github.com/myorg/myrepo
)
The version of Terraform used (e.g. 1.5.0
)