1Z0-1067-25 Question 31
Select 2Your team manages an application across multiple environments (development, staging, and production) in Oracle Cloud Infrastructure (OCI). You use a configuration management tool (such as Terraform) to define the infrastructure for all three environments. You need to ensure that each environment is configured consistently but also want to reduce the risk of accidental changes in production. Which two practices are best suited to achieve these goals?
- A
A. Maintain separate workspaces (or state files) for each environment, running the plan and apply steps individually for every environment.
- B
B. Use a single workspace and apply the same plan across development, staging, and production without changing variables.
- C
C. Store and manage environment-specific variables (such as passwords or database URLs) in a secure vault or encrypted parameter store.
- D
D. Manually edit the Terraform configuration each time you switch from one environment to another.
Show answer and explanation
Correct answers: A, C
Explanation
Separating state or workspaces and securely managing environment-specific variables are considered best practices when using a configuration management tool on OCI. By isolating environments and keeping sensitive information out of plain-text configuration files, you minimize risks and maintain consistent deployments. Refer to Oracle documentation on 'Managing Terraform Configurations' and secure vault solutions for more details on recommended practices.
- A. Correct.
Option A: CORRECT. Maintaining separate workspaces (or separate state files) isolates changes by environment. This prevents updates intended for one environment from affecting another, reducing the chance of inadvertent production changes.
- B. Incorrect.
Option B: INCORRECT. Applying the same plan in a single workspace for all environments (without adjusting variables) can lead to overwriting environment-specific settings and major configuration drift issues.
- C. Correct.
Option C: CORRECT. Storing environment-specific variables (such as passwords, secrets, or database endpoints) in a secure vault or encrypted parameter store ensures that sensitive values are managed centrally, reduces security risks, and keeps configurations consistent.
- D. Incorrect.
Option D: INCORRECT. Manually editing the Terraform configuration each time you switch environments is error-prone and can lead to unintended modifications. Automated processes and parameterization are more reliable.