Terraform Associate Exam QuestionsBrowse all questions from this exam

Terraform Associate Exam - Question 51


Where in your Terraform configuration do you specify a state backend?

Show Answer
Correct Answer: A

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.

Discussion

9 comments
Sign in to comment
EltoothOption: A
Jun 27, 2022

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

BereOption: A
Aug 7, 2023

terraform { backend "remote" { hostname = "app.terraform.io" organization = "YourOrganization" workspaces { name = "your_workspace" } } }

Zam88Option: A
Jun 19, 2022

A. The terraform block

CHRIS12722222Option: A
Jun 19, 2022

terraform block

oab720Option: A
Jan 8, 2023

Tested in labs - terraform block

Power123Option: A
Mar 30, 2023

A is the correct ans

Ni33Option: A
May 9, 2023

A for sure.

arunrkaushikOption: A
Aug 4, 2023

terraform { backend "consul" { address = "demo.consul.io" scheme = "https" path = "example_app/terraform_state" } }

debabrata6983Option: A
Aug 26, 2023

A is Correct Answer