From 71970b8c4cebc0b67b6496d19a128be77e7c1016 Mon Sep 17 00:00:00 2001 From: dylanmpeck Date: Wed, 19 May 2021 14:48:29 -0700 Subject: [PATCH 1/2] 'v' prefix not accepted by modern tf --- terraform/provider.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/terraform/provider.tf b/terraform/provider.tf index 660c8fb..146288a 100644 --- a/terraform/provider.tf +++ b/terraform/provider.tf @@ -20,7 +20,7 @@ limitations under the License. // develop this example. provider "google" { - version = "~> v2.11.0" + version = "~> 2.11.0" } provider "null" { From d0476044c91ac03ecc8cc11a15e78bb0d8c9cd50 Mon Sep 17 00:00:00 2001 From: dylanmpeck Date: Wed, 19 May 2021 15:39:37 -0700 Subject: [PATCH 2/2] remove quotes from server variable New terraform version is adding quotes to SERVER_ADDRESS variable which breaks the validate script. Added lines to remove surrounding quotes only if they exist from the variable. --- scripts/validate.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/validate.sh b/scripts/validate.sh index 6b4ca6b..0e2c2cd 100755 --- a/scripts/validate.sh +++ b/scripts/validate.sh @@ -128,11 +128,17 @@ check_dependency_installed terraform echo "" echo "Validating Debian VM Webapp..." SERVER_ADDRESS=$(cd "$ROOT/terraform" && terraform output web_server_address) +# Remove surrounding quotes from URL +SERVER_ADDRESS="${SERVER_ADDRESS%\"}" +SERVER_ADDRESS="${SERVER_ADDRESS#\"}" validate_deployment "$SERVER_ADDRESS" echo "" echo "Validating Container OS Webapp..." SERVER_ADDRESS=$(cd "$ROOT/terraform" && terraform output cos_server_address) +# Remove surrounding quotes from URL +SERVER_ADDRESS="${SERVER_ADDRESS%\"}" +SERVER_ADDRESS="${SERVER_ADDRESS#\"}" validate_deployment "$SERVER_ADDRESS" echo ""