ci: check if CLI version supports --subscriptionID flag before using it (#3364)

Signed-off-by: Daniel Weiße <dw@edgeless.systems>
This commit is contained in:
Daniel Weiße 2024-09-18 10:04:29 +02:00 committed by GitHub
parent effb086cd3
commit 89eb8ca6ae
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -79,14 +79,19 @@ runs:
shell: bash
if: inputs.cloudProvider == 'azure'
run: |
extraFlags=""
if [[ $(constellation iam create azure --help | grep -c -- --subscriptionID) -ne 0 ]]; then
extraFlags="--subscriptionID=${{ inputs.azureSubscriptionID }}"
fi
constellation iam create azure \
--subscriptionID="${{ inputs.azureSubscriptionID }}" \
--region="${{ inputs.azureRegion }}" \
--resourceGroup="${{ inputs.namePrefix }}-rg" \
--servicePrincipal="${{ inputs.namePrefix }}-sp" \
--update-config \
--tf-log=DEBUG \
--yes
--yes ${extraFlags}
- name: Constellation iam create gcp
shell: bash