Skip to content

Destroy AWS

Destroy AWS #24

name: "Destroy AWS"
on:
workflow_dispatch:
inputs:
prefix:
description: "Prefix for the deployment"
required: false
default: "armonik-cicd"
bootstrap:
description: "Destroy the S3 for the tfstate"
type: boolean
required: false
default: true
jobs:
destroy:
name: "Destroy"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: Install Dependencies
uses: aneoconsulting/ArmoniK.Action.Deploy/dependencies@main
with:
aws: true
terraform: true
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: eu-west-3
- id: destroy
name: Destroy deployment
uses: aneoconsulting/ArmoniK.Action.Deploy/destroy@main
with:
type: aws
prefix: ${{ inputs.prefix }}
- if: ${{ inputs.bootstrap }}
id: bootstrap-destroy
name: Destroy Bootstrap
uses: aneoconsulting/ArmoniK.Action.Deploy/bootstrap-destroy@main
with:
type: aws
prefix: ${{ inputs.prefix }}