Google Professional Cloud Developer Practice Test 23
Question 220
A Cloud Run service cannot reach a database endpoint on a private address and currently sends traffic through public egress. The team has tried a correction. Which measurable outcome most directly demonstrates that this issue is resolved? Select ONE best answer.
- Key governance and cryptographic operations work under intended IAM restrictions without disclosing raw key material.
- Unhealthy backends stop receiving new eligible traffic while healthy capacity serves the request contract.
- The application reaches authorized private resources without unintended public exposure or blanket networking changes.
- The allowed caller invokes the private service successfully while requests without valid identity are denied.
Explanation
Correct Answer
C:The application reaches authorized private resources without unintended public exposure or blanket networking changes. Private VPC egress changes the network path for selected Cloud Run outbound traffic and still requires downstream firewall and identity controls. The original diagnosis should have included this step: inspect destination IP, supported VPC region, egress configuration, firewall rules, and service identity.
Incorrect Answers
A:Key governance and cryptographic operations work under intended IAM restrictions without disclosing raw key material. In this case, the outcome to verify is that the application reaches authorized private resources without unintended public exposure or blanket networking changes. That may help elsewhere, but it does not make the change required for private vpc egress from cloud run.
B:Unhealthy backends stop receiving new eligible traffic while healthy capacity serves the request contract. That result could support testing of backend health and failure routing: A healthy network listener and a healthy application are not necessarily equivalent; routing depends on meaningful health checks. That may help elsewhere, but it does not make the change required for private vpc egress from cloud run.
D:The allowed caller invokes the private service successfully while requests without valid identity are denied. That result could support testing of Cloud Run service-to-service identity tokens: Cloud Run authenticated HTTP invocation validates an identity token audience and caller permissions; generic Google API access tokens are not interchangeable. That may help elsewhere, but it does not make the change required for private vpc egress from cloud run.
Question 221
A team enables private networking but mistakenly assumes all internet calls must be routed through the same VPC destination. Before choosing a remediation, which investigation best isolates the specific cause or unmet dependency? Select ONE best answer.
- Inspect where session state is written, whether it is shared, and what happens during scale-out or instance replacement.
- Inspect client interoperability requirements, message schemas, transport capabilities, latency, and streaming needs.
- Inspect cache keys, expiry settings, update events, tenant identity, and whether responses are permission-dependent.
- Inspect destination IP, supported VPC region, egress configuration, firewall rules, and service identity.
Explanation
Correct Answer
D:Inspect destination IP, supported VPC region, egress configuration, firewall rules, and service identity. Private VPC egress changes the network path for selected Cloud Run outbound traffic and still requires downstream firewall and identity controls. A focused follow-up is to configure the intended network and selected egress policy, then validate access to private and public dependencies. Before choosing a remediation, which investigation best isolates the specific cause or unmet dependency.
Incorrect Answers
A:Inspect where session state is written, whether it is shared, and what happens during scale-out or instance replacement. Autoscaled instances can be ephemeral; affinity does not replace durable shared state or safe per-user authorization. The more informative check is to inspect destination IP, supported VPC region, egress configuration, firewall rules, and service identity.
B:Inspect client interoperability requirements, message schemas, transport capabilities, latency, and streaming needs. REST and gRPC are different interface and transport approaches; a protocol choice must match actual client support and the API contract. The more informative check is to inspect destination IP, supported VPC region, egress configuration, firewall rules, and service identity.
C:Inspect cache keys, expiry settings, update events, tenant identity, and whether responses are permission-dependent. Cache invalidation and tenant-aware keying are correctness and security controls, not merely performance tuning. The more informative check is to inspect destination IP, supported VPC region, egress configuration, firewall rules, and service identity.
Question 222
A team enables private networking but mistakenly assumes all internet calls must be routed through the same VPC destination. The team is choosing a sustainable solution. Which design best meets the stated requirement without broad unrelated changes? Select ONE best answer.
- Use Kubernetes NetworkPolicy for supported traffic isolation and a supported service mesh for additional service-level controls.
- Use Direct VPC egress or a supported connector path when the Cloud Run service needs private VPC access.
- Publish durable business events through Pub/Sub and let independent subscribers process appropriate downstream work asynchronously.
- Use versioned or invalidated cached data with identity-scoped keys and freshness bounds appropriate to the business rule.
Explanation
Correct Answer
B:Use Direct VPC egress or a supported connector path when the Cloud Run service needs private VPC access. Private VPC egress changes the network path for selected Cloud Run outbound traffic and still requires downstream firewall and identity controls. Before rollout, inspect destination IP, supported VPC region, egress configuration, firewall rules, and service identity. A team enables private networking but mistakenly assumes all internet calls must be routed through the same VPC destination. The team is choosing a sustainable solution.
Incorrect Answers
A:Use Kubernetes NetworkPolicy for supported traffic isolation and a supported service mesh for additional service-level controls. This design addresses service mesh versus network policy, where network policies and service meshes operate at different levels; allowing or denying packets does not automatically implement mutual TLS or service observability. The case instead calls for the following: use Direct VPC egress or a supported connector path when the Cloud Run service needs private VPC access.
C:Publish durable business events through Pub/Sub and let independent subscribers process appropriate downstream work asynchronously. This design addresses Pub/Sub decoupled processing architecture, where publish-subscribe messaging decouples production from consumption but consumers still need retry-safe processing and eventual completion visibility. The case instead calls for the following: use Direct VPC egress or a supported connector path when the Cloud Run service needs private VPC access.
D:Use versioned or invalidated cached data with identity-scoped keys and freshness bounds appropriate to the business rule. This design addresses cache freshness and invalidation, where cache invalidation and tenant-aware keying are correctness and security controls, not merely performance tuning. The case instead calls for the following: use Direct VPC egress or a supported connector path when the Cloud Run service needs private VPC access.
Question 223
A team enables private networking but mistakenly assumes all internet calls must be routed through the same VPC destination. An approved limited change can be tested in a safe environment. Which implementation action most directly addresses this scenario? Select ONE best answer.
- Enforce a bounded API policy and test a normal client alongside an intentionally over-budget client.
- Bind the Pod to a dedicated Kubernetes ServiceAccount and grant narrowly scoped cloud permissions to the corresponding principal.
- Configure the intended network and selected egress policy, then validate access to private and public dependencies.
- Configure caller identity to request a token with the intended audience and test authorized and unauthorized calls.
Explanation
Correct Answer
C:Configure the intended network and selected egress policy, then validate access to private and public dependencies. Private VPC egress changes the network path for selected Cloud Run outbound traffic and still requires downstream firewall and identity controls. Validate the change by checking that the application reaches authorized private resources without unintended public exposure or blanket networking changes. An approved limited change can be tested in a safe environment.
Incorrect Answers
A:Enforce a bounded API policy and test a normal client alongside an intentionally over-budget client. This action changes a different concern, API rate limiting and request quota. It cannot substitute for the required control: configure the intended network and selected egress policy, then validate access to private and public dependencies.
B:Bind the Pod to a dedicated Kubernetes ServiceAccount and grant narrowly scoped cloud permissions to the corresponding principal. This action changes a different concern, GKE Workload Identity Federation. It cannot substitute for the required control: configure the intended network and selected egress policy, then validate access to private and public dependencies.
D:Configure caller identity to request a token with the intended audience and test authorized and unauthorized calls. This action changes a different concern, Cloud Run service-to-service identity tokens. It cannot substitute for the required control: configure the intended network and selected egress policy, then validate access to private and public dependencies.
Question 224
A team enables private networking but mistakenly assumes all internet calls must be routed through the same VPC destination. The team has tried a correction. Which measurable outcome most directly demonstrates that this issue is resolved? Select ONE best answer.
- The application can recover from the specified fault within its recovery-time and recovery-point objectives.
- The application reaches authorized private resources without unintended public exposure or blanket networking changes.
- The latest authorized price appears within the defined freshness window, and cached responses preserve access boundaries.
- Latency and data placement meet stated goals without assuming every managed Google Cloud service is globally replicated.
Explanation
Correct Answer
B:The application reaches authorized private resources without unintended public exposure or blanket networking changes. Private VPC egress changes the network path for selected Cloud Run outbound traffic and still requires downstream firewall and identity controls. The original diagnosis should have included this step: inspect destination IP, supported VPC region, egress configuration, firewall rules, and service identity. A team enables private networking but mistakenly assumes all internet calls must be routed through the same VPC destination. The team has tried a correction.
Incorrect Answers
A:The application can recover from the specified fault within its recovery-time and recovery-point objectives. That result could support testing of zonal and regional resiliency: Spreading compute across zones does not automatically replicate state or guarantee continuity after a region-wide disruption. It addresses a different dependency from private vpc egress from cloud run.
C:The latest authorized price appears within the defined freshness window, and cached responses preserve access boundaries. That result could support testing of cache freshness and invalidation: Cache invalidation and tenant-aware keying are correctness and security controls, not merely performance tuning. It addresses a different dependency from private vpc egress from cloud run.
D:Latency and data placement meet stated goals without assuming every managed Google Cloud service is globally replicated. That result could support testing of regional latency and data placement: A product's regional or zonal scope determines placement, failure exposure, and latency; global branding alone does not guarantee global data residency. It addresses a different dependency from private vpc egress from cloud run.
Question 225
A cluster deployment accepts an unreviewed container despite a policy that requires trusted image provenance. Before choosing a remediation, which investigation best isolates the specific cause or unmet dependency? Select ONE best answer.
- Inspect producer and consumer latency, durability, delivery retries, and whether side effects require synchronous confirmation.
- Inspect artifact signatures or attestations, policy enforcement point, provenance, and admitted image digest.
- Inspect whether the requirement is orchestration, point-to-point durable work, a fixed schedule, or an event fan-out.
- Inspect end-user sign-in provider requirements, token validation, session lifecycle, and runtime service identity.
Explanation
Correct Answer
B:Inspect artifact signatures or attestations, policy enforcement point, provenance, and admitted image digest. This checks the actual operating conditions relevant to binary Authorization deployment policy, rather than changing a service before the failure is understood. A focused follow-up is to attach validated attestations to the intended image digest and test both authorized and untrusted image deployments.
Incorrect Answers
A:Inspect producer and consumer latency, durability, delivery retries, and whether side effects require synchronous confirmation. Publish-subscribe messaging decouples production from consumption but consumers still need retry-safe processing and eventual completion visibility. The relevant dependency is binary authorization deployment policy, which this inspection alone does not establish.
C:Inspect whether the requirement is orchestration, point-to-point durable work, a fixed schedule, or an event fan-out. Orchestration, task queues, and cron scheduling solve different trigger and coordination problems despite being able to interact. The relevant dependency is binary authorization deployment policy, which this inspection alone does not establish.
D:Inspect end-user sign-in provider requirements, token validation, session lifecycle, and runtime service identity. End-user authentication and service-to-service IAM authentication are distinct trust boundaries requiring different tokens and policies. The relevant dependency is binary authorization deployment policy, which this inspection alone does not establish.
Question 226
A cluster deployment accepts an unreviewed container despite a policy that requires trusted image provenance. The team is choosing a sustainable solution. Which design best meets the stated requirement without broad unrelated changes? Select ONE best answer.
- Select Cloud API Gateway for supported simpler managed gateway use or Apigee when its broader API management features are necessary.
- Use Identity Platform for supported end-user identity flows and separate application sessions from workload IAM credentials.
- Use Binary Authorization policies and supported attestations to enforce approved container promotion at deployment.
- Distribute eligible components across failure domains and plan data failover matching actual service replication guarantees.
Explanation
Correct Answer
C:Use Binary Authorization policies and supported attestations to enforce approved container promotion at deployment. Artifact storage and verified deployment authorization are separate; Binary Authorization enforces policy based on artifact trust evidence. Before rollout, inspect artifact signatures or attestations, policy enforcement point, provenance, and admitted image digest.
Incorrect Answers
A:Select Cloud API Gateway for supported simpler managed gateway use or Apigee when its broader API management features are necessary. This design addresses API Gateway versus Apigee responsibilities, where a basic managed gateway and a full API management platform overlap in routing but differ in breadth of policy, analytics, and developer lifecycle. Applying it first would leave binary authorization deployment policy unresolved.
B:Use Identity Platform for supported end-user identity flows and separate application sessions from workload IAM credentials. This design addresses identity Platform end-user sign-in, where end-user authentication and service-to-service IAM authentication are distinct trust boundaries requiring different tokens and policies. Applying it first would leave binary authorization deployment policy unresolved.
D:Distribute eligible components across failure domains and plan data failover matching actual service replication guarantees. This design addresses zonal and regional resiliency, where spreading compute across zones does not automatically replicate state or guarantee continuity after a region-wide disruption. Applying it first would leave binary authorization deployment policy unresolved.
Question 227
A cluster deployment accepts an unreviewed container despite a policy that requires trusted image provenance. An approved limited change can be tested in a safe environment. Which implementation action most directly addresses this scenario? Select ONE best answer.
- Create a trigger with correct source and event-type filters, bind destination identity, and replay matching and nonmatching events.
- Attach validated attestations to the intended image digest and test both authorized and untrusted image deployments.
- Benchmark representative transactions and hot-key patterns in the chosen datastore before production migration.
- Assign the scoped identity to the service and remove plaintext keys after rotating any previously exposed secrets.
Explanation
Correct Answer
B:Attach validated attestations to the intended image digest and test both authorized and untrusted image deployments. Artifact storage and verified deployment authorization are separate; Binary Authorization enforces policy based on artifact trust evidence. Validate the change by checking that untrusted images are rejected while policy-compliant images can be deployed under a recorded approval chain.
Incorrect Answers
A:Create a trigger with correct source and event-type filters, bind destination identity, and replay matching and nonmatching events. This action changes a different concern, Eventarc event routing design. That may help elsewhere, but it does not make the change required for binary authorization deployment policy.
C:Benchmark representative transactions and hot-key patterns in the chosen datastore before production migration. This action changes a different concern, Cloud SQL versus Spanner versus Bigtable. That may help elsewhere, but it does not make the change required for binary authorization deployment policy.
D:Assign the scoped identity to the service and remove plaintext keys after rotating any previously exposed secrets. This action changes a different concern, service account and least-privilege API identity. That may help elsewhere, but it does not make the change required for binary authorization deployment policy.
Question 228
A cluster deployment accepts an unreviewed container despite a policy that requires trusted image provenance. The team has tried a correction. Which measurable outcome most directly demonstrates that this issue is resolved? Select ONE best answer.
- Untrusted images are rejected while policy-compliant images can be deployed under a recorded approval chain.
- Over-budget requests are throttled while healthy clients remain within the service capacity budget.
- Authorized operations succeed while unrelated resource access is rejected under least privilege.
- Repeated delivery yields a single authorized business result with traceable completion or failure state.
Explanation
Correct Answer
A:Untrusted images are rejected while policy-compliant images can be deployed under a recorded approval chain. Artifact storage and verified deployment authorization are separate; Binary Authorization enforces policy based on artifact trust evidence. The original diagnosis should have included this step: inspect artifact signatures or attestations, policy enforcement point, provenance, and admitted image digest.
Incorrect Answers
B:Over-budget requests are throttled while healthy clients remain within the service capacity budget. That result could support testing of API rate limiting and request quota: Rate limiting and quota policies regulate request load; they are different from IAM authorization and should produce explicit throttling semantics. A more direct response is to recognize that untrusted images are rejected while policy-compliant images can be deployed under a recorded approval chain.
C:Authorized operations succeed while unrelated resource access is rejected under least privilege. That result could support testing of service account and least-privilege API identity: Service identities and IAM roles authorize Google Cloud APIs; embedding reusable private keys is not necessary for managed runtime credentials. A more direct response is to recognize that untrusted images are rejected while policy-compliant images can be deployed under a recorded approval chain.
D:Repeated delivery yields a single authorized business result with traceable completion or failure state. That result could support testing of retry-safe application side effects: Transient retries and at-least-once event delivery do not imply exactly-once business effects without an idempotent application design. A more direct response is to recognize that untrusted images are rejected while policy-compliant images can be deployed under a recorded approval chain.
Question 229
A team assumes that simply storing an image in Artifact Registry certifies its origin and deployment approval. Before choosing a remediation, which investigation best isolates the specific cause or unmet dependency? Select ONE best answer.
- Inspect current request rate, authenticated client identity, quota policy, 429 responses, and downstream service capacity.
- Inspect affinity configuration, revision traffic allocation, session data dependencies, and failover behavior.
- Inspect end-user sign-in provider requirements, token validation, session lifecycle, and runtime service identity.
- Inspect artifact signatures or attestations, policy enforcement point, provenance, and admitted image digest.
Explanation
Correct Answer
D:Inspect artifact signatures or attestations, policy enforcement point, provenance, and admitted image digest. This checks the actual operating conditions relevant to binary Authorization deployment policy, rather than changing a service before the failure is understood. A focused follow-up is to attach validated attestations to the intended image digest and test both authorized and untrusted image deployments. Before choosing a remediation, which investigation best isolates the specific cause or unmet dependency.
Incorrect Answers
A:Inspect current request rate, authenticated client identity, quota policy, 429 responses, and downstream service capacity. Rate limiting and quota policies regulate request load; they are different from IAM authorization and should produce explicit throttling semantics. To examine the reported mechanism, the team instead needs to inspect artifact signatures or attestations, policy enforcement point, provenance, and admitted image digest.
B:Inspect affinity configuration, revision traffic allocation, session data dependencies, and failover behavior. Affinity influences routing preferences but cannot guarantee durable state or prevent all changes in backend selection. To examine the reported mechanism, the team instead needs to inspect artifact signatures or attestations, policy enforcement point, provenance, and admitted image digest.
C:Inspect end-user sign-in provider requirements, token validation, session lifecycle, and runtime service identity. End-user authentication and service-to-service IAM authentication are distinct trust boundaries requiring different tokens and policies. To examine the reported mechanism, the team instead needs to inspect artifact signatures or attestations, policy enforcement point, provenance, and admitted image digest.
Question 230
A team assumes that simply storing an image in Artifact Registry certifies its origin and deployment approval. The team is choosing a sustainable solution. Which design best meets the stated requirement without broad unrelated changes? Select ONE best answer.
- Use Binary Authorization policies and supported attestations to enforce approved container promotion at deployment.
- Use Eventarc routing with selective event filters and a supported Cloud Run destination for event-driven handling.
- Use Kubernetes NetworkPolicy for supported traffic isolation and a supported service mesh for additional service-level controls.
- Use Firestore for appropriate document-oriented operational data, Cloud Storage for object blobs, and BigQuery for analytical queries.
Explanation
Correct Answer
A:Use Binary Authorization policies and supported attestations to enforce approved container promotion at deployment. Artifact storage and verified deployment authorization are separate; Binary Authorization enforces policy based on artifact trust evidence. Before rollout, inspect artifact signatures or attestations, policy enforcement point, provenance, and admitted image digest. A team assumes that simply storing an image in Artifact Registry certifies its origin and deployment approval. The team is choosing a sustainable solution.
Incorrect Answers
B:Use Eventarc routing with selective event filters and a supported Cloud Run destination for event-driven handling. For this case, artifact storage and verified deployment authorization are separate; Binary Authorization enforces policy based on artifact trust evidence. It cannot substitute for the required control: use Binary Authorization policies and supported attestations to enforce approved container promotion at deployment.
C:Use Kubernetes NetworkPolicy for supported traffic isolation and a supported service mesh for additional service-level controls. This design addresses service mesh versus network policy, where network policies and service meshes operate at different levels; allowing or denying packets does not automatically implement mutual TLS or service observability. It cannot substitute for the required control: use Binary Authorization policies and supported attestations to enforce approved container promotion at deployment.
D:Use Firestore for appropriate document-oriented operational data, Cloud Storage for object blobs, and BigQuery for analytical queries. This design addresses Firestore versus Cloud Storage versus BigQuery, where document stores, object stores, and analytical warehouses solve different persistence problems even if each can hold serialized data. It cannot substitute for the required control: use Binary Authorization policies and supported attestations to enforce approved container promotion at deployment.