1Z0-997-25 exam dumps

1Z0-997-25 practice question 26 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 26

Select 2

You are tasked with creating an automated pipeline to provision multiple Compute instances in Oracle Cloud Infrastructure (OCI). Each instance must be deployed into separate dev, test, and production compartments, with unique instance shapes and consistent resource naming. Your team wants to minimize manual changes when switching between environments while maintaining a single source of truth for all configurations. Which two approaches would best ensure consistent, automated provisioning across all environments?

  1. A

    Store all Terraform state locally to prevent remote access and simplify environment switching.

  2. B

    Use Terraform modules for reusability and maintain environment-specific variables in separate files.

  3. C

    Manually run terraform apply for each environment to avoid confusion from automated pipelines.

  4. D

    Apply Oracle Cloud Infrastructure Resource Manager with separate stacks and select the relevant variables or configurations for each environment.

  5. E

    Use a single monolithic Terraform file that hard-codes compartment and shape details for every environment.

Show answer and explanation

Correct answers: B, D

Explanation

Using Terraform modules with environment-specific variables (Option 2) and leveraging Oracle Cloud Infrastructure Resource Manager to store configurations and state (Option 4) are well-established best practices. These methods reduce human error, promote code reuse across environments, and enable robust automated pipelines. Refer to OCI Resource Manager documentation and best practices in Terraform for writing modular, environment-agnostic configurations (https://docs.oracle.com/en-us/iaas/Content/ResourceManager/home.htm).

  • A. Incorrect.

    Option 1: Incorrect. Storing Terraform state locally can complicate team collaboration and create risks in multi-user environments. Remote state storage or using Oracle Resource Manager (which handles state on the backend) is generally recommended for shared pipelines.

  • B. Correct.

    Option 2: Correct. Terraform modules help you define reusable code blocks, ensuring consistency in naming and configurations across different environments. Keeping environment-specific variables in separate files allows you to reference them conditionally or via a pipeline, reducing duplication and manual edits.

  • C. Incorrect.

    Option 3: Incorrect. Manually running terraform apply for each environment introduces a risk of human error and undermines the goal of an automated pipeline. While it may work in simple scenarios, it is not the best practice for enterprise-level Infrastructure as Code implementations.

  • D. Correct.

    Option 4: Correct. Oracle Cloud Infrastructure Resource Manager can store your Terraform configuration and state remotely. By creating separate stacks or using stack variables, you can manage dev, test, and production deployments more safely and consistently, without manually changing Terraform files for each environment.

  • E. Incorrect.

    Option 5: Incorrect. Hard-coding compartment IDs and instance shapes in a single file for every environment leads to code duplication and manual overhead. It also makes it difficult to scale or adapt configurations when new environments are added.

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