From 8e75eec7794c1da57380ccb2910675d6850acf6a Mon Sep 17 00:00:00 2001 From: Rob Charlwood Date: Wed, 15 Jul 2020 07:47:02 +0100 Subject: [PATCH] Updated the README to inform of a race condition surrounding the enabling of Google APIs and services. --- CHANGELOG.md | 6 ++++++ README.md | 12 ++++++++++++ 2 files changed, 18 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index eda5fbe..b4b9389 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,12 @@ Types of changes are: ## Unreleased +## 1.0.1 - 2020-07-15 + +## Changed + +* Updated the README to inform of a race condition surrounding the enabling of Google APIs and services. + ## 1.0.0 - 2020-07-15 ## Added diff --git a/README.md b/README.md index 2482e6a..85b5869 100644 --- a/README.md +++ b/README.md @@ -47,6 +47,18 @@ terraform plan terraform apply ``` +## A word of caution +The apply might fail on the first run due to a race condition. This terraform enables all the required Google APIs and services for you automatically as part of the build. However, sometimes terraform won't pick up the fact that an API has been enabled in time. In these cases you might see a collection of errors similar to the error below: + +```bash +Error: Error creating ManagedZone: googleapi: Error 403: Cloud DNS API has not been used in project 975128182755 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/dns.googleapis.com/overview?project=975128182755 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry., accessNotConfigured + + on dns/main.tf line 1, in resource "google_dns_managed_zone" "public-zone": + 1: resource "google_dns_managed_zone" "public-zone" { +``` + +When this happens, simply leave it a minute or two and then re-apply your terraform. The second run should apply cleanly. + ## For those interested For people with a curious nature, the main meat of the infrastructure that makes multi region load balancing possible lies [here](https://github.com/robcharlwood/multi-region-cloud-run-terraform/blob/master/compute/main.tf#L45-L154).