Google Professional Cloud Developer Practice Test 48
Question 470
A service reads a secret version at startup and assumes existing instances will refresh instantly after a rotation. The team is choosing a sustainable solution. Which design best meets the stated requirement without broad unrelated changes? Select ONE best answer.
- Set coordinated CPU, memory, and concurrency limits based on profiling rather than tuning a single value in isolation.
- Choose a supported secret environment injection or mounted secret file mechanism appropriate to the application contract.
- Add a startup probe that gives slow applications an explicit bounded initialization window before normal probes run.
- Route the intended event type through Eventarc to a compatible authenticated Cloud Run destination.
Explanation
Correct Answer
B:Choose a supported secret environment injection or mounted secret file mechanism appropriate to the application contract. In this scenario, a service reads a secret version at startup and assumes existing instances will refresh instantly after a rotation. Before rollout, inspect application secret consumption pattern, configured Secret Manager version, and runtime identity access.
Incorrect Answers
A:Set coordinated CPU, memory, and concurrency limits based on profiling rather than tuning a single value in isolation. The reported condition is about cloud run secrets as environment or mounted files, not this adjacent change.
C:Add a startup probe that gives slow applications an explicit bounded initialization window before normal probes run. This design addresses GKE startup probe for slow initialization, where Kubernetes startup probes can suppress normal liveness and readiness checks during initialization, preventing startup time from being mistaken for failure. The reported condition is about cloud run secrets as environment or mounted files, not this adjacent change.
D:Route the intended event type through Eventarc to a compatible authenticated Cloud Run destination. This design addresses eventarc-triggered Cloud Run handler, where Eventarc event routing requires compatible source filters, destination connectivity, and authorized trigger identity. The reported condition is about cloud run secrets as environment or mounted files, not this adjacent change.
Question 471
A service reads a secret version at startup and assumes existing instances will refresh instantly after a rotation. An approved limited change can be tested in a safe environment. Which implementation action most directly addresses this scenario? Select ONE best answer.
- Deploy the intended identity and run allowed and denied API calls from the revision under test.
- Configure and test startup, readiness and liveness probes with a deliberately slow initialization path.
- Bind the approved secret to the service, test rotation semantics, and verify that no secret values enter logs or images.
- Configure push authentication and verify a test message reaches the private Cloud Run handler once under normal conditions.
Explanation
Correct Answer
C:Bind the approved secret to the service, test rotation semantics, and verify that no secret values enter logs or images. In this scenario, a service reads a secret version at startup and assumes existing instances will refresh instantly after a rotation. Validate the change by checking that the application reads only authorized secret content and adopts updated credentials according to documented delivery behavior.
Incorrect Answers
A:Deploy the intended identity and run allowed and denied API calls from the revision under test. This action changes a different concern, Cloud Run execution identity attachment. Applying it first would leave cloud run secrets as environment or mounted files unresolved.
B:Configure and test startup, readiness and liveness probes with a deliberately slow initialization path. This action changes a different concern, GKE startup probe for slow initialization. Applying it first would leave cloud run secrets as environment or mounted files unresolved.
D:Configure push authentication and verify a test message reaches the private Cloud Run handler once under normal conditions. This action changes a different concern, Pub/Sub push to Cloud Run authentication. Applying it first would leave cloud run secrets as environment or mounted files unresolved.
Question 472
A service reads a secret version at startup and assumes existing instances will refresh instantly after a rotation. The team has tried a correction. Which measurable outcome most directly demonstrates that this issue is resolved? Select ONE best answer.
- The application reads only authorized secret content and adopts updated credentials according to documented delivery behavior.
- Healthy Pods receive traffic through the intended endpoint while private services remain unexposed.
- The Deployment maintains the required replicas with labels recognized by its controller and Service.
- First-request latency meets requirements with a documented tradeoff in warm capacity cost.
Explanation
Correct Answer
A:The application reads only authorized secret content and adopts updated credentials according to documented delivery behavior. In this scenario, a service reads a secret version at startup and assumes existing instances will refresh instantly after a rotation. The original diagnosis should have included this step: inspect application secret consumption pattern, configured Secret Manager version, and runtime identity access.
Incorrect Answers
B:Healthy Pods receive traffic through the intended endpoint while private services remain unexposed. That result could support testing of GKE Service and ingress exposure: A Deployment manages Pods, a Service provides stable routing to selected Pods, and ingress determines supported external HTTP entry. That may help elsewhere, but it does not make the change required for cloud run secrets as environment or mounted files.
C:The Deployment maintains the required replicas with labels recognized by its controller and Service. In this case, the outcome to verify is that the application reads only authorized secret content and adopts updated credentials according to documented delivery behavior. That may help elsewhere, but it does not make the change required for cloud run secrets as environment or mounted files.
D:First-request latency meets requirements with a documented tradeoff in warm capacity cost. That result could support testing of minimum instances and cold-start tradeoffs: Cloud Run minimum instances can reduce cold starts but incur resource charges; the correct setting depends on measured demand and service objectives. That may help elsewhere, but it does not make the change required for cloud run secrets as environment or mounted files.
Question 473
A deployment succeeds but the Cloud Run revision cannot read required records because its execution account lacks datastore IAM. Before choosing a remediation, which investigation best isolates the specific cause or unmet dependency? Select ONE best answer.
- Inspect CPU and memory use distributions, scheduling requests, limits, and termination reasons.
- Inspect service revision tags, authentication policy, no-traffic settings, and which URL testers invoke.
- Inspect source language support, build service account, artifact repository location, and required deployment permissions.
- Inspect revision service account, actual access tokens, target resource permissions, and who invokes the service.
Explanation
Correct Answer
D:Inspect revision service account, actual access tokens, target resource permissions, and who invokes the service. Success requires that the service accesses only approved data and does not inherit a developer's broad personal permissions. A focused follow-up is to deploy the intended identity and run allowed and denied API calls from the revision under test.
Incorrect Answers
A:Inspect CPU and memory use distributions, scheduling requests, limits, and termination reasons. Kubernetes requests influence scheduling and resource guarantees, while limits bound usage and can cause throttling or out-of-memory termination. The more informative check is to inspect revision service account, actual access tokens, target resource permissions, and who invokes the service.
B:Inspect service revision tags, authentication policy, no-traffic settings, and which URL testers invoke. Revision tags provide direct revision access for testing; they do not inherently shift regular service URL traffic. The more informative check is to inspect revision service account, actual access tokens, target resource permissions, and who invokes the service.
C:Inspect source language support, build service account, artifact repository location, and required deployment permissions. Cloud Run source deployment packages code into a container using build machinery; it does not eliminate image provenance and build permissions. The more informative check is to inspect revision service account, actual access tokens, target resource permissions, and who invokes the service.
Question 474
A deployment succeeds but the Cloud Run revision cannot read required records because its execution account lacks datastore IAM. The team is choosing a sustainable solution. Which design best meets the stated requirement without broad unrelated changes? Select ONE best answer.
- Configure supported HPA metrics and replica bounds with meaningful CPU requests or other validated measurements.
- Assign a dedicated execution service account with the narrow roles needed for outbound service access.
- Keep private services authenticated and authorize only the intended caller with a suitable identity token.
- Configure private egress for required VPC destinations and deliberately select whether all or only private traffic uses it.
Explanation
Correct Answer
B:Assign a dedicated execution service account with the narrow roles needed for outbound service access. The expected outcome is that the service accesses only approved data and does not inherit a developer's broad personal permissions. Before rollout, inspect revision service account, actual access tokens, target resource permissions, and who invokes the service.
Incorrect Answers
A:Configure supported HPA metrics and replica bounds with meaningful CPU requests or other validated measurements. For this case, the deployed execution identity controls Google API permissions from a Cloud Run workload; user identities and deployer privileges are separate. The case instead calls for the following: assign a dedicated execution service account with the narrow roles needed for outbound service access.
C:Keep private services authenticated and authorize only the intended caller with a suitable identity token. This design addresses authenticated Cloud Run invocation, where private Cloud Run invocation requires both valid identity evidence and applicable IAM authorization; making it public is not a substitute. The case instead calls for the following: assign a dedicated execution service account with the narrow roles needed for outbound service access.
D:Configure private egress for required VPC destinations and deliberately select whether all or only private traffic uses it. This design addresses Cloud Run Direct VPC egress configuration, where Cloud Run VPC egress policy changes outbound routing; IAM, firewall and NAT controls still determine actual reachability. The case instead calls for the following: assign a dedicated execution service account with the narrow roles needed for outbound service access.
Question 475
A deployment succeeds but the Cloud Run revision cannot read required records because its execution account lacks datastore IAM. An approved limited change can be tested in a safe environment. Which implementation action most directly addresses this scenario? Select ONE best answer.
- Configure push authentication and verify a test message reaches the private Cloud Run handler once under normal conditions.
- Bind the approved secret to the service, test rotation semantics, and verify that no secret values enter logs or images.
- Deploy the configuration to a tagged or no-traffic revision and verify runtime values before moving traffic.
- Deploy the intended identity and run allowed and denied API calls from the revision under test.
Explanation
Correct Answer
D:Deploy the intended identity and run allowed and denied API calls from the revision under test. Validate the change by checking that the service accesses only approved data and does not inherit a developer's broad personal permissions.
Incorrect Answers
A:Configure push authentication and verify a test message reaches the private Cloud Run handler once under normal conditions. This action changes a different concern, Pub/Sub push to Cloud Run authentication. It cannot substitute for the required control: deploy the intended identity and run allowed and denied API calls from the revision under test.
B:Bind the approved secret to the service, test rotation semantics, and verify that no secret values enter logs or images. This action changes a different concern, Cloud Run secrets as environment or mounted files. It cannot substitute for the required control: deploy the intended identity and run allowed and denied API calls from the revision under test.
C:Deploy the configuration to a tagged or no-traffic revision and verify runtime values before moving traffic. This action changes a different concern, Cloud Run environment configuration revisions. It cannot substitute for the required control: deploy the intended identity and run allowed and denied API calls from the revision under test.
Question 476
A deployment succeeds but the Cloud Run revision cannot read required records because its execution account lacks datastore IAM. The team has tried a correction. Which measurable outcome most directly demonstrates that this issue is resolved? Select ONE best answer.
- The Pod completes startup and later health failures are still detected without premature restarts.
- The revision becomes ready and accepts HTTP requests on the port designated by the hosting platform.
- The service accesses only approved data and does not inherit a developer's broad personal permissions.
- Both destination classes follow the approved routes and network controls without leaking private endpoints.
Explanation
Correct Answer
C:The service accesses only approved data and does not inherit a developer's broad personal permissions. This is evidence that the particular acceptance condition for Cloud Run execution identity attachment has been met, rather than a general availability metric. The original diagnosis should have included this step: inspect revision service account, actual access tokens, target resource permissions, and who invokes the service.
Incorrect Answers
A:The Pod completes startup and later health failures are still detected without premature restarts. That result could support testing of GKE startup probe for slow initialization: Kubernetes startup probes can suppress normal liveness and readiness checks during initialization, preventing startup time from being mistaken for failure. It addresses a different dependency from cloud run execution identity attachment.
B:The revision becomes ready and accepts HTTP requests on the port designated by the hosting platform. It would not establish the success condition for Cloud Run execution identity attachment. It addresses a different dependency from cloud run execution identity attachment.
D:Both destination classes follow the approved routes and network controls without leaking private endpoints. That result could support testing of Cloud Run Direct VPC egress configuration: Cloud Run VPC egress policy changes outbound routing; IAM, firewall and NAT controls still determine actual reachability. It addresses a different dependency from cloud run execution identity attachment.
Question 477
A developer grants a human user's permissions to a service rather than using a dedicated service identity. Before choosing a remediation, which investigation best isolates the specific cause or unmet dependency? Select ONE best answer.
- Inspect Pod ServiceAccount, workload identity pool principal, IAM bindings, and token availability inside the Pod.
- Inspect revision service account, actual access tokens, target resource permissions, and who invokes the service.
- Inspect invocation authentication setting, caller principal, audience in the ID token, and Cloud Run Invoker binding.
- Inspect memory consumption per active request, vCPU settings, concurrency, instance count, and tail latency.
Explanation
Correct Answer
B:Inspect revision service account, actual access tokens, target resource permissions, and who invokes the service. Success requires that the service accesses only approved data and does not inherit a developer's broad personal permissions. A focused follow-up is to deploy the intended identity and run allowed and denied API calls from the revision under test. Before choosing a remediation, which investigation best isolates the specific cause or unmet dependency.
Incorrect Answers
A:Inspect Pod ServiceAccount, workload identity pool principal, IAM bindings, and token availability inside the Pod. GKE workload identity maps Kubernetes principals to Google Cloud permissions without requiring embedded long-lived service account JSON keys. The relevant dependency is cloud run execution identity attachment, which this inspection alone does not establish.
C:Inspect invocation authentication setting, caller principal, audience in the ID token, and Cloud Run Invoker binding. Private Cloud Run invocation requires both valid identity evidence and applicable IAM authorization; making it public is not a substitute. The relevant dependency is cloud run execution identity attachment, which this inspection alone does not establish.
D:Inspect memory consumption per active request, vCPU settings, concurrency, instance count, and tail latency. Per-instance concurrent work multiplies runtime resource demand; autoscaling does not prevent an individual overloaded container from exhausting memory. The relevant dependency is cloud run execution identity attachment, which this inspection alone does not establish.
Question 478
A developer grants a human user's permissions to a service rather than using a dedicated service identity. The team is choosing a sustainable solution. Which design best meets the stated requirement without broad unrelated changes? Select ONE best answer.
- Use stable matching selectors and Pod labels so the Kubernetes controller owns the intended replicas.
- Assign a dedicated execution service account with the narrow roles needed for outbound service access.
- Configure supported HPA metrics and replica bounds with meaningful CPU requests or other validated measurements.
- Use Cloud Run source deployment with the appropriate build pipeline and explicitly account for the resulting container artifact.
Explanation
Correct Answer
B:Assign a dedicated execution service account with the narrow roles needed for outbound service access. In this scenario, a developer grants a human user's permissions to a service rather than using a dedicated service identity. Before rollout, inspect revision service account, actual access tokens, target resource permissions, and who invokes the service.
Incorrect Answers
A:Use stable matching selectors and Pod labels so the Kubernetes controller owns the intended replicas. For this case, the deployed execution identity controls Google API permissions from a Cloud Run workload; user identities and deployer privileges are separate. Applying it first would leave cloud run execution identity attachment unresolved.
C:Configure supported HPA metrics and replica bounds with meaningful CPU requests or other validated measurements. For this case, the deployed execution identity controls Google API permissions from a Cloud Run workload; user identities and deployer privileges are separate. Applying it first would leave cloud run execution identity attachment unresolved.
D:Use Cloud Run source deployment with the appropriate build pipeline and explicitly account for the resulting container artifact. For this case, the deployed execution identity controls Google API permissions from a Cloud Run workload; user identities and deployer privileges are separate. Applying it first would leave cloud run execution identity attachment unresolved.
Question 479
A developer grants a human user's permissions to a service rather than using a dedicated service identity. An approved limited change can be tested in a safe environment. Which implementation action most directly addresses this scenario? Select ONE best answer.
- Define separate appropriate probes and test an unready-but-running Pod and a truly deadlocked process.
- Update Pod resource specifications and test load under representative cluster contention.
- Deploy the intended identity and run allowed and denied API calls from the revision under test.
- Configure the cron schedule and OIDC identity, then run a one-off schedule test against the intended endpoint.
Explanation
Correct Answer
C:Deploy the intended identity and run allowed and denied API calls from the revision under test. In this scenario, a developer grants a human user's permissions to a service rather than using a dedicated service identity. Validate the change by checking that the service accesses only approved data and does not inherit a developer's broad personal permissions.
Incorrect Answers
A:Define separate appropriate probes and test an unready-but-running Pod and a truly deadlocked process. This action changes a different concern, GKE readiness versus liveness probes. That may help elsewhere, but it does not make the change required for cloud run execution identity attachment.
B:Update Pod resource specifications and test load under representative cluster contention. This action changes a different concern, GKE resource requests and limits. That may help elsewhere, but it does not make the change required for cloud run execution identity attachment.
D:Configure the cron schedule and OIDC identity, then run a one-off schedule test against the intended endpoint. This action changes a different concern, Cloud Scheduler invoking a private service. That may help elsewhere, but it does not make the change required for cloud run execution identity attachment.
Question 480
A developer grants a human user's permissions to a service rather than using a dedicated service identity. The team has tried a correction. Which measurable outcome most directly demonstrates that this issue is resolved? Select ONE best answer.
- Interactive requests terminate predictably while long jobs complete independently with verifiable status.
- The job invokes the private endpoint on schedule without requiring a persistent cron process in a scale-to-zero service.
- The service accesses only approved data and does not inherit a developer's broad personal permissions.
- Replica scaling follows the target utilization and keeps application capacity within tested bounds.
Explanation
Correct Answer
C:The service accesses only approved data and does not inherit a developer's broad personal permissions. In this scenario, a developer grants a human user's permissions to a service rather than using a dedicated service identity. The original diagnosis should have included this step: inspect revision service account, actual access tokens, target resource permissions, and who invokes the service.
Incorrect Answers
A:Interactive requests terminate predictably while long jobs complete independently with verifiable status. It would not establish the success condition for Cloud Run execution identity attachment. A more direct response is to recognize that the service accesses only approved data and does not inherit a developer's broad personal permissions.
B:The job invokes the private endpoint on schedule without requiring a persistent cron process in a scale-to-zero service. That result could support testing of Cloud Scheduler invoking a private service: Cloud Scheduler triggers work on a schedule, while Cloud Run request containers are not a reliable place to run an always-on system cron daemon. A more direct response is to recognize that the service accesses only approved data and does not inherit a developer's broad personal permissions.
D:Replica scaling follows the target utilization and keeps application capacity within tested bounds. It would not establish the success condition for Cloud Run execution identity attachment. A more direct response is to recognize that the service accesses only approved data and does not inherit a developer's broad personal permissions.