diff --git a/.github/workflows/create-self-hosted-runner-ami.yaml b/.github/workflows/create-self-hosted-runner-ami.yaml index e1b5ab55b..627430a6f 100644 --- a/.github/workflows/create-self-hosted-runner-ami.yaml +++ b/.github/workflows/create-self-hosted-runner-ami.yaml @@ -27,4 +27,6 @@ jobs: - name: Destroy Terraform Configuration (should retain AMI from config) run: | + # Remove AMI from terraform so it does not destroy + terraform state rm aws_ami_from_instance.self_hosted_runner_ami terraform destroy -auto-approve -var=aws_access_key=${{ secrets.AWS_ACCESS_KEY_ID }} -var=aws_secret_key=${{ secrets.AWS_SECRET_ACCESS_KEY }} -var=aws_key_name=${{ secrets.AWS_KEY_NAME }} \ No newline at end of file