A Cloud Engineer is using Google Cloud Deployment Manager to deploy infrastructure resources into a newly created target Google Cloud project named `prod-analytics-net`. During the execution of `gcloud deployment-manager deployments create`, the deployment fails because the required Compute Engine API has not been activated. How should the engineer resolve this failure?
- Enable the Compute Engine API in the target project `prod-analytics-net` before running the deployment command again.Answer
- BEnable the Compute Engine API at the Organization node level so that all current and future target projects inherit API activation.
- CGenerate and download a long-lived service account JSON key file with Editor permissions to bypass target project API enablement checks.
- DRe-run the deployment command with the `--region=global` flag to override project-level API dependency checks.
Answer
Enable the Compute Engine API directly within the target project `prod-analytics-net` before executing the deployment.
Enabling the Compute Engine API directly within the target project ensures that Google Cloud accepts API calls to provision resources. Infrastructure as Code tools like Deployment Manager or Terraform require target service APIs to be active in the target project before resource creation can begin.
Step-by-Step Solution
Key Concept
Project-Level API Enablement for Infrastructure Deployment
Estimated Time:1m 30s