softwaremill / terraform-gke-bootstrap

Apache License 2.0
3 stars 1 forks source link

Test the case when project already exists but compute api is disabled #5

Open gkocur opened 2 years ago

gkocur commented 2 years ago

GCP returns 403 when trying to list the zones.

Sztigar commented 2 years ago

Error when trying to run on existing project without compute api enabled:

Error: Error creating Address: googleapi: Error 403: Compute Engine API has not been used in project 656881381651 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/compute.googleapis.com/overview?project=656881381651 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.
│ Details:
│ [
│   {
│     "@type": "type.googleapis.com/google.rpc.Help",
│     "links": [
│       {
│         "description": "Google developers console API activation",
│         "url": "https://console.developers.google.com/apis/api/compute.googleapis.com/overview?project=656881381651"
│       }
│     ]
│   },
│   {
│     "@type": "type.googleapis.com/google.rpc.ErrorInfo",
│     "domain": "googleapis.com",
│     "metadatas": {
│       "consumer": "projects/656881381651",
│       "service": "compute.googleapis.com"
│     },
│     "reason": "SERVICE_DISABLED"
│   }
│ ]
│ , accessNotConfigured
│
│   with google_compute_address.cloud_nat_address[0],
│   on main.tf line 47, in resource "google_compute_address" "cloud_nat_address":
│   47: resource "google_compute_address" "cloud_nat_address" {
│
╵
╷
│ Error: Error creating Network: googleapi: Error 403: Compute Engine API has not been used in project 656881381651 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/compute.googleapis.com/overview?project=656881381651 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.
│ Details:
│ [
│   {
│     "@type": "type.googleapis.com/google.rpc.Help",
│     "links": [
│       {
│         "description": "Google developers console API activation",
│         "url": "https://console.developers.google.com/apis/api/compute.googleapis.com/overview?project=656881381651"
│       }
│     ]
│   },
│   {
│     "@type": "type.googleapis.com/google.rpc.ErrorInfo",
│     "domain": "googleapis.com",
│     "metadatas": {
│       "consumer": "projects/656881381651",
│       "service": "compute.googleapis.com"
│     },
│     "reason": "SERVICE_DISABLED"
│   }
│ ]
│ , accessNotConfigured
│
│   with module.network.module.vpc.google_compute_network.network,
│   on .terraform/modules/network/modules/vpc/main.tf line 20, in resource "google_compute_network" "network":
│   20: resource "google_compute_network" "network" {
│
╵
Releasing state lock. This may take a few moments...
ERRO[0094] Terraform invocation failed in /Users/pomidor/mqperf/terraform/live/kafka/gcp/gke/.terragrunt-cache/GZHqUD68hnL-JUE7JpUgM9LxUFA/gZ1O2qpuXAD10HhXBtT86U34HXA  prefix=[/Users/pomidor/mqperf/terraform/live/kafka/gcp/gke]
ERRO[0094] 1 error occurred:
        * exit status 1