Skip to content

Commit

Permalink
ci: run terraform apply in provider example test with timeout (#3482)
Browse files Browse the repository at this point in the history
* Run terraform apply with timeouts
* Ignore lock file when running terraform destroy

---------

Signed-off-by: Daniel Weiße <[email protected]>
  • Loading branch information
daniel-weisse authored Nov 21, 2024
1 parent 521ff0d commit 775ba22
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/e2e-test-provider-example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -337,12 +337,12 @@ jobs:
sudo sh -c 'echo "127.0.0.1 license.confidential.cloud" >> /etc/hosts'
terraform init
if [[ "${{ inputs.attestationVariant }}" == "azure-sev-snp" ]]; then
terraform apply -target module.azure_iam -auto-approve
terraform apply -target module.azure_infrastructure -auto-approve
timeout 1h terraform apply -target module.azure_iam -auto-approve
timeout 1h terraform apply -target module.azure_infrastructure -auto-approve
${{ github.workspace }}/build/constellation maa-patch "$(terraform output -raw maa_url)"
terraform apply -target constellation_cluster.azure_example -auto-approve
timeout 1h terraform apply -target constellation_cluster.azure_example -auto-approve
else
terraform apply -auto-approve
timeout 1h terraform apply -auto-approve
fi
- name: Cleanup Terraform Cluster on failure
Expand All @@ -353,7 +353,7 @@ jobs:
shell: bash
run: |
terraform init
terraform destroy -auto-approve
terraform destroy -auto-approve -lock=false
- name: Add Provider to local Terraform registry # needed if release version was used before
if: inputs.providerVersion != ''
Expand Down Expand Up @@ -407,7 +407,7 @@ jobs:
shell: bash
run: |
terraform init --upgrade
terraform apply -auto-approve
timeout 1h terraform apply -auto-approve
- name: Assert upgrade successful
working-directory: ${{ github.workspace }}/cluster
Expand Down Expand Up @@ -475,7 +475,7 @@ jobs:
shell: bash
run: |
terraform init
terraform destroy -auto-approve
terraform destroy -auto-approve -lock=false
- name: Notify about failure
if: |
Expand Down

0 comments on commit 775ba22

Please sign in to comment.