mirror of
https://github.com/ysoftdevs/terraform-aws-eks.git
synced 2026-01-15 08:14:12 +01:00
Merge pull request #83 from joonjeong/master
add spot_price option to aws_launch_configuration
This commit is contained in:
@@ -9,7 +9,7 @@ project adheres to [Semantic Versioning](http://semver.org/).
|
||||
|
||||
### Added
|
||||
|
||||
- A useful addition (slam dunk, @self 🔥)
|
||||
- add spot_price option to aws_launch_configuration
|
||||
|
||||
### Changed
|
||||
|
||||
|
||||
@@ -86,6 +86,7 @@ variable "workers_group_defaults" {
|
||||
asg_max_size = "3" # Maximum worker capacity in the autoscaling group.
|
||||
asg_min_size = "1" # Minimum worker capacity in the autoscaling group.
|
||||
instance_type = "m4.large" # Size of the workers instances.
|
||||
spot_price = "" # Cost of spot instance.
|
||||
root_volume_size = "20" # root volume size of workers instances.
|
||||
root_volume_type = "gp2" # root volume type of workers instances, can be 'standard', 'gp2', or 'io1'
|
||||
root_iops = "0" # The amount of provisioned IOPS. This must be set with a volume_type of "io1".
|
||||
|
||||
@@ -30,6 +30,7 @@ resource "aws_launch_configuration" "workers" {
|
||||
key_name = "${lookup(var.worker_groups[count.index], "key_name", lookup(var.workers_group_defaults, "key_name"))}"
|
||||
user_data_base64 = "${base64encode(element(data.template_file.userdata.*.rendered, count.index))}"
|
||||
ebs_optimized = "${lookup(var.worker_groups[count.index], "ebs_optimized", lookup(local.ebs_optimized, lookup(var.worker_groups[count.index], "instance_type", lookup(var.workers_group_defaults, "instance_type")), false))}"
|
||||
spot_price = "${lookup(var.worker_groups[count.index], "spot_price", lookup(var.workers_group_defaults, "spot_price"))}"
|
||||
count = "${var.worker_group_count}"
|
||||
|
||||
lifecycle {
|
||||
|
||||
Reference in New Issue
Block a user