Skip to content

Commit

Permalink
Merge pull request #6691 from mikesplain/automated-cherry-pick-of-#66…
Browse files Browse the repository at this point in the history
…89-origin-release-1.12

Automated cherry pick of #6689: Fix Key error change Overrides to Override
  • Loading branch information
k8s-ci-robot committed Mar 27, 2019
2 parents c3b99b8 + bc7f842 commit edf1dc1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions upup/pkg/fi/cloudup/awstasks/autoscalinggroup.go
Expand Up @@ -579,7 +579,7 @@ type terraformAutoscalingLaunchTemplate struct {
// LaunchTemplateSpecification is the definition for a LT
LaunchTemplateSpecification []*terraformAutoscalingLaunchTemplateSpecification `json:"launch_template_specification,omitempty"`
// Override the is machine type override
Overrides []*terraformAutoscalingLaunchTemplateOverride `json:"overrides,omitempty"`
Override []*terraformAutoscalingLaunchTemplateOverride `json:"override,omitempty"`
}

type terraformAutoscalingInstanceDistribution struct {
Expand Down Expand Up @@ -665,7 +665,7 @@ func (_ *AutoscalingGroup) RenderTerraform(t *terraform.TerraformTarget, a, e, c
}

for _, x := range e.MixedInstanceOverrides {
tf.MixedInstancesPolicy[0].LaunchTemplate[0].Overrides = append(tf.MixedInstancesPolicy[0].LaunchTemplate[0].Overrides, &terraformAutoscalingLaunchTemplateOverride{InstanceType: fi.String(x)})
tf.MixedInstancesPolicy[0].LaunchTemplate[0].Override = append(tf.MixedInstancesPolicy[0].LaunchTemplate[0].Override, &terraformAutoscalingLaunchTemplateOverride{InstanceType: fi.String(x)})
}
}

Expand Down
4 changes: 2 additions & 2 deletions upup/pkg/fi/cloudup/awstasks/autoscalinggroup_test.go
Expand Up @@ -286,11 +286,11 @@ resource "aws_autoscaling_group" "test1" {
launch_template_name = "${aws_launch_template.test_lt.id}"
}
overrides = {
override = {
instance_type = "t2.medium"
}
overrides = {
override = {
instance_type = "t2.large"
}
}
Expand Down

0 comments on commit edf1dc1

Please sign in to comment.