Update upup/pkg/fi/cloudup/awstasks/launchtemplate_target_api.go

Co-authored-by: Peter Rifel <rifelpet@users.noreply.github.com>
This commit is contained in:
Martin Tomes 2020-05-08 22:50:51 +02:00 committed by GitHub
parent a43aa2d74e
commit 60dab58486
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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
}