Created
July 14, 2020 00:47
-
-
Save rms1000watt/2f26ef3979d8796608e2ea718de9a544 to your computer and use it in GitHub Desktop.
Disable Deletion Protection on ALBs
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
| #!/usr/bin/env bash | |
| for arn in $(aws elbv2 describe-load-balancers | jq -r '.LoadBalancers[] | select(.DNSName | contains("TODO_CHANGE_THIS")) | .LoadBalancerArn'); do | |
| echo "Updating: ${arn}" | |
| aws elbv2 modify-load-balancer-attributes --load-balancer-arn "${arn}" --attributes Key=deletion_protection.enabled,Value=false | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment