Upgrade to terraform 0.12 (#394)

* run terraform upgrade tool

* fix post upgrade TODOs

* use strict typing for variables

* upgrade examples, point them at VPC module tf 0.12 PR

* remove unnecessary `coalesce()` calls

coalesce(lookup(map, key, ""), default) -> lookup(map, key, default)

* Fix autoscaling_enabled broken (#1)

* always set a value for tags, fix coalescelist calls

* always set a value for these tags

* fix tag value

* fix tag value

* default element available

* added default value

* added a general default

without this default - TF is throwing an error when running a destroy

* Fix CI

* Change vpc module back to `terraform-aws-modules/vpc/aws` in example

* Update CHANGELOG.md

* Change type of variable `cluster_log_retention_in_days` to number

* Remove `xx_count` variables

* Actual lists instead of strings with commas

* Remove `xx_count` variable from docs

* Replace element with list indexing

* Change variable `worker_group_tags` to a attribute of worker_group

* Fix workers_launch_template_mixed tags

* Change override_instance_type_x variables to list.

* Update CHANGELOG.md
This commit is contained in:
刘相轩
2019-06-19 15:57:51 +08:00
committed by Max Williams
parent 3f0601551f
commit da2c78b8ba
24 changed files with 1265 additions and 626 deletions

View File

@@ -27,8 +27,6 @@ Notes:
Example worker group configuration that uses an ASG with launch configuration for each worker group:
```hcl
worker_group_count = 3
worker_groups = [
{
name = "on-demand-1"
@@ -64,8 +62,6 @@ Example worker group configuration that uses an ASG with launch configuration fo
Launch Template support is a recent addition to both AWS and this module. It might not be as tried and tested but it's more suitable for spot instances as it allowed multiple instance types in the same worker group:
```hcl
worker_group_count = 1
worker_groups = [
{
name = "on-demand-1"
@@ -77,15 +73,10 @@ Launch Template support is a recent addition to both AWS and this module. It mig
}
]
worker_group_launch_template_mixed_count = 1
worker_groups_launch_template_mixed = [
{
name = "spot-1"
override_instance_type_1 = "m5.large"
override_instance_type_2 = "c5.large"
override_instance_type_3 = "t3.large"
override_instance_type_4 = "r5.large"
override_instance_types = ["m5.large", "c5.large", "t3.large", "r5.large"]
spot_instance_pools = 3
asg_max_size = 5
asg_desired_size = 5