mirror of
https://github.com/opentffoundation/opentf.git
synced 2026-05-29 22:02:27 -04:00
Co-authored-by: Matthew Garrell <69917312+mgarrell777@users.noreply.github.com> Co-authored-by: Laura Pacilio <83350965+laurapacilio@users.noreply.github.com> Co-authored-by: Kevin Wang <kwangsan@gmail.com> Co-authored-by: Judith Malnick <judith@hashicorp.com> Co-authored-by: Martin Atkins <mart@degeneration.co.uk> Co-authored-by: HashiBot <62622282+hashibot-web@users.noreply.github.com>
37 lines
1.3 KiB
Plaintext
37 lines
1.3 KiB
Plaintext
---
|
|
page_title: Terraform Cloud Configuration - Terraform Settings - Configuration Language
|
|
description: >-
|
|
The nested `cloud` block configures Terraform's integration with Terraform
|
|
Cloud.
|
|
---
|
|
|
|
# Terraform Cloud Configuration
|
|
|
|
The main module of a Terraform configuration can integrate with Terraform Cloud to enable its [CLI-driven run workflow](/cloud-docs/run/cli). You only need to configure these settings when you want to use Terraform CLI to interact with Terraform Cloud. Terraform Cloud ignores them when interacting with
|
|
Terraform through version control or the API.
|
|
|
|
> **Hands On:** Try the [Migrate State to Terraform Cloud](https://learn.hashicorp.com/tutorials/terraform/cloud-migrate) tutorial.
|
|
|
|
## Usage Example
|
|
|
|
To configure the Terraform Cloud CLI integration, add a nested `cloud` block within the `terraform` block. You cannot use the CLI integration and a [state backend](/language/settings/backends) in the same configuration.
|
|
|
|
Refer to [Using Terraform Cloud](/cli/cloud) in the Terraform CLI documentation for full configuration details, migration instructions, and command line arguments.
|
|
|
|
```hcl
|
|
terraform {
|
|
cloud {
|
|
organization = "example_corp"
|
|
## Required for Terraform Enterprise; Defaults to app.terraform.io for Terraform Cloud
|
|
hostname = "app.terraform.io"
|
|
|
|
workspaces {
|
|
tags = ["app"]
|
|
}
|
|
}
|
|
}
|
|
```
|
|
|
|
|
|
|