Where in your Terraform configuration do you specify a state backend?
Where in your Terraform configuration do you specify a state backend?
To specify a state backend in Terraform, you need to define it within the 'terraform' block. This is done using a nested 'backend' block inside the top-level 'terraform' block. The 'terraform' block is specifically designated for settings such as backend configuration, which determines where the state file is stored.
A is correct answer. "To configure a backend, add a nested backend block within the top-level terraform block. The following example configures the remote backend." https://www.terraform.io/language/settings/backends/configuration https://www.terraform.io/language/settings/backends/configuration#using-a-backend-block
terraform { backend "remote" { hostname = "app.terraform.io" organization = "YourOrganization" workspaces { name = "your_workspace" } } }
A. The terraform block
A is Correct Answer
terraform { backend "consul" { address = "demo.consul.io" scheme = "https" path = "example_app/terraform_state" } }
A for sure.
A is the correct ans
Tested in labs - terraform block
terraform block