Skip to content

Commit

Permalink
Merge pull request #6988 from kimxogus/fix/6986
Browse files Browse the repository at this point in the history
Terraform: fix options field, should be spot_options
  • Loading branch information
k8s-ci-robot authored May 16, 2019
2 parents 770095b + 0db3bd4 commit 6cccd52
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ type terraformLaunchTemplateMarketOptions struct {
// MarketType is the option type
MarketType *string `json:"market_type,omitempty"`
// SpotOptions are the set of options
SpotOptions []*terraformLaunchTemplateMarketOptionsSpotOptions `json:"options,omitempty"`
SpotOptions []*terraformLaunchTemplateMarketOptionsSpotOptions `json:"spot_options,omitempty"`
}

type terraformLaunchTemplateBlockDeviceEBS struct {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ func TestLaunchTemplateTerraformRender(t *testing.T) {
ID: fi.String("test-11"),
InstanceMonitoring: fi.Bool(true),
InstanceType: fi.String("t2.medium"),
SpotPrice: "0.1",
RootVolumeOptimization: fi.Bool(true),
RootVolumeIops: fi.Int64(100),
RootVolumeSize: fi.Int64(64),
Expand Down Expand Up @@ -67,6 +68,14 @@ resource "aws_launch_template" "test" {
instance_type = "t2.medium"
key_name = "${aws_key_pair.newkey.id}"
instance_market_options = {
market_type = "spot"
spot_options = {
max_price = "0.1"
}
}
network_interfaces = {
associate_public_ip_address = true
security_groups = ["${aws_security_group.nodes-1.id}", "${aws_security_group.nodes-2.id}"]
Expand Down

0 comments on commit 6cccd52

Please sign in to comment.