-
Notifications
You must be signed in to change notification settings - Fork 233
56 lines (47 loc) · 1.65 KB
/
e2e-parallel-destroy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: e2e-parallel-destroy-only
on:
workflow_dispatch:
inputs:
TFDestroy:
description: 'Destroy TF Automatically (false/true) - Default: true'
required: true
default: 'true'
concurrency: e2e-parallel-destroy
jobs:
deploy:
name: Run e2e test
runs-on: ubuntu-latest
# These permissions are needed to interact with GitHub's OIDC Token endpoint.
permissions:
id-token: write
contents: read
strategy:
fail-fast: false
matrix:
include:
- example_path: analytics/terraform/emr-eks-karpenter
- example_path: analytics/terraform/spark-k8s-operator
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup backend
# Un-comment remote backend for use in workflow
run: sed -i "s/# //g" ${{ matrix.example_path }}/versions.tf
- name: Auth AWS
uses: aws-actions/configure-aws-credentials@v1-node16
with:
role-to-assume: ${{ secrets.ROLE_TO_ASSUME }}
aws-region: us-west-2
role-duration-seconds: 3600
role-session-name: GithubActions-Session
- name: Setup Terraform
uses: hashicorp/setup-terraform@v2
with:
terraform_version: 1.0.0
- name: Terraform Destroy
working-directory: ${{ matrix.example_path }}
run: |
terraform init -upgrade=true
terraform destroy -target=module.eks_blueprints_kubernetes_addons -no-color -input=false -auto-approve
terraform destroy -target=module.eks_blueprints -no-color -input=false -auto-approve
terraform destroy -no-color -input=false -auto-approve