mirror of https://github.com/kubernetes/kops.git
Adding sanity check for natgateways
This commit is contained in:
parent
be5fd71852
commit
db11e113d9
|
|
@ -48,6 +48,9 @@ func (e *NatGateway) Find(c *fi.Context) (*NatGateway, error) {
|
|||
if id == nil && e.Subnet != nil {
|
||||
var filters []*ec2.Filter
|
||||
filters = append(filters, awsup.NewEC2Filter("key", "AssociatedNatgateway"))
|
||||
if e.Subnet.ID == nil {
|
||||
return nil, nil
|
||||
}
|
||||
filters = append(filters, awsup.NewEC2Filter("resource-id", *e.Subnet.ID))
|
||||
|
||||
request := &ec2.DescribeTagsInput{
|
||||
|
|
|
|||
Loading…
Reference in New Issue