From e1156c75afc2ee6d6c44bc802fae26fa82d8d0fa Mon Sep 17 00:00:00 2001 From: Andrew Hemming Date: Tue, 9 Aug 2022 10:31:16 +0000 Subject: [PATCH 1/3] Fix authorization bearer for existing terraform version --- terraform/publish.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/terraform/publish.sh b/terraform/publish.sh index 720ab56a..41002943 100755 --- a/terraform/publish.sh +++ b/terraform/publish.sh @@ -60,7 +60,7 @@ if [[ "$REGISTRY_URL" == "" ]]; then fi -EXISTING_VERSION=$(curl "${REGISTRY_URL}${MODULE_NAME}/versions" | jq -c '.modules[0].versions[] | select(.version == '\"$VERSION\"')') +EXISTING_VERSION=$(curl -H "Authorization: Bearer $TF_REGISTRY_TOKEN" "${REGISTRY_URL}${MODULE_NAME}/versions" | jq -c '.modules[0].versions[] | select(.version == '\"$VERSION\"')') if [[ ! -z "$EXISTING_VERSION" ]]; then echo "Version $VERSION already exists" From a3c93acde495f6f904c808be8b62489078e436aa Mon Sep 17 00:00:00 2001 From: Andrew Hemming Date: Wed, 10 Aug 2022 12:34:03 +0000 Subject: [PATCH 2/3] Fix terraform-v2 --- terraform-v2/publish.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/terraform-v2/publish.sh b/terraform-v2/publish.sh index 20dbaffb..053d9da9 100755 --- a/terraform-v2/publish.sh +++ b/terraform-v2/publish.sh @@ -59,7 +59,7 @@ if [[ "$REGISTRY_URL" == "" ]]; then exit 2 fi -EXISTING_VERSION=$(curl "${REGISTRY_URL}${MODULE_NAME}/versions" | jq -c '.modules[0].versions[] | select(.version == '\"$VERSION\"')') +EXISTING_VERSION=$(curl -H "Authorization: Bearer $TF_REGISTRY_TOKEN" "${REGISTRY_URL}${MODULE_NAME}/versions" | jq -c '.modules[0].versions[] | select(.version == '\"$VERSION\"')') if [[ ! -z "$EXISTING_VERSION" ]]; then echo "Version $VERSION already exists" From 8aa1388bacef6ea40fbc5a394d7b191d42a867a6 Mon Sep 17 00:00:00 2001 From: Andrew Hemming Date: Thu, 11 Aug 2022 08:22:43 +0000 Subject: [PATCH 3/3] Update changelog.md --- terraform-v2/CHANGELOG.md | 3 +++ terraform-v2/orb_version.txt | 2 +- terraform/CHANGELOG.md | 4 ++++ terraform/orb_version.txt | 2 +- 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/terraform-v2/CHANGELOG.md b/terraform-v2/CHANGELOG.md index 4fd02d04..660570a1 100644 --- a/terraform-v2/CHANGELOG.md +++ b/terraform-v2/CHANGELOG.md @@ -3,6 +3,9 @@ All notable changes to the orb will be documented in this file. Orbs are immutable, some orb versions with no significant changes are not listed +## ovotech/terraform-v2@2.4.17 +- Added authentication to the API call for `/versions` + ## ovotech/terraform-v2@2.4.16 - Added target parameter for plan step diff --git a/terraform-v2/orb_version.txt b/terraform-v2/orb_version.txt index e441ae94..65202cdc 100644 --- a/terraform-v2/orb_version.txt +++ b/terraform-v2/orb_version.txt @@ -1 +1 @@ -ovotech/terraform-v2@2.4.16 +ovotech/terraform-v2@2.4.17 diff --git a/terraform/CHANGELOG.md b/terraform/CHANGELOG.md index d8569f35..bf81a38c 100644 --- a/terraform/CHANGELOG.md +++ b/terraform/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to the orb will be documented in this file. Orbs are immutable, some orb versions with no significant changes are not listed +## ovotech/terraform@1.11.16 +## Added +- Added authentication to the API call for `/versions` + ## ovotech/terraform@1.11.15 ## Added - Added target parameter for plan step diff --git a/terraform/orb_version.txt b/terraform/orb_version.txt index 81dcfef5..b9464a9b 100644 --- a/terraform/orb_version.txt +++ b/terraform/orb_version.txt @@ -1 +1 @@ -ovotech/terraform@1.11.15 +ovotech/terraform@1.11.16