Destroy k8s clusterpipeline #11
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Destroy k8s clusterpipeline | |
| on: | |
| workflow_dispatch: | |
| jobs: | |
| DEV: | |
| runs-on: rhel_arm | |
| #environment: | |
| steps: | |
| - name: Import secrets hashicorp | |
| uses: hashicorp/vault-action@v2.4.0 | |
| with: | |
| url: ${{secrets.VAULT_SERVER}} | |
| token: ${{secrets.VAULT_TOKEN}} | |
| tlsSkipVerify: true #add to runner later /usr/local/share/ca-certificates/vault-ca.crt | |
| secrets: | | |
| tools/data/aws aws_user | AWS_USER; | |
| tools/data/aws aws_password |AWS_PASSWORD; | |
| # tools/data/aws aws_ami_mumb | AWS_AMI_ID ; | |
| - name: Destroying the Infrastructure | |
| run: | | |
| cd k8s-infra-selfmanaged; terraform destroy -var-file=env-dev/main.tfvars -auto-approve | |
| env: | |
| TF_VAR_aws_user: ${{secrets.AWS_USER}} | |
| TF_VAR_aws_password: ${{secrets.AWS_PASSWORD}} | |
| # TF_VAR_aws_ami_id: ${{env.AWS_AMI_ID}} | |