Skip to content

Commit

Permalink
fix: gh action tf validate for provider alias
Browse files Browse the repository at this point in the history
  • Loading branch information
sean-freeman committed Nov 15, 2024
1 parent 120da5c commit 0789860
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/terraform_validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,20 @@ jobs:
cd "./${{ matrix.terraform_module_parent }}"
for d in */; do
cd "$d"
if [ "${{ matrix.terraform_module_parent }}" == "ibmcloud_powervs" ]
then
echo 'provider "ibm" {' > temp_provider.tf
echo ' alias = "main"' > temp_provider.tf
echo ' ibmcloud_api_key = "xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"' > temp_provider.tf
echo ' region = "eu-es"' > temp_provider.tf
echo '}' > temp_provider.tf
echo 'provider "ibm" {' > temp_provider.tf
echo ' alias = "powervs_secure_enclave"' > temp_provider.tf
echo ' ibmcloud_api_key = "xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"' > temp_provider.tf
echo ' region = "mad"' > temp_provider.tf
echo ' zone = "mad04"' > temp_provider.tf
echo '}' > temp_provider.tf
fi
terraform validate -no-color
cd ..
done

0 comments on commit 0789860

Please sign in to comment.