Terraform Associate Exam QuestionsBrowse all questions from this exam

Terraform Associate Exam - Question 166


Changing the Terraform backend from the default "local" backend to a different one after doing your first terraform apply is:

Show Answer
Correct Answer: B

Changing the Terraform backend from the default 'local' backend to a different one after doing your first terraform apply is optional. While it may be necessary to re-run some commands such as 'terraform init' to validate and configure the new backend, the act of changing the backend itself is not impossible nor mandatory. It depends on the requirements of your specific use case.

Discussion

6 comments
Sign in to comment
G4ExamsOption: B
Nov 1, 2023

You can do it. Not a must. If it's useful epends on the usecase. So B.

depal_dhirOption: B
Sep 7, 2023

It is optional

keiffo2
Sep 6, 2023

It is Optional - so it's B

itsVespucci
Oct 27, 2023

its gotta be C as there will be an error. When you change a backend's configuration, you must run terraform init again to validate and configure the backend before you can perform any plans, applies, or state operations.

wanrltw
Dec 11, 2023

This has nothing to do with the question. Can you change the backend after running your first `terraform apply`? Yes, you can. Sure you'll have to run the init again but that's another story - question doesn't mention anything about "after".

adoubanOption: B
Dec 13, 2023

B. Optional , the mandatory using terraform init

szyszka
Mar 16, 2024

I think most of you misread the question. It is not about requirement of running terraform apply it is about whether it is possible to change backend after first apply command.

Paul_white
Aug 3, 2024

SO WHAT IS THE ANSWER ?