An infrastructure team is preparing to deploy a set of virtual machine instances into a target Google Cloud project named `infra-prod-882` using Google Cloud Deployment Manager. When executing the `gcloud deployment-manager deployments create` command, the deployment fails with an error stating that `compute.googleapis.com` is disabled. Which action must be taken to successfully execute the deployment?
- Enable the Compute Engine API directly within the target project `infra-prod-882` before launching the deployment.Answer
- BEnable the Compute Engine API in the billing project hosting the linked Cloud Billing Account.
- CEnable the Compute Engine API at the organization root level to allow permission inheritance down the resource hierarchy.
- DApply an Organization Policy at the folder level to automatically activate service APIs for child projects.
Answer
Enable the Compute Engine API directly within the target project `infra-prod-882` before launching the deployment.
In Google Cloud, infrastructure management tools such as Deployment Manager and Terraform interact with Google Cloud APIs on behalf of the project. Every GCP project must have the relevant service APIs (such as `compute.googleapis.com` for VMs and networks) explicitly enabled within that specific project before resources can be created.
Step-by-Step Solution
Key Concept
Project-scoped API enablement for Infrastructure as Code deployments
Estimated Time:1m 30s