cloud block

The block inside the terraform block that connects a configuration to HCP Terraform or Terraform Enterprise.

In more detail

It names the organization and selects workspaces by name or by tags, and can name a project. The hostname defaults to app.terraform.io, so it is only set for Terraform Enterprise. A configuration cannot have both a cloud block and a backend block; terraform init then offers to migrate existing state.

Example

terraform {
  cloud {
    organization = "harbourline"
    workspaces { name = "booking-prod" }
  }
}

Related terms

Taught in

References

Certification courses