Google Associate Cloud Engineer Practice Test 39
Question 380
Two release pipelines apply Terraform to the same shared Google Cloud state simultaneously, causing one deployment to overwrite assumptions from the other. What control prevents this?
- Inspect Terraform state and the actual Google Cloud resource identity, then use a reviewed state move/import strategy rather than applying a destructive replacement blind.
- Edit the Terraform state JSON manually without reconciling it to the real managed resource.
- Duplicate production credentials into a staging repository to bypass workspace selection.
- Use an approved shared remote backend with state locking and serialize protected production applies.
Explanation
Correct Answer
D:Concurrent state mutation can corrupt the intended configuration view; proper locking and change coordination limit conflicts.
Incorrect Answers
A:The operation does not guarantee the correct managed resource or approved plan. The necessary distinction is the approved Terraform plan and target. The appropriate action here is: Use an approved shared remote backend with state locking and serialize protected production applies.
B:Editing state by hand can desynchronize Terraform from the real infrastructure. The case instead depends on the approved Terraform plan and target.
C:Bypassing the guardrail weakens security without correctly configuring the resource. It leaves the approved Terraform plan and target unaddressed.
Question 381
A team changes a Terraform module input variable from a production project ID to a staging ID and the plan shows a cross-project resource recreation. Which gate should block rollout?
- Validate allowed role inputs and scope module bindings to reviewed resource identities before applying IAM policy changes.
- Edit the Terraform state JSON manually without reconciling it to the real managed resource.
- Discard the approved plan artifact and deploy a newly generated plan without comparison.
- Review environment-specific variable bindings and require plan approval showing the intended target project before applying.
Explanation
Correct Answer
D:Terraform execution follows provider and input configuration; an accidental project substitution can direct real changes to the wrong boundary.
Incorrect Answers
A:The operation does not guarantee the correct managed resource or approved plan. The case instead depends on the approved Terraform plan and target. The appropriate action here is: Review environment-specific variable bindings and require plan approval showing the intended target project before applying.
B:Editing state by hand can desynchronize Terraform from the real infrastructure. It leaves the approved Terraform plan and target unaddressed.
C:The operation does not guarantee the correct managed resource or approved plan. The specific requirement concerns the approved Terraform plan and target.
Question 382
A new engineer uses terraform apply with no plan in a regulated production pipeline and cannot show what resources were expected to change. Which workflow improves auditability?
- Review environment-specific variable bindings and require plan approval showing the intended target project before applying.
- Run terraform apply on an unreviewed production plan and assume the destination is always correct.
- Create and retain a reviewed Terraform plan artifact, bind its approval to the deployment, and apply that exact plan.
- Edit the Terraform state JSON manually without reconciling it to the real managed resource.
Explanation
Correct Answer
C:Separating plan review from apply documents intended resource mutations and prevents a second unreviewed recomputation at release.
Incorrect Answers
A:The operation does not guarantee the correct managed resource or approved plan. It leaves the approved Terraform plan and target unaddressed.
B:Applying an unreviewed Terraform plan risks unintended infrastructure changes. The specific requirement concerns the approved Terraform plan and target.
D:Editing state by hand can desynchronize Terraform from the real infrastructure. The necessary distinction is the approved Terraform plan and target.
Question 383
A service account key is committed in a Terraform variables file used by several repositories. What is the controlled remediation?
- Revoke the exposed credential and use supported short-lived identity federation or secret references in the IaC workflow.
- Inspect Terraform state and the actual Google Cloud resource identity, then use a reviewed state move/import strategy rather than applying a destructive replacement blind.
- Duplicate production credentials into a staging repository to bypass workspace selection.
- Disable all drift detection rather than investigating the actual resource change.
Explanation
Correct Answer
A:Keeping a long-lived credential in Terraform configuration or Git history expands exposure independent of whether infrastructure code runs correctly.
Incorrect Answers
B:The operation does not guarantee the correct managed resource or approved plan. The specific requirement concerns the approved Terraform plan and target. The appropriate action here is: Revoke the exposed credential and use supported short-lived identity federation or secret references in the IaC workflow.
C:Bypassing the guardrail weakens security without correctly configuring the resource. The necessary distinction is the approved Terraform plan and target.
D:The operation does not guarantee the correct managed resource or approved plan. The case instead depends on the approved Terraform plan and target. The appropriate action here is: Revoke the exposed credential and use supported short-lived identity federation or secret references in the IaC workflow.
Question 384
Terraform continually removes a manually added authorized label from new cloud instances because the label was omitted from the module. What should a team change?
- Make the intended label part of the reviewed declarative module configuration rather than relying on console-only edits.
- Inspect Terraform state and the actual Google Cloud resource identity, then use a reviewed state move/import strategy rather than applying a destructive replacement blind.
- Run terraform apply on an unreviewed production plan and assume the destination is always correct.
- Disable all drift detection rather than investigating the actual resource change.
Explanation
Correct Answer
A:Declarative tools reconcile actual state to declared state; manual configuration without corresponding code may be reverted on subsequent applies.
Incorrect Answers
B:The operation does not guarantee the correct managed resource or approved plan. The necessary distinction is the approved Terraform plan and target. The appropriate action here is: Make the intended label part of the reviewed declarative module configuration rather than relying on console-only edits.
C:Applying an unreviewed Terraform plan risks unintended infrastructure changes. The case instead depends on the approved Terraform plan and target.
D:The operation does not guarantee the correct managed resource or approved plan. It leaves the approved Terraform plan and target unaddressed. The appropriate action here is: Make the intended label part of the reviewed declarative module configuration rather than relying on console-only edits.
Question 385
A Terraform module accepts arbitrary IAM role strings and repeatedly gets invalid permission combinations when deployed to different projects. What design makes the module safer?
- Review environment-specific variable bindings and require plan approval showing the intended target project before applying.
- Duplicate production credentials into a staging repository to bypass workspace selection.
- Validate allowed role inputs and scope module bindings to reviewed resource identities before applying IAM policy changes.
- Edit the Terraform state JSON manually without reconciling it to the real managed resource.
Explanation
Correct Answer
C:Module input validation catches invalid or risky configurations before changes reach project or folder permissions.
Incorrect Answers
A:The operation does not guarantee the correct managed resource or approved plan. The case instead depends on the approved Terraform plan and target. The appropriate action here is: Validate allowed role inputs and scope module bindings to reviewed resource identities before applying IAM policy changes.
B:Bypassing the guardrail weakens security without correctly configuring the resource. It leaves the approved Terraform plan and target unaddressed. The appropriate action here is: Validate allowed role inputs and scope module bindings to reviewed resource identities before applying IAM policy changes.
D:Editing state by hand can desynchronize Terraform from the real infrastructure. The specific requirement concerns the approved Terraform plan and target.
Question 386
A GKE cluster's Config Connector resources are submitted to a namespace, but provisioning fails because the controller identity cannot create Google Cloud resources. What must be configured?
- Separate tenant namespaces and controller credentials with scoped cloud IAM, plus Kubernetes RBAC protecting each team's custom resources.
- Grant Config Connector one unrestricted organization-wide identity across tenant namespaces.
- Bind the Config Connector Kubernetes identity to an authorized Google Cloud principal with scoped permissions for the required resources.
- Skip the approval gate and deploy the latest unreviewed image directly into production.
Explanation
Correct Answer
C:Kubernetes custom resources do not bypass Google Cloud IAM; controller reconciliation needs a credential and matching cloud permissions.
Incorrect Answers
A:The suggested action changes another component without meeting the main requirement. It leaves the secure build and deployment workflow unaddressed.
B:A shared unrestricted identity would undermine the requested namespace-level tenant separation.
D:The suggested action changes another component without meeting the main requirement. The necessary distinction is the secure build and deployment workflow.
Question 387
A Kubernetes Config Connector custom resource declares a production bucket property. An operator changes that property directly in Google Cloud, but reconciliation restores the old value. How should an approved persistent change be applied?
- Disable Cloud Audit Logs so the manual console update is no longer observed by Config Connector.
- Keep editing the live resource after each reconcile loop; repeated manual changes will become the source of truth.
- Create a Cloud Billing export of the manually edited value; the export overrides Config Connector configuration.
- Change the reviewed Config Connector resource declaration in the authoritative repository and allow the controller to reconcile it.
Explanation
Correct Answer
D:Change the reviewed Config Connector resource declaration in the authoritative repository and allow the controller to reconcile it. Config Connector manages Google Cloud resources from Kubernetes custom resource state. Updating that declaration makes the desired change durable.
Incorrect Answers
A:Disable Cloud Audit Logs so the manual console update is no longer observed by Config Connector. Audit logging is evidence collection. It is not the source of desired resource configuration for a Config Connector controller.
B:Keep editing the live resource after each reconcile loop; repeated manual changes will become the source of truth. Config Connector continually reconciles declared state. Direct drift will be corrected unless the authoritative declaration is changed.
C:Create a Cloud Billing export of the manually edited value; the export overrides Config Connector configuration. A billing export reports charges and has no role in changing a Kubernetes resource declaration or reconciliation behavior.
Question 388
Config Connector resource status reports a dependency not found because the target network exists in a different namespace and resource reference is incomplete. Which step should be taken?
- Remove the authoritative Config Connector custom resource under approved change control and verify the configured deletion policy before reconciling.
- Run the release with an unrestricted project Owner identity rather than a scoped build service account.
- Correct the manifest reference and namespace or external resource identifier to point to the authorized dependency.
- Store long-lived deployment credentials in plaintext build arguments.
Explanation
Correct Answer
C:Cross-resource declarative references require the proper resource identity; merely creating a resource with a matching display name is insufficient.
Incorrect Answers
A:The suggested action changes another component without meeting the main requirement. The necessary distinction is the secure build and deployment workflow. The appropriate action here is: Correct the manifest reference and namespace or external resource identifier to point to the authorized dependency.
B:Project Owner broadens authorization and is not an appropriate substitute for the named control. The case instead depends on the secure build and deployment workflow.
D:Deploying a separate workload does not automatically configure the existing feature. It leaves the secure build and deployment workflow unaddressed.
Question 389
A namespace-scoped Config Connector installation allows unrelated app teams to modify resources outside their assigned cloud projects. What least-privilege design addresses this?
- Bind the Config Connector Kubernetes identity to an authorized Google Cloud principal with scoped permissions for the required resources.
- Separate tenant namespaces and controller credentials with scoped cloud IAM, plus Kubernetes RBAC protecting each team's custom resources.
- Skip the approval gate and deploy the latest unreviewed image directly into production.
- Store long-lived deployment credentials in plaintext build arguments.
Explanation
Correct Answer
B:Kubernetes namespaces alone do not enforce Google Cloud permissions when all controllers use one broadly privileged identity.
Incorrect Answers
A:The suggested action changes another component without meeting the main requirement. The case instead depends on the secure build and deployment workflow.
C:The suggested action changes another component without meeting the main requirement. It leaves the secure build and deployment workflow unaddressed. The appropriate action here is: Separate tenant namespaces and controller credentials with scoped cloud IAM, plus Kubernetes RBAC protecting each team's custom resources.
D:Deploying a separate workload does not automatically configure the existing feature. The specific requirement concerns the secure build and deployment workflow.
Question 390
An operator asks Gemini Cloud Assist to change a production network without reviewing the generated commands. How should the generated output be handled?
- Require normal code review, policy tests, least-privilege deployment identity and an approved change plan regardless of how code was drafted.
- Treat AI-assisted recommendations as proposed changes and validate intended resources, permissions and risk in the normal approved change workflow.
- Store long-lived deployment credentials in plaintext build arguments.
- Change only the artifact name and assume the pipeline dependencies have been repaired.
Explanation
Correct Answer
B:AI-generated operational guidance can aid investigation but must not replace authoritative configuration or human approval for production mutations.
Incorrect Answers
A:Deploying a separate workload does not automatically configure the existing feature. It leaves the secure build and deployment workflow unaddressed. The appropriate action here is: Treat AI-assisted recommendations as proposed changes and validate intended resources, permissions and risk in the normal approved change workflow.
C:Deploying a separate workload does not automatically configure the existing feature. The specific requirement concerns the secure build and deployment workflow. The appropriate action here is: Treat AI-assisted recommendations as proposed changes and validate intended resources, permissions and risk in the normal approved change workflow.
D:The suggested action changes another component without meeting the main requirement. The necessary distinction is the secure build and deployment workflow. The appropriate action here is: Treat AI-assisted recommendations as proposed changes and validate intended resources, permissions and risk in the normal approved change workflow.