Skip to content

Manual Destroy

Manual Destroy #27

name: 'Manual Destroy'
on:
workflow_dispatch:
jobs:
setup:
name: 'Manual Destroy'
runs-on: self-hosted
env:
TF_VAR_selectel_domain_name: ${{ secrets.SELECTEL_ID }}
TF_VAR_selectel_user_admin_user: ${{ secrets.SERVICE_USER }}
TF_VAR_selectel_user_admin_password: ${{ secrets.SERVICE_PASSWORD }}
steps:
- name: Checkout the repo
uses: actions/checkout@v3
- name: Setup NodeJS v20
uses: actions/setup-node@v4
with:
node-version: 20
- name: Setup Terraform
uses: hashicorp/[email protected]
with:
terraform_version: "1.5.7"
- name: Init Terraform
run: >
terraform init -reconfigure
-backend-config="bucket=github-terraform-state"
-backend-config="endpoint=s3.ru-1.storage.selcloud.ru"
-backend-config="key=github-infra-examples.tfstate"
-backend-config="region=ru-1"
-backend-config="skip_region_validation=true"
-backend-config="skip_credentials_validation=true"
-backend-config="access_key=${{ secrets.S3_ACCESS_KEY }}"
-backend-config="secret_key=${{ secrets.S3_SECRET_KEY }}"
- name: Terraform destroy
run: terraform destroy -auto-approve