Skip to content

Commit

Permalink
Add support for auto deleting the identity provider
Browse files Browse the repository at this point in the history
  • Loading branch information
rocketnova committed Jun 20, 2024
1 parent b866bce commit 608e5c2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion template-only-bin/destroy-app-service
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@ BACKEND_CONFIG_FILE="${ENVIRONMENT}.s3.tfbackend"
sed -i.bak 's/force_destroy = false/force_destroy = true/g' infra/modules/service/access-logs.tf
sed -i.bak 's/force_destroy = false/force_destroy = true/g' infra/modules/storage/main.tf
sed -i.bak 's/enable_deletion_protection = !var.is_temporary/enable_deletion_protection = false/g' infra/modules/service/load-balancer.tf
sed -i.bak 's/deletion_protection = "ACTIVE"/deletion_protection = "INACTIVE"/g' infra/modules/identity-provider/main.tf

cd "infra/${APP_NAME}/service"

terraform init -reconfigure -backend-config="${BACKEND_CONFIG_FILE}"

terraform apply -auto-approve -target="module.service.aws_s3_bucket.access_logs" -target="module.service.aws_lb.alb" -var="environment_name=${ENVIRONMENT}"
terraform apply -auto-approve -target="module.service.aws_s3_bucket.access_logs" -target="module.service.aws_lb.alb" -target="module.identity_provider.aws_cognito_user_pool.main" -var="environment_name=${ENVIRONMENT}"

terraform destroy -auto-approve -var="environment_name=${ENVIRONMENT}"

0 comments on commit 608e5c2

Please sign in to comment.