목차
📦terraform-slack-app
┣ 📂src
┃ ┣ 📂listeners
┃ ┃ ┣ 📂handlers
┃ ┃ ┃ ┣ 📜terraform_apply.py
┃ ┃ ┃ ┣ 📜terraform_destroy.py
┃ ┃ ┃ ┗ 📜terraform_list_states.py
┃ ┃ ┗ 📜commands.py
┃ ┣ 📜app.py
┃ ┗ 📜requirements.txt
┣ 📜.gitignore
┣ 📜Dockerfile
┣ 📜LICENSE
┣ 📜README.md
┗ 📜template.yaml
Source Code
GitHub - iamhansko/terraform-slack-app: Terraform Apply/Destroy within Slack
자신의 Slack Workspace에 설치하여 Terraform Apply/Destroy 등의 명령어를 수행할 수 있습니다.
/list_states
/apply [State_이름]
/destroy [State_이름]
Terraform State(main.tf) 바탕으로 생성된 AWS 리소스 삭제하기
/list_states
로 조회되는 State_이름 중 하나를 선택해
/destroy State_이름
을 수행하면
해당 State를 바탕으로 이전에 생성되었던 AWS 리소스를 삭제합니다.
Terraform State(main.tf) 삭제
**src/listeners/handlers/terraform_destroy.py
**에서 35, 36번째 줄의 주석을 풀면