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, 2022

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

depal_dhirOption: B
Sep 7, 2022

It is optional

keiffo2Option: B
Sep 6, 2022

It is Optional - so it's B

itsVespucciOption: C
Oct 27, 2022

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, 2022

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, 2022

B. Optional , the mandatory using terraform init

szyszkaOption: C
Mar 16, 2023

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, 2023

SO WHAT IS THE ANSWER ?