A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developer.hashicorp.com/terraform/cli/v1.5.x/cloud/settings below:

Terraform Cloud Settings - Terraform CLI | Terraform

Terraform CLI can integrate with Terraform Cloud, acting as a client for Terraform Cloud's CLI-driven run workflow.

Hands On: Try the Migrate State to Terraform Cloud tutorial.

You must configure the following settings to use Terraform Cloud for a particular working directory:

After adding or changing a cloud block, you must run terraform init.

The cloud block is a nested block within the top-level terraform settings block. It specifies which Terraform Cloud workspaces to use for the current working directory.

terraform {
  cloud {
    organization = "my-org"
    hostname = "app.terraform.io" # Optional; defaults to app.terraform.io

    workspaces {
      tags = ["networking", "source:cli"]
    }
  }
}

The cloud block also has some special restrictions:

The cloud block only affects Terraform CLI's behavior. When Terraform Cloud uses a configuration that contains a cloud block - for example, when a workspace is configured to use a VCS provider directly - it ignores the block and behaves according to its own workspace settings.

Arguments

The cloud block supports the following configuration arguments:

Environment Variables

Note: CLI integration environment variables are supported in Terraform v1.2.0 and later.

You can use environment variables to configure one or more cloud block attributes. This is helpful when you want to configure Terraform as part of a Continuous Integration (CI) pipeline. Terraform only reads these variables if the corresponding attribute is omitted from your configuration file. If you choose to configure the cloud block entirely through environment variables, you must still add an empty cloud block in your configuration file.

Warning: Remote execution with non-interactive workflows requires auto-approved deployments. Minimize risk of unpredictable infrastructure changes and configuration drift by making sure that no one can change your infrastructure outside of your automated build pipeline. Refer to Non-Interactive Workflows for details.

Use the following environment variables to configure the cloud block:

When executing a remote plan or apply in a CLI-driven run, a copy of your configuration directory is uploaded to Terraform Cloud. You can define paths to exclude from upload by adding a .terraformignore file at the root of your configuration directory. If this file is not present, the upload will exclude the following by default:

The rules in .terraformignore file resemble the rules allowed in a .gitignore file:

Note: Unlike .gitignore, only the .terraformignore at the root of the configuration directory is considered.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4