mirror of https://github.com/kubernetes/kops.git
Merge pull request #1084 from DualSpark/nat-gateway-sanity-check
Adding sanity check for natgateways
This commit is contained in:
commit
0e7ab42eb7
|
|
@ -1 +1 @@
|
||||||
Subproject commit 5b9ef417329fea35e35f510ede2042ad6386dd49
|
Subproject commit 82c2538cf7541383a3d203e1d850331a507bc80c
|
||||||
|
|
@ -48,6 +48,10 @@ func (e *NatGateway) Find(c *fi.Context) (*NatGateway, error) {
|
||||||
if id == nil && e.Subnet != nil {
|
if id == nil && e.Subnet != nil {
|
||||||
var filters []*ec2.Filter
|
var filters []*ec2.Filter
|
||||||
filters = append(filters, awsup.NewEC2Filter("key", "AssociatedNatgateway"))
|
filters = append(filters, awsup.NewEC2Filter("key", "AssociatedNatgateway"))
|
||||||
|
if e.Subnet.ID == nil {
|
||||||
|
glog.V(2).Infof("Unable to find subnet, bypassing Find() for NGW")
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
filters = append(filters, awsup.NewEC2Filter("resource-id", *e.Subnet.ID))
|
filters = append(filters, awsup.NewEC2Filter("resource-id", *e.Subnet.ID))
|
||||||
|
|
||||||
request := &ec2.DescribeTagsInput{
|
request := &ec2.DescribeTagsInput{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue