PROFESSIONAL-CLOUD-DEVELOPER · Question #193
Your development team has built several Cloud Functions using Java along with corresponding integration and service tests. You are building and deploying the functions and launching the tests using Cl
The correct answer is D. Verify that the Cloud Build service account is assigned the Cloud Functions Developer role.. The correct answer is D: Verify that the Cloud Build service account is assigned the Cloud Functions Developer role. When Cloud Build deploys a Cloud Function, it uses its service account to make API calls to the Cloud Functions API. If this service account lacks the necessary IA
Question
Your development team has built several Cloud Functions using Java along with corresponding integration and service tests. You are building and deploying the functions and launching the tests using Cloud Build. Your Cloud Build job is reporting deployment failures immediately after successfully validating the code. What should you do?
Options
- ACheck the maximum number of Cloud Function instances.
- BVerify that your Cloud Build trigger has the correct build parameters.
- CRetry the tests using the truncated exponential backoff polling strategy.
- DVerify that the Cloud Build service account is assigned the Cloud Functions Developer role.
How the community answered
(31 responses)- A6% (2)
- B10% (3)
- C3% (1)
- D81% (25)
Explanation
The correct answer is D: Verify that the Cloud Build service account is assigned the Cloud Functions Developer role. When Cloud Build deploys a Cloud Function, it uses its service account to make API calls to the Cloud Functions API. If this service account lacks the necessary IAM permissions (specifically the roles/cloudfunctions.developer role or equivalent), the deployment call will be rejected with an authorization error - which appears as a deployment failure immediately after the build step succeeds. The fact that code validation passes but deployment fails is a classic indicator of an IAM/permissions issue, not a code or configuration problem. Checking max instances (A) would be relevant for runtime scaling, not deployment failures. Incorrect build trigger parameters (B) would likely cause failures during the build stage, not after validation. Exponential backoff (C) is a retry strategy for transient errors, not a fix for consistent permission-related deployment failures.
Topics
Community Discussion
No community discussion yet for this question.