Skip to content

Commit

Permalink
ci: check if CLI version supports --subscriptionID flag before usin…
Browse files Browse the repository at this point in the history
…g it (#3364)

Signed-off-by: Daniel Weiße <[email protected]>
  • Loading branch information
daniel-weisse authored Sep 18, 2024
1 parent effb086 commit 89eb8ca
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .github/actions/constellation_iam_create/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 89eb8ca

Please sign in to comment.