diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 8bef4fe..b3f7ceb 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -61,7 +61,14 @@ jobs: - name: Terraform Vars - Cluster Name run: echo "TF_VAR_vcenter_cluster_name=tfacc-${SHORT_SHA}" >> $GITHUB_ENV - name: Terraform Vars - Project ID - run: echo "TF_VAR_project_id=${{ steps.project.outputs.projectID }}" >> $GITHUB_ENV + run: | + echo "TF_VAR_project_id=${{ steps.project.outputs.projectID }}" >> $GITHUB_ENV + echo "METAL_AUTH_TOKEN: ${{ steps.project.outputs.projectToken }}" >> $GITHUB_ENV # used by Equinix provider when auth_token not specified + echo "TF_VAR_auth_token: ${{ steps.project.outputs.projectToken }}" >> $GITHUB_ENV + echo "TF_VAR_s3_url: ${{ secrets.S3_URL }}" >> $GITHUB_ENV + echo "TF_VAR_object_store_bucket_name: ${{ secrets.S3_BUCKET_NAME }}" >> $GITHUB_ENV + echo "TF_VAR_s3_access_key: ${{ secrets.S3_ACCESS_KEY }}" >> $GITHUB_ENV + echo "TF_VAR_s3_secret_key: ${{ secrets.S3_SECRET_KEY }}" >> $GITHUB_ENV - name: Terraform Plan id: plan timeout-minutes: 120 @@ -71,21 +78,11 @@ jobs: timeout-minutes: 120 continue-on-error: true run: terraform apply -input=false tfplan - env: - METAL_AUTH_TOKEN: ${{ steps.project.outputs.projectToken }} # used by Equinix provider when auth_token not specified - TF_VAR_auth_token: ${{ steps.project.outputs.projectToken }} - TF_VAR_s3_url: ${{ secrets.S3_URL }} - TF_VAR_object_store_bucket_name: ${{ secrets.S3_BUCKET_NAME }} - TF_VAR_s3_access_key: ${{ secrets.S3_ACCESS_KEY }} - TF_VAR_s3_secret_key: ${{ secrets.S3_SECRET_KEY }} - name: Terraform Destroy continue-on-error: true id: destroy if: ${{ always() }} run: terraform destroy -input=false -auto-approve - env: - TF_VAR_auth_token: ${{ steps.project.outputs.projectToken }} - METAL_AUTH_TOKEN: ${{ steps.project.outputs.projectToken }} - name: Project Delete if: ${{ always() }} uses: equinix-labs/metal-sweeper-action@v0.6.1