From 60dab5848659a6d44fb234867b45704ece08adbd Mon Sep 17 00:00:00 2001 From: Martin Tomes Date: Fri, 8 May 2020 22:50:51 +0200 Subject: [PATCH] Update upup/pkg/fi/cloudup/awstasks/launchtemplate_target_api.go Co-authored-by: Peter Rifel --- upup/pkg/fi/cloudup/awstasks/launchtemplate_target_api.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/upup/pkg/fi/cloudup/awstasks/launchtemplate_target_api.go b/upup/pkg/fi/cloudup/awstasks/launchtemplate_target_api.go index e5d80f0777..d5f638994b 100644 --- a/upup/pkg/fi/cloudup/awstasks/launchtemplate_target_api.go +++ b/upup/pkg/fi/cloudup/awstasks/launchtemplate_target_api.go @@ -232,7 +232,7 @@ func (t *LaunchTemplate) Find(c *fi.Context) (*LaunchTemplate, error) { actual.IAMInstanceProfile = &IAMInstanceProfile{Name: lt.LaunchTemplateData.IamInstanceProfile.Name} } // @step: add instanceInterruptionBehavior if there is one - if lt.LaunchTemplateData.InstanceMarketOptions.SpotOptions != nil { + if lt.LaunchTemplateData.InstanceMarketOptions != nil && lt.LaunchTemplateData.InstanceMarketOptions.SpotOptions != nil { actual.InstanceInterruptionBehavior = lt.LaunchTemplateData.InstanceMarketOptions.SpotOptions.InstanceInterruptionBehavior }