What is the possibl...
 
Notifications
Clear all

What is the possible way to structure the terraform code to facilitate that?

1 Posts
1 Users
0 Likes
91 Views
(@tivisantwan)
Posts: 716
Noble Member
Topic starter
 

Your manager has instructed you to start using terraform for the entire infra provisioning of the application stack. There are 4 environments C DEV, QA, UAT, and PROD. The application team has asked for complete segregation between these environments including the backend, state, and also configurations, since there will be unique resources in different environments.

What is the possible way to structure the terraform code to facilitate that?

  • A . Completely separate the working directories, keep one for each environment. For each working directory, maintain a separate configuration file, variables file, and map to a different backend.
    B. Completely separate the working directories, keep one for each environment. For each working directory, maintain a separate configuration file, variables file, and map to the same backend.
    C. Implement terraform workspaces, and map each environment with one workspace.
    D. Enable remote backend storage. Configure 4 different backend storages, one for each environment.

Show Answer Hide Answer

Suggested Answer: A

Explanation:

In particular, organizations commonly want to create a strong separation between multiple deployments of the same infrastructure serving different development stages (e.g. staging vs. production) or different internal teams. In this case, the backend used for each deployment often belongs to that deployment, with different credentials and access controls. Named workspaces are not a suitable isolation mechanism for this scenario. https://www.terraform.io/docs/state/workspaces.html
 
Posted : 30/12/2022 7:30 pm

Latest TA-002-P V1 Dumps Valid Version

Latest And Valid Q&A | Instant Download | Once Fail, Full Refund
Share: