HashiCorp Terraform Associate 004 Practice Test 39
Question 380
During a cross-platform infrastructure standardization exercise, the following condition occurs: A risky network change is applied immediately through a console even though a routine maintenance window requires estimating resource replacements first. The decision must preserve ownership and minimize undocumented changes. What targeted engineering response should the team implement?
- Require reviewed Terraform commits and corresponding plan evidence for production changes rather than console-only alterations.
- Configure separate authorized providers and identities for the hybrid environments while retaining a shared desired-state workflow.
- Use the relevant approved providers in Terraform and define cross-service references through managed configuration outputs or values.
- Run a reviewed Terraform plan before application, investigate unexpected replacements, and require appropriate authorization.
Explanation
Correct Answer
D:Run a reviewed Terraform plan before application, investigate unexpected replacements, and require appropriate authorization. Plan review helps forecast proposed infrastructure changes, though unknown provider values and external drift can still affect final outcomes. Confirm the cause with: Inspect whether the deployment process captures a proposed execution plan and identifies create, update, delete, and replacement actions. A concrete acceptance test is: An unanticipated deletion or replacement is identified and blocked before a privileged apply can execute it.
Incorrect Answers
A:Require reviewed Terraform commits and corresponding plan evidence for production changes rather than console-only alterations. This could address version-controlled iac change auditing, but it does not correct the indicated terraform plan review as change safety barrier mechanism. The relevant fix is: Run a reviewed Terraform plan before application, investigate unexpected replacements, and require appropriate authorization.
B:Configure separate authorized providers and identities for the hybrid environments while retaining a shared desired-state workflow. This could address hybrid cloud workflow with distinct provider credentials, but it does not correct the indicated terraform plan review as change safety barrier mechanism. The relevant fix is: Run a reviewed Terraform plan before application, investigate unexpected replacements, and require appropriate authorization.
C:Use the relevant approved providers in Terraform and define cross-service references through managed configuration outputs or values. This could address multi-cloud providers under one terraform workflow, but it does not correct the indicated terraform plan review as change safety barrier mechanism. The relevant fix is: Run a reviewed Terraform plan before application, investigate unexpected replacements, and require appropriate authorization.
Question 381
During a separate-region Terraform rollout in an approved staging account, the following condition occurs: An inherited Terraform configuration references a provider without declaring its registry source, so a team cannot reliably establish which plugin will manage resources. The configuration should behave consistently without broadening access. Which proposed remediation solves this failure without masking its cause?
- Declare the provider's correct registry source and compatible version constraint in required_providers, then initialize again.
- Keep provider source and version in required_providers and configure authentication via supported provider settings or short-lived environment credentials.
- Install and configure the appropriate provider through terraform init so Terraform can use its resource and data source implementations.
- Review the upgrade impact and run terraform init -upgrade intentionally, then commit the updated lock selection after validation.
Explanation
Correct Answer
A:Declare the provider's correct registry source and compatible version constraint in required_providers, then initialize again. The required_providers mapping identifies the plugin source and compatibility constraint, separate from provider authentication settings. Confirm the cause with: Review required_providers declarations, provider source addresses, existing lock entries, and initialization output. A concrete acceptance test is: Terraform resolves the intended plugin source consistently instead of relying on historical default namespace guesses. This matters here because during a separate-region Terraform rollout in an approved staging account, the following condition occurs: An….
Incorrect Answers
B:Keep provider source and version in required_providers and configure authentication via supported provider settings or short-lived environment credentials. This could address provider block credentials versus required_providers, but it does not correct the indicated provider source requirement declaration mechanism. The relevant fix is: Declare the provider's correct registry source and compatible version constraint in required_providers, then initialize again.
C:Install and configure the appropriate provider through terraform init so Terraform can use its resource and data source implementations. This could address provider plugin manages api resources and data reads, but it does not correct the indicated provider source requirement declaration mechanism. The relevant fix is: Declare the provider's correct registry source and compatible version constraint in required_providers, then initialize again. This matters here because during a separate-region Terraform rollout in an approved staging account, the following condition occurs: An….
D:Review the upgrade impact and run terraform init -upgrade intentionally, then commit the updated lock selection after validation. This could address controlled provider upgrade using init upgrade, but it does not correct the indicated provider source requirement declaration mechanism. The relevant fix is: Declare the provider's correct registry source and compatible version constraint in required_providers, then initialize again.
Question 382
While migrating a manually maintained development environment into reviewed Terraform configuration, the following condition occurs: Two automation systems both change the same cloud storage policy, and repeated Terraform applies continuously undo the other controller's modifications. The team must establish a reproducible and auditable infrastructure change. Which TWO options together provide the relevant diagnosis and its targeted remediation? Select TWO.
- Inspect provider source requirements, authentication scopes, and whether the on-premises and hosted platforms expose different APIs.
- Use the relevant approved providers in Terraform and define cross-service references through managed configuration outputs or values.
- Identify which attributes Terraform declares and which external system writes to the same managed object between runs.
- Express the intended resources in Terraform configuration and review its generated plan before applying a consistent desired state.
- Assign authoritative ownership to one control plane or explicitly divide attribute responsibility using supported lifecycle practices.
Explanation
Correct Answers
C:Identify which attributes Terraform declares and which external system writes to the same managed object between runs. Declarative reconciliation requires a clear ownership contract; competing controllers can create perpetual drift. A justified correction is: Assign authoritative ownership to one control plane or explicitly divide attribute responsibility using supported lifecycle practices. This forms one element of the required two-step diagnosis and correction. This matters here because while migrating a manually maintained development environment into reviewed Terraform configuration, the following….
E:Assign authoritative ownership to one control plane or explicitly divide attribute responsibility using supported lifecycle practices. Declarative reconciliation requires a clear ownership contract; competing controllers can create perpetual drift. Confirm the cause with: Identify which attributes Terraform declares and which external system writes to the same managed object between runs. A concrete acceptance test is: A series of Terraform plans remains stable after independent automation without oscillating policy settings between tools. This forms one element of the required two-step diagnosis and correction. This matters here because while migrating a manually maintained development environment into reviewed Terraform configuration, the following….
Incorrect Answers
A:Inspect provider source requirements, authentication scopes, and whether the on-premises and hosted platforms expose different APIs. This relates to hybrid cloud workflow with distinct provider credentials rather than the matching diagnosis-and-remediation pair required here. Check: Identify which attributes Terraform declares and which external system writes to the same managed object between runs. Then change: Assign authoritative ownership to one control plane or explicitly divide attribute responsibility using supported lifecycle practices.
B:Use the relevant approved providers in Terraform and define cross-service references through managed configuration outputs or values. This relates to multi-cloud providers under one terraform workflow rather than the matching diagnosis-and-remediation pair required here. Check: Identify which attributes Terraform declares and which external system writes to the same managed object between runs. Then change: Assign authoritative ownership to one control plane or explicitly divide attribute responsibility using supported lifecycle practices.
D:Express the intended resources in Terraform configuration and review its generated plan before applying a consistent desired state. This relates to declarative desired state versus imperative console runbook rather than the matching diagnosis-and-remediation pair required here. Check: Identify which attributes Terraform declares and which external system writes to the same managed object between runs. Then change: Assign authoritative ownership to one control plane or explicitly divide attribute responsibility using supported lifecycle practices.
Question 383
As the deployment team prepares a reviewed Terraform CLI change, the following condition occurs: A Terraform project passes terraform validate, and a team assumes production create permissions and resource quotas are therefore confirmed. The change must preserve the distinction between previewing and modifying infrastructure. Select TWO: the decisive first check and the change that directly addresses the problem.
- Inspect whether the approved artifact was produced by terraform plan -out and whether apply consumes exactly that plan artifact.
- Use terraform validate to identify the invalid reference, correct the spelling, and rerun validation before planning.
- Reformat the affected .tf files using terraform fmt and rerun both style checking and validation independently.
- Differentiate static schema/reference checks in validation from provider API checks and actual permissions during plan and apply.
- Use terraform validate to catch configuration errors and separately run plan or controlled provider checks to assess remote feasibility.
Explanation
Correct Answers
D:Differentiate static schema/reference checks in validation from provider API checks and actual permissions during plan and apply. Terraform validate checks internal configuration validity, not complete remote authorization, quota availability, or deployment success. A justified correction is: Use terraform validate to catch configuration errors and separately run plan or controlled provider checks to assess remote feasibility. This forms one element of the required two-step diagnosis and correction.
E:Use terraform validate to catch configuration errors and separately run plan or controlled provider checks to assess remote feasibility. Terraform validate checks internal configuration validity, not complete remote authorization, quota availability, or deployment success. Confirm the cause with: Differentiate static schema/reference checks in validation from provider API checks and actual permissions during plan and apply. A concrete acceptance test is: Syntax mistakes fail validation while missing remote permission surfaces through its appropriate API interaction rather than being falsely certified. This forms one element of the required two-step diagnosis and correction.
Incorrect Answers
A:Inspect whether the approved artifact was produced by terraform plan -out and whether apply consumes exactly that plan artifact. This relates to saved execution plan for controlled deployment rather than the matching diagnosis-and-remediation pair required here. Check: Differentiate static schema/reference checks in validation from provider API checks and actual permissions during plan and apply. Then change: Use terraform validate to catch configuration errors and separately run plan or controlled provider checks to assess remote feasibility.
B:Use terraform validate to identify the invalid reference, correct the spelling, and rerun validation before planning. This relates to terraform validate catches undeclared reference rather than the matching diagnosis-and-remediation pair required here. Check: Differentiate static schema/reference checks in validation from provider API checks and actual permissions during plan and apply. Then change: Use terraform validate to catch configuration errors and separately run plan or controlled provider checks to assess remote feasibility.
C:Reformat the affected.tf files using terraform fmt and rerun both style checking and validation independently. This relates to ci terraform fmt check distinguishes style from validity rather than the matching diagnosis-and-remediation pair required here. Check: Differentiate static schema/reference checks in validation from provider API checks and actual permissions during plan and apply. Then change: Use terraform validate to catch configuration errors and separately run plan or controlled provider checks to assess remote feasibility.
Question 384
During a controlled module integration test for a production Terraform stack, the following condition occurs: A Terraform module copies a long-lived API token directly into a committed .tf file so an infrastructure deployment can authenticate to an external service. The desired fix must avoid unrelated resource changes. What measurable postchange observation would confirm that the correction worked?
- A controlled Terraform operation can authenticate using the short-lived token while its value is omitted from plan and state artifacts.
- Terraform builds the dependency edge and provisions the subnet before the dependent server without manual delays.
- Routine Terraform output suppresses the marked secret while protected state access remains restricted.
- The module applies under least privilege without retaining the secret in source control or ordinary state output.
Explanation
Correct Answer
D:The module applies under least privilege without retaining the secret in source control or ordinary state output. Secrets management separates credential issuance from infrastructure definitions; committed passwords remain exposed even if displayed as sensitive. It tests the correction: Rotate the exposed token and retrieve needed credentials through an approved Vault-based ephemeral or runtime authentication flow. This matters here because during a controlled module integration test for a production Terraform stack, the following condition occurs: A….
Incorrect Answers
A:A controlled Terraform operation can authenticate using the short-lived token while its value is omitted from plan and state artifacts. This might validate ephemeral variable for short-lived token in terraform 1.12, but it does not prove that vault credential lookup without hardcoding secret values was resolved. Confirm instead: The module applies under least privilege without retaining the secret in source control or ordinary state output. This matters here because during a controlled module integration test for a production Terraform stack, the following condition occurs: A….
B:Terraform builds the dependency edge and provisions the subnet before the dependent server without manual delays. This might validate implicit dependency through resource attribute reference, but it does not prove that vault credential lookup without hardcoding secret values was resolved. Confirm instead: The module applies under least privilege without retaining the secret in source control or ordinary state output.
C:Routine Terraform output suppresses the marked secret while protected state access remains restricted. This might validate sensitive output display behavior, but it does not prove that vault credential lookup without hardcoding secret values was resolved. Confirm instead: The module applies under least privilege without retaining the secret in source control or ordinary state output.
Question 385
While migrating a manually maintained development environment into reviewed Terraform configuration, the following condition occurs: A risky network change is applied immediately through a console even though a routine maintenance window requires estimating resource replacements first. The team must establish a reproducible and auditable infrastructure change. What measurable postchange observation would confirm that the correction worked?
- An unanticipated deletion or replacement is identified and blocked before a privileged apply can execute it.
- An auditor can identify the approved commit and plan that caused a deliberate infrastructure capacity change.
- Reviewers can trace a proposed firewall change to an audited configuration diff and plan before any infrastructure changes.
- A plan can cover both managed targets while each provider operates only within its authorized platform and permissions.
Explanation
Correct Answer
A:An unanticipated deletion or replacement is identified and blocked before a privileged apply can execute it. Plan review helps forecast proposed infrastructure changes, though unknown provider values and external drift can still affect final outcomes. It tests the correction: Run a reviewed Terraform plan before application, investigate unexpected replacements, and require appropriate authorization. This matters here because while migrating a manually maintained development environment into reviewed Terraform configuration, the following….
Incorrect Answers
B:An auditor can identify the approved commit and plan that caused a deliberate infrastructure capacity change. This might validate version-controlled iac change auditing, but it does not prove that terraform plan review as change safety barrier was resolved. Confirm instead: An unanticipated deletion or replacement is identified and blocked before a privileged apply can execute it. This matters here because while migrating a manually maintained development environment into reviewed Terraform configuration, the following….
C:Reviewers can trace a proposed firewall change to an audited configuration diff and plan before any infrastructure changes. This might validate terraform configuration as reviewable infrastructure specification, but it does not prove that terraform plan review as change safety barrier was resolved. Confirm instead: An unanticipated deletion or replacement is identified and blocked before a privileged apply can execute it.
D:A plan can cover both managed targets while each provider operates only within its authorized platform and permissions. This might validate hybrid cloud workflow with distinct provider credentials, but it does not prove that terraform plan review as change safety barrier was resolved. Confirm instead: An unanticipated deletion or replacement is identified and blocked before a privileged apply can execute it. This matters here because while migrating a manually maintained development environment into reviewed Terraform configuration, the following….
Question 386
During an operational review of a Terraform state backend, the following condition occurs: A project stores a state file in a developer's home directory even though multiple engineers need consistent shared planning and state history. The team must preserve managed-object identity and safe collaboration. Which TWO complementary choices identify the cause and implement the appropriate fix? Select TWO.
- Inspect the selected terraform workspace and the backend's paths used for nondefault workspace state.
- Use terraform force-unlock only after confirming the lock is stale and specifying its correct lock ID.
- Use the backend's supported environment or short-lived credential mechanism instead of hardcoding secrets into backend configuration.
- Inspect the current terraform backend declaration and permissions for the selected shared backend service.
- Declare a supported backend block with a reviewed storage location, then initialize and migrate state under controlled conditions.
Explanation
Correct Answers
D:Inspect the current terraform backend declaration and permissions for the selected shared backend service. Terraform backend configuration selects where state snapshots are stored; migrating them requires careful initialization and authorization. A justified correction is: Declare a supported backend block with a reviewed storage location, then initialize and migrate state under controlled conditions. This forms one element of the required two-step diagnosis and correction. This matters here because a project stores a state file in a developer's home directory even though multiple engineers need consistent shared….
E:Declare a supported backend block with a reviewed storage location, then initialize and migrate state under controlled conditions. Terraform backend configuration selects where state snapshots are stored; migrating them requires careful initialization and authorization. Confirm the cause with: Inspect the current terraform backend declaration and permissions for the selected shared backend service. A concrete acceptance test is: Team plans use the same access-controlled state backend after migration without duplicating existing managed objects. This forms one element of the required two-step diagnosis and correction. This matters here because a project stores a state file in a developer's home directory even though multiple engineers need consistent shared….
Incorrect Answers
A:Inspect the selected terraform workspace and the backend's paths used for nondefault workspace state. This relates to local workspace state separation rather than the matching diagnosis-and-remediation pair required here. Check: Inspect the current terraform backend declaration and permissions for the selected shared backend service. Then change: Declare a supported backend block with a reviewed storage location, then initialize and migrate state under controlled conditions.
B:Use terraform force-unlock only after confirming the lock is stale and specifying its correct lock ID. This relates to force unlock requires stale-lock verification rather than the matching diagnosis-and-remediation pair required here. Check: Inspect the current terraform backend declaration and permissions for the selected shared backend service. Then change: Declare a supported backend block with a reviewed storage location, then initialize and migrate state under controlled conditions.
C:Use the backend's supported environment or short-lived credential mechanism instead of hardcoding secrets into backend configuration. This relates to backend credentials kept out of plan artifacts rather than the matching diagnosis-and-remediation pair required here. Check: Inspect the current terraform backend declaration and permissions for the selected shared backend service. Then change: Declare a supported backend block with a reviewed storage location, then initialize and migrate state under controlled conditions.
Question 387
During a cross-platform infrastructure standardization exercise, the following condition occurs: Three product teams rebuild nearly identical staging networks by copying browser instructions, but naming and access rules diverge by team. The decision must preserve ownership and minimize undocumented changes. Which Terraform configuration or workflow change most directly corrects the described issue?
- Run a reviewed Terraform plan before application, investigate unexpected replacements, and require appropriate authorization.
- Use the relevant approved providers in Terraform and define cross-service references through managed configuration outputs or values.
- Express the intended resources in Terraform configuration and review its generated plan before applying a consistent desired state.
- Use reusable Terraform modules and explicit environment inputs to encode shared rules while allowing reviewed differences.
Explanation
Correct Answer
D:Use reusable Terraform modules and explicit environment inputs to encode shared rules while allowing reviewed differences. Shared IaC patterns reduce accidental divergence without requiring every environment to have identical parameters. Confirm the cause with: Compare repeated environment requirements against current configuration differences and find parameters that should vary intentionally. A concrete acceptance test is: New staging environments satisfy common access requirements while explicit input values account for documented environment differences.
Incorrect Answers
A:Run a reviewed Terraform plan before application, investigate unexpected replacements, and require appropriate authorization. This could address terraform plan review as change safety barrier, but it does not correct the indicated reusable environment definitions and reduced configuration drift mechanism. The relevant fix is: Use reusable Terraform modules and explicit environment inputs to encode shared rules while allowing reviewed differences.
B:Use the relevant approved providers in Terraform and define cross-service references through managed configuration outputs or values. This could address multi-cloud providers under one terraform workflow, but it does not correct the indicated reusable environment definitions and reduced configuration drift mechanism. The relevant fix is: Use reusable Terraform modules and explicit environment inputs to encode shared rules while allowing reviewed differences.
C:Express the intended resources in Terraform configuration and review its generated plan before applying a consistent desired state. This could address declarative desired state versus imperative console runbook, but it does not correct the indicated reusable environment definitions and reduced configuration drift mechanism. The relevant fix is: Use reusable Terraform modules and explicit environment inputs to encode shared rules while allowing reviewed differences.
Question 388
As the deployment team prepares a reviewed Terraform CLI change, the following condition occurs: A Terraform configuration refers to var.enviroment with a typo although only variable environment was declared, and teammates hope formatting will catch it. The change must preserve the distinction between previewing and modifying infrastructure. Which diagnostic check provides the strongest evidence for the underlying problem?
- Inspect Terraform diagnostic output for undeclared input references and compare declared variable names to expressions.
- Differentiate static schema/reference checks in validation from provider API checks and actual permissions during plan and apply.
- Inspect whether the approved artifact was produced by terraform plan -out and whether apply consumes exactly that plan artifact.
- Inspect the current HCL formatting and whether a standard terraform fmt check flags style-only differences.
Explanation
Correct Answer
A:Inspect Terraform diagnostic output for undeclared input references and compare declared variable names to expressions. Formatting changes whitespace and indentation; static validation identifies invalid references and configuration structure. A justified correction is: Use terraform validate to identify the invalid reference, correct the spelling, and rerun validation before planning. This matters here because as the deployment team prepares a reviewed Terraform CLI change, the following condition occurs: A Terraform….
Incorrect Answers
B:Differentiate static schema/reference checks in validation from provider API checks and actual permissions during plan and apply. This inspects terraform validate versus cloud permission testing rather than the reported terraform validate catches undeclared reference issue. The decisive investigation is: Inspect Terraform diagnostic output for undeclared input references and compare declared variable names to expressions. This matters here because as the deployment team prepares a reviewed Terraform CLI change, the following condition occurs: A Terraform….
C:Inspect whether the approved artifact was produced by terraform plan -out and whether apply consumes exactly that plan artifact. This inspects saved execution plan for controlled deployment rather than the reported terraform validate catches undeclared reference issue. The decisive investigation is: Inspect Terraform diagnostic output for undeclared input references and compare declared variable names to expressions.
D:Inspect the current HCL formatting and whether a standard terraform fmt check flags style-only differences. This inspects terraform fmt normalizes hcl style rather than the reported terraform validate catches undeclared reference issue. The decisive investigation is: Inspect Terraform diagnostic output for undeclared input references and compare declared variable names to expressions.
Question 389
While migrating a manually maintained development environment into reviewed Terraform configuration, the following condition occurs: A team cannot explain who enlarged production compute capacity because engineers edit cloud resources without changes to an auditable repository. The team must establish a reproducible and auditable infrastructure change. Which outcome most directly validates the intended fix?
- A clean environment can be reconstructed from the same reviewed configuration with repeatable managed resource attributes.
- Reviewers can trace a proposed firewall change to an audited configuration diff and plan before any infrastructure changes.
- An auditor can identify the approved commit and plan that caused a deliberate infrastructure capacity change.
- An unanticipated deletion or replacement is identified and blocked before a privileged apply can execute it.
Explanation
Correct Answer
C:An auditor can identify the approved commit and plan that caused a deliberate infrastructure capacity change. IaC enables reproducible review and history when configuration is versioned and the apply workflow is controlled. It tests the correction: Require reviewed Terraform commits and corresponding plan evidence for production changes rather than console-only alterations. This matters here because while migrating a manually maintained development environment into reviewed Terraform configuration, the following….
Incorrect Answers
A:A clean environment can be reconstructed from the same reviewed configuration with repeatable managed resource attributes. This might validate declarative desired state versus imperative console runbook, but it does not prove that version-controlled iac change auditing was resolved. Confirm instead: An auditor can identify the approved commit and plan that caused a deliberate infrastructure capacity change. This matters here because while migrating a manually maintained development environment into reviewed Terraform configuration, the following….
B:Reviewers can trace a proposed firewall change to an audited configuration diff and plan before any infrastructure changes. This might validate terraform configuration as reviewable infrastructure specification, but it does not prove that version-controlled iac change auditing was resolved. Confirm instead: An auditor can identify the approved commit and plan that caused a deliberate infrastructure capacity change.
D:An unanticipated deletion or replacement is identified and blocked before a privileged apply can execute it. This might validate terraform plan review as change safety barrier, but it does not prove that version-controlled iac change auditing was resolved. Confirm instead: An auditor can identify the approved commit and plan that caused a deliberate infrastructure capacity change.
Question 390
During an isolated staging rehearsal of the Terraform workflow, the following condition occurs: Two contributors produce equivalent Terraform expressions using inconsistent spacing and indentation, causing noisy reviews despite no actual infrastructure differences. The operator must obtain auditable evidence before touching production resources. Which proposed remediation solves this failure without masking its cause?
- Use terraform validate to catch configuration errors and separately run plan or controlled provider checks to assess remote feasibility.
- Reformat the affected .tf files using terraform fmt and rerun both style checking and validation independently.
- Execute terraform init in the root configuration directory and resolve backend or provider setup failures before planning.
- Run terraform fmt or terraform fmt -recursive where intended, then review the resulting source formatting changes.
Explanation
Correct Answer
D:Run terraform fmt or terraform fmt -recursive where intended, then review the resulting source formatting changes. terraform fmt standardizes syntax layout; it is not a validation of cloud permissions or a deployment action. Confirm the cause with: Inspect the current HCL formatting and whether a standard terraform fmt check flags style-only differences. A concrete acceptance test is: Equivalent configuration is presented in consistent canonical formatting while the resource plan remains semantically unchanged.
Incorrect Answers
A:Use terraform validate to catch configuration errors and separately run plan or controlled provider checks to assess remote feasibility. This could address terraform validate versus cloud permission testing, but it does not correct the indicated terraform fmt normalizes hcl style mechanism. The relevant fix is: Run terraform fmt or terraform fmt -recursive where intended, then review the resulting source formatting changes.
B:Reformat the affected.tf files using terraform fmt and rerun both style checking and validation independently. This could address ci terraform fmt check distinguishes style from validity, but it does not correct the indicated terraform fmt normalizes hcl style mechanism. The relevant fix is: Run terraform fmt or terraform fmt -recursive where intended, then review the resulting source formatting changes.
C:Execute terraform init in the root configuration directory and resolve backend or provider setup failures before planning. This could address terraform init backend and provider preparation, but it does not correct the indicated terraform fmt normalizes hcl style mechanism. The relevant fix is: Run terraform fmt or terraform fmt -recursive where intended, then review the resulting source formatting changes.