Skip to content

Commit

Permalink
ci/cd: add workflow for destoryin infrastructure
Browse files Browse the repository at this point in the history
  • Loading branch information
VasaOfficial committed Jul 22, 2024
1 parent b7a489b commit 164c2a4
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 2 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/destroy-infra.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Destroy Infrastructure

on:
workflow_dispatch:

jobs:
destroy:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./user-service/terraform

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Terraform
uses: hashicorp/setup-terraform@v3

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: eu-central-1

- name: Initialize Terraform
run: terraform init

- name: Terraform Destroy
run: terraform destroy -auto-approve
3 changes: 1 addition & 2 deletions user-service/app/handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ dotenv.config()

export * from './handlers/userHandler'
// export * from './handlers/cartHandler'
// export * from './handlers/orderHandler'
// test
// export * from './handlers/orderHandler'

0 comments on commit 164c2a4

Please sign in to comment.