Complete the code to specify the Terraform Cloud workspace name.
terraform {
cloud {
organization = "my-org"
workspaces {
name = "[1]"
}
}
}The name field specifies the workspace name in Terraform Cloud.
Complete the code to enable remote state storage in Terraform Cloud.
terraform {
backend "remote" {
organization = "my-org"
workspaces {
name = "my-workspace"
}
[1] = true
}
}The skip_credentials_validation option controls whether to skip validating credentials during terraform init.
Fix the error in the policy set block to attach a policy to a workspace.
resource "tfe_policy_set" "example" { name = "example-policy-set" organization = "my-org" [1] = [tfe_workspace.example.id] }
The workspace_ids attribute expects a list of workspace IDs to attach the policy set.
Fill both blanks to configure a VCS repository for Terraform Cloud workspace.
resource "tfe_workspace" "example" { name = "example-workspace" organization = "my-org" vcs_repo { identifier = "[1]" branch = "[2]" } }
The identifier is the full repo path, and branch is the branch name to track.
Fill all three blanks to define a Sentinel policy resource with enforcement level and source.
resource "tfe_policy" "example" { name = "example-policy" organization = "my-org" enforcement_level = "[1]" policy = "[2]" description = "[3]" }
enforcement_level sets how strictly the policy is enforced.
policy is the Sentinel policy code as a raw string.
description explains the policy purpose.