From 949dd68dc70c4734685cbad52536c911c4ca1bae Mon Sep 17 00:00:00 2001 From: Suket Sharma Date: Wed, 16 Feb 2022 12:44:43 +0530 Subject: [PATCH] Don't default AMI Family if LaunchTemplate specified (#1352) --- pkg/cloudprovider/aws/apis/v1alpha1/provider_defaults.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/cloudprovider/aws/apis/v1alpha1/provider_defaults.go b/pkg/cloudprovider/aws/apis/v1alpha1/provider_defaults.go index 13b8d17ec115..178f84241a72 100644 --- a/pkg/cloudprovider/aws/apis/v1alpha1/provider_defaults.go +++ b/pkg/cloudprovider/aws/apis/v1alpha1/provider_defaults.go @@ -60,5 +60,8 @@ func (c *Constraints) defaultAMIFamily() { if c.AMIFamily != nil { return } + if c.LaunchTemplate != nil { + return + } c.AMIFamily = &AMIFamilyAL2 }