Merge pull request #11575 from justinsb/ipv6_journey

Avoid error when first creating VPC with IPv6
This commit is contained in:
Kubernetes Prow Robot 2021-05-23 08:47:38 -07:00 committed by GitHub
commit e7b6388246
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -42,6 +42,11 @@ type VPCAmazonIPv6CIDRBlock struct {
func (e *VPCAmazonIPv6CIDRBlock) Find(c *fi.Context) (*VPCAmazonIPv6CIDRBlock, error) {
cloud := c.Cloud.(awsup.AWSCloud)
// If the VPC doesn't (yet) exist, there is no association
if e.VPC.ID == nil {
return nil, nil
}
vpc, err := cloud.DescribeVPC(aws.StringValue(e.VPC.ID))
if err != nil {
return nil, err