1Z0-997-25 exam dumps

1Z0-997-25 practice question 28 of 175

Oracle Cloud Infrastructure 2025 Architect Professional. Professional level, Oracle. Free question with the correct answer and a full explanation.

1Z0-997-25 Question 28

Single answer

Your company is deploying a multi-tier web application on Oracle Cloud Infrastructure (OCI) across staging and production environments. The environment includes multiple subnets, compute instances, and a load balancer. The team has decided to use Oracle Resource Manager to deploy Terraform configurations and maintain a single source of truth in a version control system. They want to ensure that environment-specific parameters�such as instance shapes, network CIDR blocks, and compartment details�are configured properly without duplicating large portions of their Terraform code. Which approach best addresses this requirement?

  1. A

    Hardcode all environment-specific parameter values in the main Terraform configuration files.

  2. B

    Use environment-specific variable files (for example, staging.tfvars, production.tfvars) and reference them for each Resource Manager stack.

  3. C

    Create a separate Terraform module for each environment with fully independent configurations.

  4. D

    Manually override parameters during the stack creation process in the Resource Manager console.

Show answer and explanation

Correct answer: B

Explanation

Storing environment-specific parameters in separate variable (.tfvars) files and referencing them in the Oracle Resource Manager stack ensures consistent automation across different environments. This approach keeps your Terraform code DRY (Don�t Repeat Yourself) and aligns with best practices documented in Oracle� Resource Manager and Terraform guidelines, which recommend using variable files for environment-specific configurations to streamline your IaC deployments.

  • A. Incorrect.

    Option 1 is incorrect because hardcoding environment-specific values increases duplication and maintenance effort. Changing one environment might also unintentionally affect another.

  • B. Correct.

    Option 2 is correct. Using environment-specific variable files is a best practice to keep most of the code uniform while allowing each environment to override only what differs. Resource Manager supports referencing .tfvars files to customize configurations based on the environment.

  • C. Incorrect.

    Option 3 is incorrect because while separate modules for each environment can work, it often leads to significant code duplication and complicates version control. A single well-structured module shared across environments is more efficient.

  • D. Incorrect.

    Option 4 is incorrect because manually overriding parameters goes against the principle of Infrastructure as Code, making deployments less repeatable and more prone to human error.

Timed practice exam

Take a 1Z0-997-25 practice test under exam conditions

60 questions in 90 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam