Skip to content

Commit 0789860

Browse files
committed
fix: gh action tf validate for provider alias
1 parent 120da5c commit 0789860

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

.github/workflows/terraform_validate.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,20 @@ jobs:
4242
cd "./${{ matrix.terraform_module_parent }}"
4343
for d in */; do
4444
cd "$d"
45+
if [ "${{ matrix.terraform_module_parent }}" == "ibmcloud_powervs" ]
46+
then
47+
echo 'provider "ibm" {' > temp_provider.tf
48+
echo ' alias = "main"' > temp_provider.tf
49+
echo ' ibmcloud_api_key = "xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"' > temp_provider.tf
50+
echo ' region = "eu-es"' > temp_provider.tf
51+
echo '}' > temp_provider.tf
52+
echo 'provider "ibm" {' > temp_provider.tf
53+
echo ' alias = "powervs_secure_enclave"' > temp_provider.tf
54+
echo ' ibmcloud_api_key = "xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"' > temp_provider.tf
55+
echo ' region = "mad"' > temp_provider.tf
56+
echo ' zone = "mad04"' > temp_provider.tf
57+
echo '}' > temp_provider.tf
58+
fi
4559
terraform validate -no-color
4660
cd ..
4761
done

0 commit comments

Comments
 (0)