cloudposse/terraform-aws-ec2-autoscale-group

instance_market_options example

decmaxn opened this issue · 2 comments

Would you please give an example for instance_market_options ?

According to https://www.terraform.io/docs/providers/aws/r/launch_template.html#market-options

  instance_market_options {
    market_type = "spot"
  }

should it be list or map?

hey @decmaxn, thanks for testing and pointing it out.
So, like everything with Terraform, all the settings are lists, although in the examples they are shown as maps.

you can test it like this:

instance_market_options = [
  {
      market_type = "spot",
      spot_options = {
        spot_instance_type = "one-time"
     }
  }
]

let us know if any issues

Thanks for the hint, this one works!

  instance_market_options  = [
    {
      market_type = "spot",
      spot_options = [
        {
          spot_instance_type = "one-time"
        }  
      ]
    }
  ]