Question 10
In an automated release, the requested result is to evaluate the effect of a declared change before executing it. What should the engineer select?
- Run the configuration through Terraform CLI
- Use a repeatable plan/apply cycle
- Recognize configuration modules as reusable units
- Treat the current state as a mapping, not the source code
Explanation
Correct Answer
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 evaluate the effect of a declared change before executing it. This directly supports the task to evaluate the effect of a declared change before executing it during a module implementation.
Incorrect 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 evaluate the effect of a declared change before executing it. It may support a related workflow, but the question specifically requires the mechanism for evaluate the effect of a declared change before executing it rather than translate declared intent into an execution plan and then API operations.
C: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 evaluate the effect of a declared change before executing it. 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 evaluate the effect of a declared change before executing it.
D: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 evaluate the effect of a declared change before executing it. The distinction matters here: using that mechanism to connect resource addresses to existing remote object identities would still leave the objective to evaluate the effect of a declared change before executing it unmet.
Question 11
An engineer needs to surface differences between tracked objects and their real settings as part of an automated release. Which option is the best fit?
- Use automation for repeatable deployments
- Parameterize reusable configurations
- Use pull-request review for infrastructure changes
- Reuse community or private modules thoughtfully
- Detect unintended drift during planning
Explanation
Correct Answer
E: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 surface differences between tracked objects and their real settings. This directly supports the task to surface differences between tracked objects and their real settings during an infrastructure audit.
Incorrect Answers
A: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 surface differences between tracked objects and their real settings. The distinction matters here: using that mechanism to reduce error-prone manual sequencing of the same provisioning routine would still leave the objective to surface differences between tracked objects and their real settings unmet.
B: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 surface differences between tracked objects and their real settings. It may support a related workflow, but the question specifically requires the mechanism for surface differences between tracked objects and their real settings rather than keep common infrastructure patterns consistent across environments.
C: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 surface differences between tracked objects and their real settings. The stated requirement is to surface differences between tracked objects and their real settings, not to allow peers to inspect diffs before modifying production; this alternative addresses a different control or phase.
D:A vetted module can expose supported inputs while hiding repeated implementation details; consumers must still review versions, permissions, and actual proposed changes; this behavior should be assessed against the concrete need to surface differences between tracked objects and their real settings. That can be useful when the aim is to accelerate standard designs without copy-pasting whole configurations, but it does not directly deliver the requested ability to surface differences between tracked objects and their real settings.
Question 12
An operations group needs a consistent workflow across vendor APIs. The requirement is to connect resources across platforms when an attribute creates a dependency. Which Terraform mechanism directly meets this requirement?
- Use a consistent plan-and-apply workflow across providers
- Model on-premises services with supported providers
- Coordinate dependencies rather than scripting artificial waits
- Understand limitations of cross-cloud consistency
- Reference an output from a resource managed by another provider
Explanation
Correct Answer
E: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 connect resources across platforms when an attribute creates a dependency. This directly supports the task to connect resources across platforms when an attribute creates a dependency during a planned migration.
Incorrect Answers
A: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 connect resources across platforms when an attribute creates a dependency. That can be useful when the aim is to evaluate multi-service changes with one core orchestration sequence, but it does not directly deliver the requested ability to connect resources across platforms when an attribute creates a dependency.
B: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 connect resources across platforms when an attribute creates a dependency. The distinction matters here: using that mechanism to include private infrastructure in the same IaC methodology would still leave the objective to connect resources across platforms when an attribute creates a dependency unmet.
C: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 connect resources across platforms when an attribute creates a dependency. It may support a related workflow, but the question specifically requires the mechanism for connect resources across platforms when an attribute creates a dependency rather than let Terraform order cross-provider operations through references.
D: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 connect resources across platforms when an attribute creates a dependency. The stated requirement is to connect resources across platforms when an attribute creates a dependency, not to avoid assuming different providers expose identical capabilities; this alternative addresses a different control or phase.
Question 13
A review board is defining reproducible infrastructure practices. The team must both declare infrastructure objects Terraform is expected to manage and translate declared intent into an execution plan and then API operations. Which paired choice implements those distinct goals?
- Use provider-backed resource blocks + Run the configuration through Terraform CLI
- Use provider-backed resource blocks + Describe desired infrastructure in configuration files
- Distinguish declarative from imperative scripts + Run the configuration through Terraform CLI
- Understand idempotent convergence as the target pattern + Treat the current state as a mapping, not the source code
Explanation
Correct Answer
A:For the first criterion, managed resource blocks describe objects to create, update, or remove; providers implement the remote API operations; a block alone does not create anything until execution; this behavior should be assessed against the concrete need to declare infrastructure objects Terraform is expected to manage and translate declared intent into an execution plan and then API operations; this directly addresses the need to declare infrastructure objects Terraform is expected to manage. For the separate second criterion, 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 declare infrastructure objects Terraform is expected to manage and translate declared intent into an execution plan and then API operations; this fulfills the need to translate declared intent into an execution plan and then API operations. Together they cover the independent tasks of declare infrastructure objects Terraform is expected to manage and translate declared intent into an execution plan and then API operations without exchanging the responsibilities of these features.
Incorrect Answers
B:The first measure meets the requirement to declare infrastructure objects Terraform is expected to manage, but its partner serves a different role: 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 declare infrastructure objects Terraform is expected to manage and translate declared intent into an execution plan and then API operations. That second component is designed to represent intended infrastructure as code instead of repeating GUI steps, so the still-missing criterion is to translate declared intent into an execution plan and then API operations, while the first criterion remains declare infrastructure objects Terraform is expected to manage.
C:The second measure does meet the translate declared intent into an execution plan and then API operations requirement, but the first is designed for another concern: Terraform's dependency graph determines much of the operation order from references; imperative scripts usually encode step-by-step commands without the same persistent resource-state model; this behavior should be assessed against the concrete need to declare infrastructure objects Terraform is expected to manage and translate declared intent into an execution plan and then API operations. That first component is designed to specify the end state instead of an exact sequence of shell commands, which does not accomplish the requested task to declare infrastructure objects Terraform is expected to manage, even though the other measure satisfies translate declared intent into an execution plan and then API operations.
D:The first measure is intended to avoid recreating unchanged resources on every run: 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 declare infrastructure objects Terraform is expected to manage and translate declared intent into an execution plan and then API operations. The second measure is intended to connect resource addresses to existing remote object identities: 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 declare infrastructure objects Terraform is expected to manage and translate declared intent into an execution plan and then API operations. Neither is the directly designated method for the separate goals of declare infrastructure objects Terraform is expected to manage and translate declared intent into an execution plan and then API operations in this review.
Question 14
A production service needs less configuration drift and safer changes. Two independent changes are requested: first, allow peers to inspect diffs before modifying production; second, catch configuration problems before attempting deployment. Which pair of measures fulfills both?
- Separate planning from applying + Review plan output before apply
- Parameterize reusable configurations + Run static validation in CI
- Apply consistent formatting conventions + Run static validation in CI
- Use pull-request review for infrastructure changes + Run static validation in CI
- Use pull-request review for infrastructure changes + Reuse community or private modules thoughtfully
Explanation
Correct Answer
D: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 catch configuration problems before attempting deployment; this directly addresses the need to allow peers to inspect diffs before modifying production. For the separate second criterion, 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 allow peers to inspect diffs before modifying production and catch configuration problems before attempting deployment; this fulfills the need to catch configuration problems before attempting deployment. Together they cover the independent tasks of allow peers to inspect diffs before modifying production and catch configuration problems before attempting deployment without exchanging the responsibilities of these features.
Incorrect Answers
A: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 allow peers to inspect diffs before modifying production and catch configuration problems before attempting deployment. The second measure is intended to provide a preview of proposed infrastructure modifications: 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 allow peers to inspect diffs before modifying production and catch configuration problems before attempting deployment. Neither is the directly designated method for the separate goals of allow peers to inspect diffs before modifying production and catch configuration problems before attempting deployment in this review.
B:The second measure does meet the catch configuration problems before attempting deployment requirement, but the first is designed for another concern: 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 catch configuration problems before attempting deployment. That first component is designed to keep common infrastructure patterns consistent across environments, which does not accomplish the requested task to allow peers to inspect diffs before modifying production, even though the other measure satisfies catch configuration problems before attempting deployment.
C:The second measure does meet the catch configuration problems before attempting deployment 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 catch configuration problems before attempting deployment. 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 catch configuration problems before attempting deployment.
E:The first measure meets the requirement to allow peers to inspect diffs before modifying production, but its partner serves a different role: A vetted module can expose supported inputs while hiding repeated implementation details; consumers must still review versions, permissions, and actual proposed changes; this behavior should be assessed against the concrete need to allow peers to inspect diffs before modifying production and catch configuration problems before attempting deployment. That second component is designed to accelerate standard designs without copy-pasting whole configurations, so the still-missing criterion is to catch configuration problems before attempting deployment, while the first criterion remains allow peers to inspect diffs before modifying production.
Question 15
A platform team must manage services spanning several environments. A reviewer must determine how to manage objects exposed by different service APIs through the same language. Which action is the appropriate choice?
- Model on-premises services with supported providers
- Understand limitations of cross-cloud consistency
- Use several provider plugins in one configuration
- Reference an output from a resource managed by another provider
- Use distinct provider blocks for different APIs
Explanation
Correct Answer
C: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 objects exposed by different service APIs through the same language. This directly supports the task to manage objects exposed by different service APIs through the same language during a cross-team handoff.
Incorrect Answers
A: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 objects exposed by different service APIs through the same language. The distinction matters here: using that mechanism to include private infrastructure in the same IaC methodology would still leave the objective to manage objects exposed by different service APIs through the same language unmet.
B: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 manage objects exposed by different service APIs through the same language. It may support a related workflow, but the question specifically requires the mechanism for manage objects exposed by different service APIs through the same language rather than avoid assuming different providers expose identical capabilities.
D: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 manage objects exposed by different service APIs through the same language. That can be useful when the aim is to connect resources across platforms when an attribute creates a dependency, but it does not directly deliver the requested ability to manage objects exposed by different service APIs through the same language.
E: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 objects exposed by different service APIs through the same language. The distinction matters here: using that mechanism to configure authentication and endpoints separately for each platform would still leave the objective to manage objects exposed by different service APIs through the same language unmet.
Question 16
An operations team is discussing how declared infrastructure differs from manual administration. Two independent changes are requested: first, specify the end state instead of an exact sequence of shell commands; second, evaluate the effect of a declared change before executing it. Which pair of measures fulfills both?
- Distinguish declarative from imperative scripts + Recognize provider plugins as IaC integration adapters
- Distinguish declarative from imperative scripts + Use a repeatable plan/apply cycle
- Describe desired infrastructure in configuration files + Use provider-backed resource blocks
- Commit configuration to version control + Use a repeatable plan/apply cycle
Explanation
Correct Answer
B:For the first criterion, terraform's dependency graph determines much of the operation order from references; imperative scripts usually encode step-by-step commands without the same persistent resource-state model; this behavior should be assessed against the concrete need to specify the end state instead of an exact sequence of shell commands and evaluate the effect of a declared change before executing it; this directly addresses the need to specify the end state instead of an exact sequence of shell commands. For the separate second criterion, 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 specify the end state instead of an exact sequence of shell commands and evaluate the effect of a declared change before executing it; this fulfills the need to evaluate the effect of a declared change before executing it. Together they cover the independent tasks of specify the end state instead of an exact sequence of shell commands and evaluate the effect of a declared change before executing it without exchanging the responsibilities of these features.
Incorrect Answers
A:The first measure meets the requirement to specify the end state instead of an exact sequence of shell commands, but its partner serves a different role: 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 specify the end state instead of an exact sequence of shell commands and evaluate the effect of a declared change before executing it. That second component is designed to turn service-specific API operations into Terraform resource and data types, so the still-missing criterion is to evaluate the effect of a declared change before executing it, while the first criterion remains specify the end state instead of an exact sequence of shell commands.
C:The first 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 specify the end state instead of an exact sequence of shell commands and evaluate the effect of a declared change before executing it. The second measure is intended to declare infrastructure objects Terraform is expected to manage: Managed resource blocks describe objects to create, update, or remove; providers implement the remote API operations; a block alone does not create anything until execution; this behavior should be assessed against the concrete need to specify the end state instead of an exact sequence of shell commands and evaluate the effect of a declared change before executing it. Neither is the directly designated method for the separate goals of specify the end state instead of an exact sequence of shell commands and evaluate the effect of a declared change before executing it in this review.
D:The second measure does meet the evaluate the effect of a declared change before executing it requirement, but the first is designed for another concern: 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 specify the end state instead of an exact sequence of shell commands and evaluate the effect of a declared change before executing it. That first component is designed to track proposed and approved edits to infrastructure definitions, which does not accomplish the requested task to specify the end state instead of an exact sequence of shell commands, even though the other measure satisfies evaluate the effect of a declared change before executing it.
Question 17
A team is evaluating benefits of treating platform definitions like software. A reviewer must determine how to support traceability and controlled rollback of configuration edits. Which action is the appropriate choice?
- Separate planning from applying
- Apply consistent formatting conventions
- Keep infrastructure changes in Git history
- Review plan output before apply
Explanation
Correct Answer
C: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 support traceability and controlled rollback of configuration edits. This directly supports the task to support traceability and controlled rollback of configuration edits during a cross-team handoff.
Incorrect Answers
A: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 support traceability and controlled rollback of configuration edits. The stated requirement is to support traceability and controlled rollback of configuration edits, not to add an approval point between change evaluation and execution; this alternative addresses a different control or phase.
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 support traceability and controlled rollback of configuration edits. That can be useful when the aim is to make infrastructure code easier to compare and maintain, but it does not directly deliver the requested ability to support traceability and controlled rollback of configuration edits.
D: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 support traceability and controlled rollback of configuration edits. It may support a related workflow, but the question specifically requires the mechanism for support traceability and controlled rollback of configuration edits rather than provide a preview of proposed infrastructure modifications.
Question 18
A reviewer has to approve a two-part design: avoid treating access to one environment as universal access; additionally, manage two regions or accounts of the same provider in one root module. Which option pairs the correct mechanisms?
- Understand limitations of cross-cloud consistency + Separate service-specific settings from reusable module interfaces
- Use several provider plugins in one configuration + Use provider aliases for multiple configurations of one service
- Keep credentials scoped to each provider integration + Model on-premises services with supported providers
- Keep credentials scoped to each provider integration + Use provider aliases for multiple configurations of one service
- Coordinate dependencies rather than scripting artificial waits + Use provider aliases for multiple configurations of one service
Explanation
Correct Answer
D:For the first criterion, 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 avoid treating access to one environment as universal access and manage two regions or accounts of the same provider in one root module; this directly addresses the need to avoid treating access to one environment as universal access. For the separate second 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 avoid treating access to one environment as universal access and manage two regions or accounts of the same provider in one root module; this fulfills the need to manage two regions or accounts of the same provider in one root module. Together they cover the independent tasks of avoid treating access to one environment as universal access and manage two regions or accounts of the same provider in one root module without exchanging the responsibilities of these features.
Incorrect Answers
A: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 avoid treating access to one environment as universal access and manage two regions or accounts of the same provider in one root module. The second measure is intended to reuse a pattern across environments with clearly defined input boundaries: 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 avoid treating access to one environment as universal access and manage two regions or accounts of the same provider in one root module. Neither is the directly designated method for the separate goals of avoid treating access to one environment as universal access and manage two regions or accounts of the same provider in one root module in this review.
B:The second measure does meet the manage two regions or accounts of the same provider in one root module requirement, but the first is designed for another concern: 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 treating access to one environment as universal access and manage two regions or accounts of the same provider in one root module. That first component is designed to manage objects exposed by different service APIs through the same language, which does not accomplish the requested task to avoid treating access to one environment as universal access, even though the other measure satisfies manage two regions or accounts of the same provider in one root module.
C:The first measure meets the requirement to avoid treating access to one environment as universal access, but its partner serves a different role: 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 treating access to one environment as universal access and manage two regions or accounts of the same provider in one root module. That second component is designed to include private infrastructure in the same IaC methodology, so the still-missing criterion is to manage two regions or accounts of the same provider in one root module, while the first criterion remains avoid treating access to one environment as universal access.
E:The second measure does meet the manage two regions or accounts of the same provider in one root module requirement, but the first is designed for another concern: 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 treating access to one environment as universal access and manage two regions or accounts of the same provider in one root module. That first component is designed to let Terraform order cross-provider operations through references, which does not accomplish the requested task to avoid treating access to one environment as universal access, even though the other measure satisfies manage two regions or accounts of the same provider in one root module.
Question 19
A platform group is replacing manual setup checklists. A reviewer must determine how to declare infrastructure objects Terraform is expected to manage. Which action is the appropriate choice?
- Commit configuration to version control
- Understand idempotent convergence as the target pattern
- Run the configuration through Terraform CLI
- Use provider-backed resource blocks
Explanation
Correct Answer
D:Managed resource blocks describe objects to create, update, or remove; providers implement the remote API operations; a block alone does not create anything until execution; this behavior should be assessed against the concrete need to declare infrastructure objects Terraform is expected to manage. This directly supports the task to declare infrastructure objects Terraform is expected to manage during a cross-team handoff.
Incorrect Answers
A: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 declare infrastructure objects Terraform is expected to manage. The distinction matters here: using that mechanism to track proposed and approved edits to infrastructure definitions would still leave the objective to declare infrastructure objects Terraform is expected to manage unmet.
B: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 declare infrastructure objects Terraform is expected to manage. It may support a related workflow, but the question specifically requires the mechanism for declare infrastructure objects Terraform is expected to manage rather than avoid recreating unchanged resources on every run.
C: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 declare infrastructure objects Terraform is expected to manage. The stated requirement is to declare infrastructure objects Terraform is expected to manage, not to translate declared intent into an execution plan and then API operations; this alternative addresses a different control or phase.
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.