Question 200
At Granitepoint Financial Systems, an authorized infrastructure engineering team manages a Terraform 1.12 and HCP Terraform environment. The team encounters the following situation: a team embeds cloud credentials and a provider block inside a reusable module and cannot cleanly instantiate it twice. Choose the technically best Terraform Associate 004 practice response to this particular infrastructure case. Which operational control addresses the risk long term?
Explanation
Correct Answer
Treat module portability and credential separation as design requirements. This control addresses provider configuration inside child module because module provider requirements should be separated from environment-specific provider configurations. The original implementation remedy remains: Keep provider configurations in the root and pass them to reusable child modules.
Incorrect Answers
That review protects the control associated with: Default-provider inheritance can be inappropriate when root configuration uses only aliases. It does not directly prevent the stated recurrence, which concerns: Module provider requirements should be separated from environment-specific provider configurations. The appropriate guardrail is “Treat module portability and credential separation as design requirements”.
This safeguard is for the dependency described by: Installing a provider does not itself authenticate Terraform to the external service. The continuing risk here is determined by: Module provider requirements should be separated from environment-specific provider configurations. The targeted safeguard is “Treat module portability and credential separation as design requirements”.
That review protects the control associated with: Saved Terraform plans can contain configuration and sensitive inputs even when terminal display redacts them. It does not directly prevent the stated recurrence, which concerns: Module provider requirements should be separated from environment-specific provider configurations. The appropriate guardrail is “Treat module portability and credential separation as design requirements”.