Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.

Unlimited Access

Get Unlimited Contributor Access to the all ExamTopics Exams!
Take advantage of PDF Files for 1000+ Exams along with community discussions and pass IT Certification Exams Easily.

Exam Terraform Associate topic 1 question 197 discussion

Actual exam question from HashiCorp's Terraform Associate
Question #: 197
Topic #: 1
[All Terraform Associate Questions]

You have some Terraform code and a variable definitions file named dev.auto.tfvars that you tested successfully in the dev environment. You want to deploy the same code in the staging environment with a separate variable definition file and a separate state file.

Which two actions should you perform? (Choose two.)

  • A. Copy the existing terraform.tfstate file and save it as staging.terraform.tfstate
  • B. Write a new staging.auto.tfvars variable definition file and run Terraform with the var-file=”staging.auto.tfvars” flag
  • C. Create a new Terraform workspace for staging
  • D. Create a new Terraform provider for staging
  • E. Add new Terraform code (*.tf files) for staging in the same directory
Show Suggested Answer Hide Answer
Suggested Answer: BC 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
7b5b962
2 weeks, 6 days ago
B. Terraform core Terraform core is responsible for reading the configuration, generating the execution plan, and applying the changes by interacting with the providers.
upvoted 1 times
...
starksolutions
7 months, 1 week ago
merci .
upvoted 1 times
...
akm_1010
10 months, 4 weeks ago
Selected Answer: BC
with a separate variable definition file :- Write a new staging.auto.tfvars variable definition file and run Terraform with the var-file=”staging.auto.tfvars” flag Want to deploy the same code in the staging environment with a separate state file :- Create a new Terraform workspace for staging. Workspaces isolate Terraform state.
upvoted 2 times
...
Ni33
1 year, 1 month ago
Selected Answer: BC
B and C are correct answers. same tfstate file can be used in multiple workspaces to provision infrastructure and each workspace has its own tfvar file matching workspace prefix.
upvoted 4 times
...
camps
1 year, 3 months ago
Selected Answer: BC
B. Write a new staging.auto.tfvars variable definition file and run Terraform with the var-file="staging.auto.tfvars" flag C. Create a new Terraform workspace for staging
upvoted 1 times
...
ozbeyucel
1 year, 4 months ago
Selected Answer: BC
......
upvoted 2 times
...
nakikoo
1 year, 5 months ago
Correct, workspace to use same .tf configuration with a different environment such as dev, prod, test, write new stage then refer the existing .tf config
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
ex Want to SAVE BIG on Certification Exam Prep?
close
ex Unlock All Exams with ExamTopics Pro 75% Off
  • arrow Choose From 1000+ Exams
  • arrow Access to 10 Exams per Month
  • arrow PDF Format Available
  • arrow Inline Discussions
  • arrow No Captcha/Robot Checks
Limited Time Offer
Ends in