This repository has been archived by the owner on Jun 23, 2021. It is now read-only.
AWS tasks must always tag the resources they create (ec2_vpc_nat_gateway) #56
Labels
bug
Something isn't working
The
ec2_vpc_nat_gateway
module doesn't allow tags to be created. The workaround is to immediately run a secondec2_tag
task to apply theOpenShiftCluster
andOpenShiftClusterId
tags. Theaws_destroy.yml
playbook needs those tags to do it's job.This workaround is problematic though because we create multiple NAT Gateways (one per AZ) and we aren't guaranteed to have all of them be created successfully. If any NGW failed to get created --for any reason-- the
ec2_tag
task would not be run. This results in creating untagged NGWs that can't be deleted by theaws_destroy.yml
playbook. When the NGWs aren't deleted, then the subnets they belong to and ultimately the VPC can't be deleted.Here is an example of a partial failure caused by an insufficient EIP Allocation quota. Only one of the three NGWs was created successfully. The logs also show the results of the patch I've created to resolve the issue. The patch simply wraps the
ec2_vpc_nat_gateway
task in an Ansible Block with analways:
section.Thanks to Mike for reporting the issue originally. And thanks to Gerald for suggesting the solution!
The text was updated successfully, but these errors were encountered: