Oracle Cloud Infrastructure 2021 Multicloud Architect Associate — Question 5
You are working as a Cloud Operations Administrator for your company. They have different Oracle Cloud Infrastructure (OCI) tenancies for development and production workloads. Each tenancy has resources in two regions `" uk-london-1 and eu-frankfurt-1. You are asked to manage all resources and to automate all the tasks using OCI Command Line Interface (CLI).
Which is the most efficient method to manage multiple environments using OCI CLI? (Choose the best answer.)
Answer options
- A. Use OCI CLI profiles to create multiple sets of credentials in your config file, and reference the appropriate profile at runtime.
- B. Create environment variables for the sets of credentials that align to each combination of tenancy, region, and environment.
- C. Run oci setup config to create new credentials for each environment every time you want to access the environment.
- D. Use different bash terminals for each environment.
Correct answer: B
Explanation
The correct answer is B because setting up environment variables allows you to easily switch between different credentials without modifying the config file each time, thereby streamlining your workflow. Option A is less efficient as it requires manual profile selection, while C involves unnecessary overhead by recreating credentials repeatedly. Option D is impractical as it complicates management and doesn't leverage automation effectively.