Skip to content

Commit

Permalink
Dev Environment Destroy (#1329)
Browse files Browse the repository at this point in the history
* Destroy env test

* debug

* attempting to destroy

* Destroy all the things

* Destroy all the things
  • Loading branch information
ben851 authored May 14, 2024
1 parent 6504da4 commit cf33776
Showing 1 changed file with 106 additions and 103 deletions.
209 changes: 106 additions & 103 deletions .github/workflows/terragrunt_destroy_environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,14 @@ defaults:
env:
AWS_REGION: ca-central-1


permissions:
id-token: write # This is required for requesting the OIDC JWT
contents: read # This is required for actions/checkout

jobs:
terraform-apply:
terraform-destroy:

runs-on: ubuntu-latest

steps:
Expand All @@ -33,110 +39,107 @@ jobs:
- name: Setup Terraform tools
uses: cds-snc/terraform-tools-setup@v1
env: # In case you want to override default versions
CONFTEST_VERSION: 0.30.0
TERRAFORM_VERSION: 1.6.2
TERRAGRUNT_VERSION: 0.44.4
TF_SUMMARIZE_VERSION: 0.2.3
CONFTEST_VERSION: 0.30.0
TERRAFORM_VERSION: 1.6.2
TERRAGRUNT_VERSION: 0.44.4
TF_SUMMARIZE_VERSION: 0.2.3


- name: Inject token authentication
run: |
git config --global url."https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/".insteadOf "https://github.com/"
- name: Echo hello world
run: |
echo "Hello, world!"
# - name: Apply aws/common
# run: |
# cd env/production/common
# terragrunt apply --terragrunt-non-interactive -auto-approve

# - name: Apply aws/ecr
# run: |
# cd env/production/ecr
# terragrunt apply --terragrunt-non-interactive -auto-approve

# - name: Apply aws/ses_receiving_emails
# run: |
# cd env/production/ses_receiving_emails
# terragrunt apply --terragrunt-non-interactive -auto-approve

# - name: Apply aws/ses_to_sqs_email_callbacks
# run: |
# cd env/production/ses_to_sqs_email_callbacks
# terragrunt apply --terragrunt-non-interactive -auto-approve

# - name: Apply aws/sns_to_sqs_sms_callbacks
# run: |
# cd env/production/sns_to_sqs_sms_callbacks
# terragrunt apply --terragrunt-non-interactive -auto-approve

# - name: Apply aws/pinpoint_to_sqs_sms_callbacks
# run: |
# cd env/production/pinpoint_to_sqs_sms_callbacks
# terragrunt apply --terragrunt-non-interactive -auto-approve

# - name: Apply aws/dns
# run: |
# cd env/production/dns
# terragrunt apply --terragrunt-non-interactive -auto-approve

# - name: Apply aws/ses_validation_dns_entries
# run: |
# cd env/production/ses_validation_dns_entries
# terragrunt apply --terragrunt-non-interactive -auto-approve

# - name: Apply aws/cloudfront
# run: |
# cd env/production/cloudfront
# terragrunt apply --terragrunt-non-interactive -auto-approve

# - name: Apply aws/eks
# run: |
# cd env/production/eks
# terragrunt apply --terragrunt-non-interactive -auto-approve

# - name: Apply aws/elasticache
# run: |
# cd env/production/elasticache
# terragrunt apply --terragrunt-non-interactive -auto-approve

# - name: Apply aws/rds
# run: |
# cd env/production/rds
# terragrunt apply --terragrunt-non-interactive -auto-approve

# - name: Apply aws/lambda-api
# run: |
# cd env/production/lambda-api
# terragrunt apply --terragrunt-non-interactive -auto-approve

# - name: Apply aws/heartbeat
# run: |
# cd env/production/heartbeat
# terragrunt apply --terragrunt-non-interactive -auto-approve

# - name: Apply aws/database-tools
# run: |
# cd env/production/database-tools
# terragrunt apply --terragrunt-non-interactive -auto-approve

# - name: Apply aws/quicksight
# run: |
# cd env/production/quicksight
# terragrunt apply --terragrunt-non-interactive -auto-approve

# - name: Apply aws/lambda-google-cidr
# run: |
# cd env/production/lambda-google-cidr
# terragrunt apply --terragrunt-non-interactive -auto-approve

# - name: Apply aws/system_status
# run: |
# cd env/production/system_status
# terragrunt apply --terragrunt-non-interactive -auto-approve

# - name: Apply aws/system_status_static_site
# run: |
# cd env/production/system_status_static_site
# terragrunt apply --terragrunt-non-interactive -auto-approve
- name: Destroy aws/system_status_static_site
run: |
cd env/dev/system_status_static_site
terragrunt destroy --terragrunt-non-interactive -auto-approve
- name: Destroy aws/system_status
run: |
cd env/dev/system_status
terragrunt destroy --terragrunt-non-interactive -auto-approve
- name: Destroy aws/lambda-google-cidr
run: |
cd env/dev/lambda-google-cidr
terragrunt destroy --terragrunt-non-interactive -auto-approve
- name: Destroy aws/quicksight
run: |
cd env/dev/quicksight
terragrunt destroy --terragrunt-non-interactive -auto-approve
- name: Destroy aws/database-tools
run: |
cd env/dev/database-tools
terragrunt destroy --terragrunt-non-interactive -auto-approve
- name: Destroy aws/heartbeat
run: |
cd env/dev/heartbeat
terragrunt destroy --terragrunt-non-interactive -auto-approve
- name: Destroy aws/lambda-api
run: |
cd env/dev/lambda-api
terragrunt destroy --terragrunt-non-interactive -auto-approve
- name: Destroy aws/rds
run: |
cd env/dev/rds
terragrunt destroy --terragrunt-non-interactive -auto-approve
- name: Destroy aws/elasticache
run: |
cd env/dev/elasticache
terragrunt destroy --terragrunt-non-interactive -auto-approve
- name: Destroy aws/eks
run: |
cd env/dev/eks
terragrunt destroy --terragrunt-non-interactive -auto-approve
- name: Destroy aws/cloudfront
run: |
cd env/dev/cloudfront
terragrunt destroy --terragrunt-non-interactive -auto-approve
- name: Destroy aws/ses_validation_dns_entries
run: |
cd env/dev/ses_validation_dns_entries
terragrunt destroy --terragrunt-non-interactive -auto-approve
- name: Destroy aws/dns
run: |
cd env/dev/dns
terragrunt destroy --terragrunt-non-interactive -auto-approve
- name: Destroy aws/pinpoint_to_sqs_sms_callbacks
run: |
cd env/dev/pinpoint_to_sqs_sms_callbacks
terragrunt destroy --terragrunt-non-interactive -auto-approve
- name: Destroy aws/sns_to_sqs_sms_callbacks
run: |
cd env/dev/sns_to_sqs_sms_callbacks
terragrunt destroy --terragrunt-non-interactive -auto-approve
- name: Destroy aws/ses_to_sqs_email_callbacks
run: |
cd env/dev/ses_to_sqs_email_callbacks
terragrunt destroy --terragrunt-non-interactive -auto-approve
- name: Destroy aws/ses_receiving_emails
run: |
cd env/dev/ses_receiving_emails
terragrunt destroy --terragrunt-non-interactive -auto-approve
- name: Destroy aws/ecr
run: |
cd env/dev/ecr
terragrunt destroy --terragrunt-non-interactive -auto-approve
- name: Destroy aws/common
run: |
cd env/dev/common
terragrunt destroy --terragrunt-non-interactive -auto-approve

0 comments on commit cf33776

Please sign in to comment.