1Z0-1067-25 Question 19
Select 2You are managing a multi-tier application on Oracle Cloud Infrastructure (OCI) using Terraform. The stack needs to be replicated across multiple regions and compartments without duplicating code. The team wants to maintain a single source of truth for all infrastructure definitions. Which TWO actions should you take to ensure fully replicable, consistent deployments in OCI?
- A
Implement Terraform modules and reference shared variables for region and compartment IDs
- B
Manually apply your Terraform configuration in each region, updating the state file locally for each environment
- C
Copy and paste the entire code into separate Git branches for each region, applying them independently
- D
Use OCI Resource Manager with parameterized variables and store the Terraform configuration in a central repository
Show answer and explanation
Correct answers: A, D
Explanation
For replication of infrastructure stacks in Oracle Cloud Infrastructure, it is crucial to adopt Infrastructure as Code principles consistently. Using OCI Resource Manager� centralized management of Terraform code ensures that deployments remain coherent and maintain a single source of truth. Parameterizing region and compartment IDs as variables allows you to substitute different values without duplicating your Terraform code. Refer to the official OCI Resource Manager documentation for guidance on setting up variables, modules, and storing Terraform configurations centrally.
- A. Correct.
Correct. Using modules and shared variables for region and compartment IDs avoids code duplication and allows you to swap out environment values without changing the core logic. This is a best practice supported by OCI Resource Manager and Terraform.
- B. Incorrect.
Incorrect. Manually applying the configuration in each region with unique local state can lead to inconsistencies and human error. Central or remote state management is recommended.
- C. Incorrect.
Incorrect. Cloning the entire code base for each region leads to maintenance overhead and inconsistencies. It goes against the DRY principle, making it difficult to keep environments in sync.
- D. Correct.
Correct. Oracle Resource Manager supports storing Terraform configurations centrally, and parameterizing values helps replicate the same stack across different regions and compartments securely.