func OverrideConfigWithFlags()

in pkg/config/config.go [103:143]


func OverrideConfigWithFlags(simpleConfig *SimpleInfo, flagConfig *SimpleInfo) {
	if flagConfig.Region != "" {
		simpleConfig.Region = flagConfig.Region
	}
	if flagConfig.InstanceType != "" {
		simpleConfig.InstanceType = flagConfig.InstanceType
	}
	if flagConfig.ImageId != "" {
		simpleConfig.ImageId = flagConfig.ImageId
	}
	if flagConfig.SubnetId != "" {
		simpleConfig.SubnetId = flagConfig.SubnetId
	}
	if flagConfig.LaunchTemplateId != "" {
		simpleConfig.LaunchTemplateId = flagConfig.LaunchTemplateId
	}
	if flagConfig.LaunchTemplateVersion != "" {
		simpleConfig.LaunchTemplateVersion = flagConfig.LaunchTemplateVersion
	}
	if flagConfig.SecurityGroupIds != nil {
		simpleConfig.SecurityGroupIds = flagConfig.SecurityGroupIds
	}
	if flagConfig.NewVPC != false {
		simpleConfig.NewVPC = flagConfig.NewVPC
	}
	if flagConfig.AutoTerminationTimerMinutes != 0 {
		simpleConfig.AutoTerminationTimerMinutes = flagConfig.AutoTerminationTimerMinutes
	}
	if flagConfig.KeepEbsVolumeAfterTermination != false {
		simpleConfig.KeepEbsVolumeAfterTermination = flagConfig.KeepEbsVolumeAfterTermination
	}
	if flagConfig.IamInstanceProfile != "" {
		simpleConfig.IamInstanceProfile = flagConfig.IamInstanceProfile
	}
	if flagConfig.BootScriptFilePath != "" {
		simpleConfig.BootScriptFilePath = flagConfig.BootScriptFilePath
	}
	if flagConfig.UserTags != nil {
		simpleConfig.UserTags = flagConfig.UserTags
	}
}