Question 20
A reviewer has to approve a two-part design: make infrastructure code easier to compare and maintain; additionally, reduce error-prone manual sequencing of the same provisioning routine. Which option pairs the correct mechanisms?
- Apply consistent formatting conventions + Use pull-request review for infrastructure changes
- Apply consistent formatting conventions + Use automation for repeatable deployments
- Separate planning from applying + Detect unintended drift during planning
- Review plan output before apply + Use automation for repeatable deployments
Explanation
Correct Answer
B:For the first criterion, terraform fmt normalizes supported HCL formatting so reviews focus on meaningful edits; it changes syntax presentation, not the managed cloud resource configuration by itself; this behavior should be assessed against the concrete need to make infrastructure code easier to compare and maintain and reduce error-prone manual sequencing of the same provisioning routine; this directly addresses the need to make infrastructure code easier to compare and maintain. For the separate second criterion, a pipeline can run init, validation, planning, approvals, and apply reproducibly; it still needs secure credentials and concurrency controls; this behavior should be assessed against the concrete need to make infrastructure code easier to compare and maintain and reduce error-prone manual sequencing of the same provisioning routine; this fulfills the need to reduce error-prone manual sequencing of the same provisioning routine. Together they cover the independent tasks of make infrastructure code easier to compare and maintain and reduce error-prone manual sequencing of the same provisioning routine without exchanging the responsibilities of these features.
Incorrect Answers
A:The first measure meets the requirement to make infrastructure code easier to compare and maintain, but its partner serves a different role: Storing configuration as text enables standard code review and approval gates; a review of HCL is not a substitute for safeguarding secrets in state; this behavior should be assessed against the concrete need to make infrastructure code easier to compare and maintain and reduce error-prone manual sequencing of the same provisioning routine. That second component is designed to allow peers to inspect diffs before modifying production, so the still-missing criterion is to reduce error-prone manual sequencing of the same provisioning routine, while the first criterion remains make infrastructure code easier to compare and maintain.
C:The first measure is intended to add an approval point between change evaluation and execution: A saved execution plan can be reviewed and later applied to execute the selected actions; a saved plan may contain sensitive information and should be protected; this behavior should be assessed against the concrete need to make infrastructure code easier to compare and maintain and reduce error-prone manual sequencing of the same provisioning routine. The second measure is intended to surface differences between tracked objects and their real settings: Refreshing remote attributes during planning can reveal external edits; the desired configuration and state provide the basis for proposed remediation; this behavior should be assessed against the concrete need to make infrastructure code easier to compare and maintain and reduce error-prone manual sequencing of the same provisioning routine. Neither is the directly designated method for the separate goals of make infrastructure code easier to compare and maintain and reduce error-prone manual sequencing of the same provisioning routine in this review.
D:The second measure does meet the reduce error-prone manual sequencing of the same provisioning routine requirement, but the first is designed for another concern: The plan exposes create, update, replace, and destroy intentions before the provider APIs execute them; it reduces surprises but cannot guarantee an error-free real-world apply; this behavior should be assessed against the concrete need to make infrastructure code easier to compare and maintain and reduce error-prone manual sequencing of the same provisioning routine. That first component is designed to provide a preview of proposed infrastructure modifications, which does not accomplish the requested task to make infrastructure code easier to compare and maintain, even though the other measure satisfies reduce error-prone manual sequencing of the same provisioning routine.
Question 21
A Terraform rollout has separate acceptance criteria: configure authentication and endpoints separately for each platform and evaluate multi-service changes with one core orchestration sequence. Which combined approach directly satisfies the two criteria?
- Keep credentials scoped to each provider integration + Use a consistent plan-and-apply workflow across providers
- Use distinct provider blocks for different APIs + Use several provider plugins in one configuration
- Understand limitations of cross-cloud consistency + Use provider aliases for multiple configurations of one service
- Use distinct provider blocks for different APIs + Use a consistent plan-and-apply workflow across providers
- Model on-premises services with supported providers + Use a consistent plan-and-apply workflow across providers
Explanation
Correct Answer
D:For the first criterion, each provider configuration has its own arguments and credential mechanism; an AWS provider setting does not automatically authenticate an AzureRM provider; this behavior should be assessed against the concrete need to configure authentication and endpoints separately for each platform and evaluate multi-service changes with one core orchestration sequence; this directly addresses the need to configure authentication and endpoints separately for each platform. For the separate second criterion, terraform Core plans a graph containing resources from several provider plugins; availability, limits, and transactional guarantees remain service-specific; this behavior should be assessed against the concrete need to configure authentication and endpoints separately for each platform and evaluate multi-service changes with one core orchestration sequence; this fulfills the need to evaluate multi-service changes with one core orchestration sequence. Together they cover the independent tasks of configure authentication and endpoints separately for each platform and evaluate multi-service changes with one core orchestration sequence without exchanging the responsibilities of these features.
Incorrect Answers
A:The second measure does meet the evaluate multi-service changes with one core orchestration sequence requirement, but the first is designed for another concern: Each API requires its own authentication material and permissions; terraform does not confer cross-provider privileges simply because both resources share HCL files; this behavior should be assessed against the concrete need to configure authentication and endpoints separately for each platform and evaluate multi-service changes with one core orchestration sequence. That first component is designed to avoid treating access to one environment as universal access, which does not accomplish the requested task to configure authentication and endpoints separately for each platform, even though the other measure satisfies evaluate multi-service changes with one core orchestration sequence.
B:The first measure meets the requirement to configure authentication and endpoints separately for each platform, but its partner serves a different role: Providers implement distinct cloud, SaaS, and on-premises integrations; terraform Core coordinates the dependency graph across their managed resources; this behavior should be assessed against the concrete need to configure authentication and endpoints separately for each platform and evaluate multi-service changes with one core orchestration sequence. That second component is designed to manage objects exposed by different service APIs through the same language, so the still-missing criterion is to evaluate multi-service changes with one core orchestration sequence, while the first criterion remains configure authentication and endpoints separately for each platform.
C:The first measure is intended to avoid assuming different providers expose identical capabilities: Providers normalize lifecycle orchestration but do not erase product differences; matching resource names do not guarantee equivalent semantics or quotas; this behavior should be assessed against the concrete need to configure authentication and endpoints separately for each platform and evaluate multi-service changes with one core orchestration sequence. The second measure is intended to manage two regions or accounts of the same provider in one root module: Named provider configurations identify separate endpoints or identities; resources select the appropriate alias instead of inheriting a single default; this behavior should be assessed against the concrete need to configure authentication and endpoints separately for each platform and evaluate multi-service changes with one core orchestration sequence. Neither is the directly designated method for the separate goals of configure authentication and endpoints separately for each platform and evaluate multi-service changes with one core orchestration sequence in this review.
E:The second measure does meet the evaluate multi-service changes with one core orchestration sequence requirement, but the first is designed for another concern: Terraform's provider architecture is not limited to public clouds; a compatible provider can manage a private system if reachable and properly authorized; this behavior should be assessed against the concrete need to configure authentication and endpoints separately for each platform and evaluate multi-service changes with one core orchestration sequence. That first component is designed to include private infrastructure in the same IaC methodology, which does not accomplish the requested task to configure authentication and endpoints separately for each platform, even though the other measure satisfies evaluate multi-service changes with one core orchestration sequence.
Question 22
A reviewer has to approve a two-part design: connect resource addresses to existing remote object identities; additionally, turn service-specific API operations into Terraform resource and data types. Which option pairs the correct mechanisms?
- Treat the current state as a mapping, not the source code + Commit configuration to version control
- Treat the current state as a mapping, not the source code + Recognize provider plugins as IaC integration adapters
- Recognize configuration modules as reusable units + Describe desired infrastructure in configuration files
- Understand idempotent convergence as the target pattern + Recognize provider plugins as IaC integration adapters
Explanation
Correct Answer
B:For the first criterion, state records associations and attributes needed to reconcile real objects with configuration; configuration expresses desired intent; state is operational metadata about what Terraform currently manages; this behavior should be assessed against the concrete need to connect resource addresses to existing remote object identities and turn service-specific API operations into Terraform resource and data types; this directly addresses the need to connect resource addresses to existing remote object identities. For the separate second criterion, providers let the same language address different service APIs; terraform Core orchestrates the graph while individual plugins implement the service details; this behavior should be assessed against the concrete need to connect resource addresses to existing remote object identities and turn service-specific API operations into Terraform resource and data types; this fulfills the need to turn service-specific API operations into Terraform resource and data types. Together they cover the independent tasks of connect resource addresses to existing remote object identities and turn service-specific API operations into Terraform resource and data types without exchanging the responsibilities of these features.
Incorrect Answers
A:The first measure meets the requirement to connect resource addresses to existing remote object identities, but its partner serves a different role: A version-control repository preserves diffs, reviews, and history for code changes; it does not automatically store a trustworthy backup of runtime state; this behavior should be assessed against the concrete need to connect resource addresses to existing remote object identities and turn service-specific API operations into Terraform resource and data types. That second component is designed to track proposed and approved edits to infrastructure definitions, so the still-missing criterion is to turn service-specific API operations into Terraform resource and data types, while the first criterion remains connect resource addresses to existing remote object identities.
C:The first measure is intended to package a related group of declarative blocks behind inputs and outputs: Modules let several configurations express a consistent design without duplicating every resource declaration; a module is code organization, not a state backend; this behavior should be assessed against the concrete need to connect resource addresses to existing remote object identities and turn service-specific API operations into Terraform resource and data types. The second measure is intended to represent intended infrastructure as code instead of repeating GUI steps: A declarative configuration records a desired target state; Terraform compares that description with its state and real infrastructure before selecting changes; it is not a recording of mouse clicks; this behavior should be assessed against the concrete need to connect resource addresses to existing remote object identities and turn service-specific API operations into Terraform resource and data types. Neither is the directly designated method for the separate goals of connect resource addresses to existing remote object identities and turn service-specific API operations into Terraform resource and data types in this review.
D:The second measure does meet the turn service-specific API operations into Terraform resource and data types requirement, but the first is designed for another concern: After successful reconciliation, a subsequent plan with unchanged inputs and infrastructure normally contains no proposed changes; terraform does not blindly replay a resource-creation script; this behavior should be assessed against the concrete need to connect resource addresses to existing remote object identities and turn service-specific API operations into Terraform resource and data types. That first component is designed to avoid recreating unchanged resources on every run, which does not accomplish the requested task to connect resource addresses to existing remote object identities, even though the other measure satisfies turn service-specific API operations into Terraform resource and data types.
Question 23
In a planned migration, the requested result is to reduce error-prone manual sequencing of the same provisioning routine. What should the engineer select?
- Use pull-request review for infrastructure changes
- Apply consistent formatting conventions
- Review plan output before apply
- Use automation for repeatable deployments
Explanation
Correct Answer
D:A pipeline can run init, validation, planning, approvals, and apply reproducibly; it still needs secure credentials and concurrency controls; this behavior should be assessed against the concrete need to reduce error-prone manual sequencing of the same provisioning routine. This directly supports the task to reduce error-prone manual sequencing of the same provisioning routine during a deployment checklist.
Incorrect Answers
A:Storing configuration as text enables standard code review and approval gates; a review of HCL is not a substitute for safeguarding secrets in state; this behavior should be assessed against the concrete need to reduce error-prone manual sequencing of the same provisioning routine. The distinction matters here: using that mechanism to allow peers to inspect diffs before modifying production would still leave the objective to reduce error-prone manual sequencing of the same provisioning routine unmet.
B:terraform fmt normalizes supported HCL formatting so reviews focus on meaningful edits; it changes syntax presentation, not the managed cloud resource configuration by itself; this behavior should be assessed against the concrete need to reduce error-prone manual sequencing of the same provisioning routine. It may support a related workflow, but the question specifically requires the mechanism for reduce error-prone manual sequencing of the same provisioning routine rather than make infrastructure code easier to compare and maintain.
C:The plan exposes create, update, replace, and destroy intentions before the provider APIs execute them; it reduces surprises but cannot guarantee an error-free real-world apply; this behavior should be assessed against the concrete need to reduce error-prone manual sequencing of the same provisioning routine. The stated requirement is to reduce error-prone manual sequencing of the same provisioning routine, not to provide a preview of proposed infrastructure modifications; this alternative addresses a different control or phase.
Question 24
A platform team must manage services spanning several environments. The team must both avoid assuming different providers expose identical capabilities and let Terraform order cross-provider operations through references. Which paired choice implements those distinct goals?
- Reference an output from a resource managed by another provider + Use distinct provider blocks for different APIs
- Model on-premises services with supported providers + Coordinate dependencies rather than scripting artificial waits
- Understand limitations of cross-cloud consistency + Coordinate dependencies rather than scripting artificial waits
- Understand limitations of cross-cloud consistency + Use several provider plugins in one configuration
Explanation
Correct Answer
C:For the first criterion, providers normalize lifecycle orchestration but do not erase product differences; matching resource names do not guarantee equivalent semantics or quotas; this behavior should be assessed against the concrete need to avoid assuming different providers expose identical capabilities and let Terraform order cross-provider operations through references; this directly addresses the need to avoid assuming different providers expose identical capabilities. For the separate second criterion, references form dependency edges regardless of which provider creates the objects; an explicit dependency is needed only if no usable expression reference communicates the relationship; this behavior should be assessed against the concrete need to avoid assuming different providers expose identical capabilities and let Terraform order cross-provider operations through references; this fulfills the need to let Terraform order cross-provider operations through references. Together they cover the independent tasks of avoid assuming different providers expose identical capabilities and let Terraform order cross-provider operations through references without exchanging the responsibilities of these features.
Incorrect Answers
A:The first measure is intended to connect resources across platforms when an attribute creates a dependency: Terraform can pass an attribute produced by one provider-managed resource into another provider's argument; the reference establishes ordering even when the APIs differ; this behavior should be assessed against the concrete need to avoid assuming different providers expose identical capabilities and let Terraform order cross-provider operations through references. The second measure is intended to configure authentication and endpoints separately for each platform: Each provider configuration has its own arguments and credential mechanism; an AWS provider setting does not automatically authenticate an AzureRM provider; this behavior should be assessed against the concrete need to avoid assuming different providers expose identical capabilities and let Terraform order cross-provider operations through references. Neither is the directly designated method for the separate goals of avoid assuming different providers expose identical capabilities and let Terraform order cross-provider operations through references in this review.
B:The second measure does meet the let Terraform order cross-provider operations through references requirement, but the first is designed for another concern: Terraform's provider architecture is not limited to public clouds; a compatible provider can manage a private system if reachable and properly authorized; this behavior should be assessed against the concrete need to avoid assuming different providers expose identical capabilities and let Terraform order cross-provider operations through references. That first component is designed to include private infrastructure in the same IaC methodology, which does not accomplish the requested task to avoid assuming different providers expose identical capabilities, even though the other measure satisfies let Terraform order cross-provider operations through references.
D:The first measure meets the requirement to avoid assuming different providers expose identical capabilities, but its partner serves a different role: Providers implement distinct cloud, SaaS, and on-premises integrations; terraform Core coordinates the dependency graph across their managed resources; this behavior should be assessed against the concrete need to avoid assuming different providers expose identical capabilities and let Terraform order cross-provider operations through references. That second component is designed to manage objects exposed by different service APIs through the same language, so the still-missing criterion is to let Terraform order cross-provider operations through references, while the first criterion remains avoid assuming different providers expose identical capabilities.
Question 25
A Terraform review separates 2 requirements: (1) translate declared intent into an execution plan and then API operations; (2) connect resource addresses to existing remote object identities. Identify the two features that each directly handle one of those requirements. Choose TWO.
- Run the configuration through Terraform CLI
- Describe desired infrastructure in configuration files
- Treat the current state as a mapping, not the source code
- Recognize configuration modules as reusable units
- Commit configuration to version control
Explanation
Correct Answers
A:The CLI parses configuration, resolves dependencies, coordinates provider plugins, and tracks resource bindings through state; it does not require manually operating each provider console; this behavior should be assessed against the concrete need to translate declared intent into an execution plan and then API operations and connect resource addresses to existing remote object identities. This matches the distinct objective to translate declared intent into an execution plan and then API operations; the remaining chosen features address connect resource addresses to existing remote object identities.
C:State records associations and attributes needed to reconcile real objects with configuration; configuration expresses desired intent; state is operational metadata about what Terraform currently manages; this behavior should be assessed against the concrete need to translate declared intent into an execution plan and then API operations and connect resource addresses to existing remote object identities. This matches the distinct objective to connect resource addresses to existing remote object identities; the remaining chosen features address translate declared intent into an execution plan and then API operations.
Incorrect Answers
B:A declarative configuration records a desired target state; Terraform compares that description with its state and real infrastructure before selecting changes; it is not a recording of mouse clicks; this behavior should be assessed against the concrete need to translate declared intent into an execution plan and then API operations and connect resource addresses to existing remote object identities. Its main application is to represent intended infrastructure as code instead of repeating GUI steps; the checklist instead asks for translate declared intent into an execution plan and then API operations; and connect resource addresses to existing remote object identities. None of those distinct criteria specifically calls for this alternative.
D:Modules let several configurations express a consistent design without duplicating every resource declaration; a module is code organization, not a state backend; this behavior should be assessed against the concrete need to translate declared intent into an execution plan and then API operations and connect resource addresses to existing remote object identities. Its main application is to package a related group of declarative blocks behind inputs and outputs; the checklist instead asks for translate declared intent into an execution plan and then API operations; and connect resource addresses to existing remote object identities. None of those distinct criteria specifically calls for this alternative.
E:A version-control repository preserves diffs, reviews, and history for code changes; it does not automatically store a trustworthy backup of runtime state; this behavior should be assessed against the concrete need to translate declared intent into an execution plan and then API operations and connect resource addresses to existing remote object identities. Its main application is to track proposed and approved edits to infrastructure definitions; the checklist instead asks for translate declared intent into an execution plan and then API operations; and connect resource addresses to existing remote object identities. None of those distinct criteria specifically calls for this alternative.
Question 26
An engineer needs to add an approval point between change evaluation and execution as part of a planned migration. Which option is the best fit?
- Parameterize reusable configurations
- Keep infrastructure changes in Git history
- Separate planning from applying
- Run static validation in CI
Explanation
Correct Answer
C:A saved execution plan can be reviewed and later applied to execute the selected actions; a saved plan may contain sensitive information and should be protected; this behavior should be assessed against the concrete need to add an approval point between change evaluation and execution. This directly supports the task to add an approval point between change evaluation and execution during a maintenance request.
Incorrect Answers
A:Input variables and modules allow environment-specific values while retaining a shared design; this reduces divergence without forcing every environment to share one state file; this behavior should be assessed against the concrete need to add an approval point between change evaluation and execution. It may support a related workflow, but the question specifically requires the mechanism for add an approval point between change evaluation and execution rather than keep common infrastructure patterns consistent across environments.
B:Commits and review records identify the definition that changed and when; reverting code can propose infrastructure changes but is not an automatic full infrastructure rollback; this behavior should be assessed against the concrete need to add an approval point between change evaluation and execution. The stated requirement is to add an approval point between change evaluation and execution, not to support traceability and controlled rollback of configuration edits; this alternative addresses a different control or phase.
D:terraform validate checks structural validity and supported arguments after initialization; it does not prove a cloud API call will succeed with current credentials or quotas; this behavior should be assessed against the concrete need to add an approval point between change evaluation and execution. The distinction matters here: using that mechanism to catch configuration problems before attempting deployment would still leave the objective to add an approval point between change evaluation and execution unmet.
Question 27
A cloud architect is comparing cross-platform provisioning approaches. Two independent changes are requested: first, manage two regions or accounts of the same provider in one root module; second, reuse a pattern across environments with clearly defined input boundaries. Which pair of measures fulfills both?
- Model on-premises services with supported providers + Separate service-specific settings from reusable module interfaces
- Use provider aliases for multiple configurations of one service + Separate service-specific settings from reusable module interfaces
- Use provider aliases for multiple configurations of one service + Keep credentials scoped to each provider integration
- Use a consistent plan-and-apply workflow across providers + Coordinate dependencies rather than scripting artificial waits
Explanation
Correct Answer
B:For the first criterion, named provider configurations identify separate endpoints or identities; resources select the appropriate alias instead of inheriting a single default; this behavior should be assessed against the concrete need to manage two regions or accounts of the same provider in one root module and reuse a pattern across environments with clearly defined input boundaries; this directly addresses the need to manage two regions or accounts of the same provider in one root module. For the separate second criterion, module variables and provider configuration mapping help callers supply environment-specific choices; provider implementations still determine the resources and supported arguments; this behavior should be assessed against the concrete need to manage two regions or accounts of the same provider in one root module and reuse a pattern across environments with clearly defined input boundaries; this fulfills the need to reuse a pattern across environments with clearly defined input boundaries. Together they cover the independent tasks of manage two regions or accounts of the same provider in one root module and reuse a pattern across environments with clearly defined input boundaries without exchanging the responsibilities of these features.
Incorrect Answers
A:The second measure does meet the reuse a pattern across environments with clearly defined input boundaries requirement, but the first is designed for another concern: Terraform's provider architecture is not limited to public clouds; a compatible provider can manage a private system if reachable and properly authorized; this behavior should be assessed against the concrete need to manage two regions or accounts of the same provider in one root module and reuse a pattern across environments with clearly defined input boundaries. That first component is designed to include private infrastructure in the same IaC methodology, which does not accomplish the requested task to manage two regions or accounts of the same provider in one root module, even though the other measure satisfies reuse a pattern across environments with clearly defined input boundaries.
C:The first measure meets the requirement to manage two regions or accounts of the same provider in one root module, but its partner serves a different role: Each API requires its own authentication material and permissions; terraform does not confer cross-provider privileges simply because both resources share HCL files; this behavior should be assessed against the concrete need to manage two regions or accounts of the same provider in one root module and reuse a pattern across environments with clearly defined input boundaries. That second component is designed to avoid treating access to one environment as universal access, so the still-missing criterion is to reuse a pattern across environments with clearly defined input boundaries, while the first criterion remains manage two regions or accounts of the same provider in one root module.
D:The first measure is intended to evaluate multi-service changes with one core orchestration sequence: Terraform Core plans a graph containing resources from several provider plugins; availability, limits, and transactional guarantees remain service-specific; this behavior should be assessed against the concrete need to manage two regions or accounts of the same provider in one root module and reuse a pattern across environments with clearly defined input boundaries. The second measure is intended to let Terraform order cross-provider operations through references: References form dependency edges regardless of which provider creates the objects; an explicit dependency is needed only if no usable expression reference communicates the relationship; this behavior should be assessed against the concrete need to manage two regions or accounts of the same provider in one root module and reuse a pattern across environments with clearly defined input boundaries. Neither is the directly designated method for the separate goals of manage two regions or accounts of the same provider in one root module and reuse a pattern across environments with clearly defined input boundaries in this review.
Question 28
An engineer needs to represent intended infrastructure as code instead of repeating GUI steps as part of a planned migration. Which option is the best fit?
- Recognize configuration modules as reusable units
- Use a repeatable plan/apply cycle
- Describe desired infrastructure in configuration files
- Run the configuration through Terraform CLI
Explanation
Correct Answer
C:A declarative configuration records a desired target state; Terraform compares that description with its state and real infrastructure before selecting changes; it is not a recording of mouse clicks; this behavior should be assessed against the concrete need to represent intended infrastructure as code instead of repeating GUI steps. This directly supports the task to represent intended infrastructure as code instead of repeating GUI steps during a maintenance request.
Incorrect Answers
A:Modules let several configurations express a consistent design without duplicating every resource declaration; a module is code organization, not a state backend; this behavior should be assessed against the concrete need to represent intended infrastructure as code instead of repeating GUI steps. That can be useful when the aim is to package a related group of declarative blocks behind inputs and outputs, but it does not directly deliver the requested ability to represent intended infrastructure as code instead of repeating GUI steps.
B:Planning previews Terraform's proposed actions while applying realizes them through providers; neither step is the same as manually editing infrastructure in a browser; this behavior should be assessed against the concrete need to represent intended infrastructure as code instead of repeating GUI steps. The distinction matters here: using that mechanism to evaluate the effect of a declared change before executing it would still leave the objective to represent intended infrastructure as code instead of repeating GUI steps unmet.
D:The CLI parses configuration, resolves dependencies, coordinates provider plugins, and tracks resource bindings through state; it does not require manually operating each provider console; this behavior should be assessed against the concrete need to represent intended infrastructure as code instead of repeating GUI steps. The stated requirement is to represent intended infrastructure as code instead of repeating GUI steps, not to translate declared intent into an execution plan and then API operations; this alternative addresses a different control or phase.
Question 29
An infrastructure lead is planning an auditable delivery process. Two independent changes are requested: first, allow peers to inspect diffs before modifying production; second, surface differences between tracked objects and their real settings. Which pair of measures fulfills both?
- Use automation for repeatable deployments + Parameterize reusable configurations
- Apply consistent formatting conventions + Detect unintended drift during planning
- Use pull-request review for infrastructure changes + Detect unintended drift during planning
- Use pull-request review for infrastructure changes + Keep infrastructure changes in Git history
Explanation
Correct Answer
C:For the first criterion, storing configuration as text enables standard code review and approval gates; a review of HCL is not a substitute for safeguarding secrets in state; this behavior should be assessed against the concrete need to allow peers to inspect diffs before modifying production and surface differences between tracked objects and their real settings; this directly addresses the need to allow peers to inspect diffs before modifying production. For the separate second criterion, refreshing remote attributes during planning can reveal external edits; the desired configuration and state provide the basis for proposed remediation; this behavior should be assessed against the concrete need to allow peers to inspect diffs before modifying production and surface differences between tracked objects and their real settings; this fulfills the need to surface differences between tracked objects and their real settings. Together they cover the independent tasks of allow peers to inspect diffs before modifying production and surface differences between tracked objects and their real settings without exchanging the responsibilities of these features.
Incorrect Answers
A:The first measure is intended to reduce error-prone manual sequencing of the same provisioning routine: A pipeline can run init, validation, planning, approvals, and apply reproducibly; it still needs secure credentials and concurrency controls; this behavior should be assessed against the concrete need to allow peers to inspect diffs before modifying production and surface differences between tracked objects and their real settings. The second measure is intended to keep common infrastructure patterns consistent across environments: Input variables and modules allow environment-specific values while retaining a shared design; this reduces divergence without forcing every environment to share one state file; this behavior should be assessed against the concrete need to allow peers to inspect diffs before modifying production and surface differences between tracked objects and their real settings. Neither is the directly designated method for the separate goals of allow peers to inspect diffs before modifying production and surface differences between tracked objects and their real settings in this review.
B:The second measure does meet the surface differences between tracked objects and their real settings requirement, but the first is designed for another concern: terraform fmt normalizes supported HCL formatting so reviews focus on meaningful edits; it changes syntax presentation, not the managed cloud resource configuration by itself; this behavior should be assessed against the concrete need to allow peers to inspect diffs before modifying production and surface differences between tracked objects and their real settings. That first component is designed to make infrastructure code easier to compare and maintain, which does not accomplish the requested task to allow peers to inspect diffs before modifying production, even though the other measure satisfies surface differences between tracked objects and their real settings.
D:The first measure meets the requirement to allow peers to inspect diffs before modifying production, but its partner serves a different role: Commits and review records identify the definition that changed and when; reverting code can propose infrastructure changes but is not an automatic full infrastructure rollback; this behavior should be assessed against the concrete need to allow peers to inspect diffs before modifying production and surface differences between tracked objects and their real settings. That second component is designed to support traceability and controlled rollback of configuration edits, so the still-missing criterion is to surface differences between tracked objects and their real settings, while the first criterion remains allow peers to inspect diffs before modifying production.
Question 30
An operations group needs a consistent workflow across vendor APIs. A reviewer must determine how to manage two regions or accounts of the same provider in one root module. Which action is the appropriate choice?
- Use several provider plugins in one configuration
- Use a consistent plan-and-apply workflow across providers
- Use provider aliases for multiple configurations of one service
- Use distinct provider blocks for different APIs
Explanation
Correct Answer
C:Named provider configurations identify separate endpoints or identities; resources select the appropriate alias instead of inheriting a single default; this behavior should be assessed against the concrete need to manage two regions or accounts of the same provider in one root module. This directly supports the task to manage two regions or accounts of the same provider in one root module during a staged rollout.
Incorrect Answers
A:Providers implement distinct cloud, SaaS, and on-premises integrations; terraform Core coordinates the dependency graph across their managed resources; this behavior should be assessed against the concrete need to manage two regions or accounts of the same provider in one root module. It may support a related workflow, but the question specifically requires the mechanism for manage two regions or accounts of the same provider in one root module rather than manage objects exposed by different service APIs through the same language.
B:Terraform Core plans a graph containing resources from several provider plugins; availability, limits, and transactional guarantees remain service-specific; this behavior should be assessed against the concrete need to manage two regions or accounts of the same provider in one root module. The stated requirement is to manage two regions or accounts of the same provider in one root module, not to evaluate multi-service changes with one core orchestration sequence; this alternative addresses a different control or phase.
D:Each provider configuration has its own arguments and credential mechanism; an AWS provider setting does not automatically authenticate an AzureRM provider; this behavior should be assessed against the concrete need to manage two regions or accounts of the same provider in one root module. The distinction matters here: using that mechanism to configure authentication and endpoints separately for each platform would still leave the objective to manage two regions or accounts of the same provider in one root module unmet.