Google Associate Cloud Engineer Practice Test 4
Question 30
An incident responder needs to read one Cloud Storage bucket for exactly one hour. They currently have indefinite project Editor. Security requires least privilege and an enforced expiration. Which remediation is most appropriate?
- Leave Editor in place and ask the responder to sign out when the incident closes.
- Remove the Editor grant and use a supported bucket-scoped read role with a one-hour conditional expiry.
- Keep Editor indefinitely but schedule an access review for the following month.
- Replace project Editor with an unconditional organization-level Viewer role so the grant has a simpler name.
Explanation
Correct Answer
B:Remove the Editor grant and use a supported bucket-scoped read role with a one-hour conditional expiry. The task needs only bucket reading for a bounded window. A supported narrow role binding with request-time expiry enforces the cutoff, and removing Editor eliminates the standing broader privilege.
Incorrect Answers
A:Leave Editor in place and ask the responder to sign out when the incident closes. Signing out does not revoke an IAM role, and Editor is broader than the bucket-read requirement. The indefinite authorization remains effective.
C:Keep Editor indefinitely but schedule an access review for the following month. An access review is not a time-enforced stop. The principal retains Editor during the rest of the month, contrary to the one-hour requirement.
D:Replace project Editor with an unconditional organization-level Viewer role so the grant has a simpler name. An organization-level role affects more resources than required and does not expire automatically. Moving the access to a wider scope cannot satisfy least privilege.
Question 31
An organization policy prevents assigning external IP addresses to new Compute Engine VMs in project atlas. An engineer with Compute Admin tries to add a public address. Which control determines whether that request can succeed?
- The engineer's CPU quota, because quotas automatically override organization policy when spare capacity is available.
- The VM operating-system password, because guest credentials determine whether an external IP is permitted.
- The project Editor role, because local broad IAM roles always override inherited resource constraints.
- The inherited organization policy constraint, which must permit the configuration even if the principal has Compute permissions.
Explanation
Correct Answer
D:The inherited organization policy constraint, which must permit the configuration even if the principal has Compute permissions. Organization policies constrain allowed resource configuration independently of the caller's IAM role. The request fails while the effective external-IP restriction applies.
Incorrect Answers
A:The engineer's CPU quota, because quotas automatically override organization policy when spare capacity is available. Compute quota controls resource amounts, not the separate allowed configuration enforced by an organization policy constraint. Spare quota does not authorize an external IP.
B:The VM operating-system password, because guest credentials determine whether an external IP is permitted. A guest operating-system credential cannot change an infrastructure policy constraint applied before Compute Engine provisioning.
C:The project Editor role, because local broad IAM roles always override inherited resource constraints. IAM grants permission to invoke operations but does not disable an inherited organization policy restriction. Adding Editor would not make the prohibited address valid.
Question 32
A team wants a service principal to read objects only from a supported Cloud Storage bucket, not every bucket in the project. The chosen role and bucket support conditional bindings. What can narrow its permission?
- Give the principal an unconditional project-wide Storage Admin role and rely on usage monitoring.
- Bind the same role on the organization root because an ancestor binding is more specific than a bucket binding.
- Grant the minimum storage permissions at bucket scope and, if needed, use an eligible IAM Condition on supported attributes.
- Add a VPC firewall rule because firewall source CIDRs replace Cloud Storage object IAM checks.
Explanation
Correct Answer
C:Grant the minimum storage permissions at bucket scope and, if needed, use an eligible IAM Condition on supported attributes. A bucket-scoped role targets the intended Cloud Storage resource. When the role/resource supports conditions, permitted resource attributes can further limit the binding without changing unrelated buckets.
Incorrect Answers
A:Give the principal an unconditional project-wide Storage Admin role and rely on usage monitoring. A broad project Storage Admin binding is not confined to the approved bucket; monitoring afterward does not reduce authorization.
B:Bind the same role on the organization root because an ancestor binding is more specific than a bucket binding. Allow bindings flow down from ancestors. Organization scope would increase, rather than narrow, the set of affected buckets.
D:Add a VPC firewall rule because firewall source CIDRs replace Cloud Storage object IAM checks. Network firewall rules do not replace Cloud Storage IAM authorization for protected objects. They cannot turn a broad storage role into a one-bucket grant.
Question 33
One app must retain a read role in a project after the parent folder's broad inherited role is removed. What is the least disruptive policy change?
- Delete the parent binding first, then assume the app will retain its inherited role.
- Grant the app the parent folder Owner role so no later migration can affect it.
- Create the app-specific project or resource binding, verify access, then remove the broad inherited grant.
- Grant the app temporary project Viewer without checking whether the required resource permission is included.
Explanation
Correct Answer
C:A direct, narrowly scoped binding can preserve the app’s required permission when the shared parent grant is retired. Verify the new binding before the removal so that the least-privilege migration does not interrupt this workload.
Incorrect Answers
A:If the app relies on an inherited permission, deleting the only working grant first can cause an outage.
B:Owner at folder scope increases access across the hierarchy and does not meet least privilege.
D:A new role should be selected from the actual permission requirement. Viewer may not include the specific data-read action the app needs.
Question 34
A user wants to determine whether their group can change the IAM policy of a project versus merely deploy resources there. What should be inspected?
- Inspect only the IAM roles granted directly on the project, ignoring roles inherited from its folder.
- Check deployment job permissions and assume that whoever can deploy can also edit IAM policy.
- Inspect the group’s effective roles for the permission to set the project IAM policy.
- Check the group's role names without inspecting the permissions actually included in those roles.
Explanation
Correct Answer
C:A role’s permissions, not its label, control what the group can do. Check whether an inherited or direct binding includes the relevant IAM-policy modification permission; deploy permissions alone do not prove that authorization exists.
Incorrect Answers
A:A group may inherit authority to edit IAM from an ancestor, so the local bindings alone may be incomplete.
B:Deployment authorization does not by itself establish the separate permission to modify project IAM bindings.
D:A role label is not enough evidence that it includes the specific permission needed to change IAM policies.
Question 35
A custom IAM role contains a permission that Google Cloud no longer supports in that custom-role definition, and the next role update is rejected. What should the role maintainer do?
- Review the current list of custom-role-supported permissions, remove or replace the unsupported entry, and update the role under change control.
- Change the custom role display name only; the permission set will automatically become supported.
- Grant the IAM policy Editor role to every principal who has the failing role and stop maintaining the custom role.
- Disable the Cloud Billing account because API permission compatibility is determined by the payment method.
Explanation
Correct Answer
A:Review the current list of custom-role-supported permissions, remove or replace the unsupported entry, and update the role under change control. Custom-role permissions are subject to support and launch-stage restrictions. Updating the definition to currently supported permissions addresses the rejected role content while preserving reviewed least privilege.
Incorrect Answers
B:Change the custom role display name only; the permission set will automatically become supported. Renaming a role does not change whether its underlying permission is eligible for custom roles. The rejected entry remains invalid.
C:Grant the IAM policy Editor role to every principal who has the failing role and stop maintaining the custom role. A broad role grant introduces unrelated privileges and does not repair the invalid definition that failed the custom-role update.
D:Disable the Cloud Billing account because API permission compatibility is determined by the payment method. Billing linkage has no bearing on which IAM permission identifiers may appear in a supported custom-role definition.
Question 36
An engineering team wants alerts when spending approaches 90% of an approved monthly amount, without altering running services. What should it configure?
- Configure a startup script that automatically stops every VM at the end of the month.
- Set a Cloud Logging retention rule at ninety percent of the project’s log quota.
- Create an alerts-only Cloud Billing budget with a monthly spend target and 90% actual-cost threshold.
- Set a network firewall policy to deny traffic when charges reach the budget amount.
Explanation
Correct Answer
C:An alerts-only budget can send notifications when actual charges approach the configured share of the monthly budget. It informs the engineering team without independently stopping resources, which satisfies the requirement to leave services running.
Incorrect Answers
A:Stopping VMs is a disruptive enforcement action, not a spending alert; it may also leave other billable resources running.
B:Log retention is unrelated to spending percentage thresholds.
D:Firewall policies evaluate traffic, not Cloud Billing thresholds, and do not implement budget notifications.
Question 37
Finance needs forecast-based notifications before an annual spend threshold is actually reached. Which budget option should be chosen?
- Choose a forecasted-spend threshold on a calendar-year alerts-only Cloud Billing budget.
- Set only an actual-spend threshold after charges have already exceeded the annual target.
- Enable a CPU utilization alert and rename it annual spend forecast.
- Assume billing export data becomes final before the fiscal year starts.
Explanation
Correct Answer
A:A forecast threshold evaluates projected charges before an actual-spend rule is triggered. Use the supported calendar-year period and its forecast threshold for the required annual spending window; a custom-date-range budget does not support forecast alerts.
Incorrect Answers
B:Actual-spend alerts are retrospective and can arrive too late for the stated early-warning objective.
C:CPU usage may affect cost, but a CPU alert is not a billing forecast.
D:Exports do not forecast future annual charges merely because they contain prior usage.
Question 38
Finance configured a $2,000 alerts-only Cloud Billing budget and expects all project workloads to shut down automatically after the threshold. Which statement correctly describes this budget type?
- Alerts-only budgets guarantee an enforced spend cap on every Google Cloud product once actual charges cross the configured amount.
- Alerts-only budgets delete the project when the target amount is reached, but only after a one-day grace period.
- An alerts-only budget sends configured spending notifications; it does not itself stop usage. Supported spend-cap budgets are a separate capability.
- Budget notifications are equivalent to IAM deny policies and automatically prevent requests that would add cost.
Explanation
Correct Answer
C:An alerts-only budget sends configured spending notifications; it does not itself stop usage. Supported spend-cap budgets are a separate capability. The documented alerts-only product monitors costs and triggers threshold notifications. The supported spend-cap type has different enforcement behavior, so the team must not infer a hard stop from an alerts-only configuration.
Incorrect Answers
A:Alerts-only budgets guarantee an enforced spend cap on every Google Cloud product once actual charges cross the configured amount. Google distinguishes alerts-only budgets from spend-cap budgets available for supported services. Merely setting an alert does not enforce a universal spending limit.
B:Alerts-only budgets delete the project when the target amount is reached, but only after a one-day grace period. No default project deletion is triggered by an alerts-only budget. Resource lifecycle requires separate intentional administration or automation.
D:Budget notifications are equivalent to IAM deny policies and automatically prevent requests that would add cost. Budget thresholds are cost-management signals, not IAM authorization rules. They do not evaluate and deny every future resource operation.
Question 39
A product manager needs alerts about only one product line even though the corporate billing account pays for many products. How should the budget be scoped?
- Create an account-wide budget without any filtering and expect it to report only the product line.
- Restrict the budget to the relevant Google Cloud service or supported resource label/project filters.
- Rename the billing account after the product line and ignore all other service charges.
- Disable unrelated Google APIs across other teams to remove their costs from the account.
Explanation
Correct Answer
B:Cloud Billing budgets support scoped filters such as services, projects and supported labels. Select the filter that actually identifies the product line so unrelated account usage does not trigger its alert.
Incorrect Answers
A:An unfiltered budget includes other billable services paid by the account and cannot isolate the requested cost slice.
C:A display name has no effect on which charges appear in a budget calculation.
D:Disabling other teams’ APIs would interrupt unrelated workloads and is unnecessary for billing scoping.
Question 40
A budget notification must reach a non-billing stakeholder outside the default billing-admin distribution. Which supported integration helps?
- Add a Cloud Monitoring email notification channel for the stakeholder and link it to the budget.
- Add the stakeholder to the project’s SSH-keys metadata only.
- Create a VPC subnet named budget-alert-recipient.
- Turn on Cloud Trace for the budget’s project and expect it to email billing events.
Explanation
Correct Answer
A:The budget can use Cloud Monitoring email notification channels to reach authorized people outside default billing-role recipients. Recipients need additional financial permissions only if they must open the underlying budget data in the console.
Incorrect Answers
B:SSH metadata governs VM login, not notification routing.
C:A subnet name does not configure a budget alert destination.
D:Cloud Trace is for request tracing and does not automatically route billing notifications.