Skip to content

Commit 9c3d222

Browse files
New release: now supporting TF 0.12!! (#399)
* New release: now supporting TF 0.12 * updating precommit hook version
1 parent da2c78b commit 9c3d222

File tree

8 files changed

+69
-69
lines changed

8 files changed

+69
-69
lines changed

.pre-commit-config.yaml

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,5 @@
1-
repos:
2-
- repo: https://github.com/antonbabenko/pre-commit-terraform
3-
rev: v1.7.4
4-
hooks:
5-
- id: terraform_fmt
6-
- id: terraform_docs
7-
- repo: https://github.com/pre-commit/pre-commit-hooks
8-
rev: v2.0.0
9-
hooks:
10-
- id: check-merge-conflict
11-
- id: trailing-whitespace
12-
- id: check-yaml
13-
- id: check-added-large-files
1+
- repo: git://github.com/antonbabenko/pre-commit-terraform
2+
rev: v1.16.0
3+
hooks:
4+
- id: terraform_fmt
5+
- id: terraform_docs

CHANGELOG.md

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,19 @@ project adheres to [Semantic Versioning](http://semver.org/).
77

88
## Next release
99

10-
## [[v5.0.0](https://github.com/terraform-aws-modules/terraform-aws-eks/compare/v4.0.2...HEAD)] - 2019-06-??]
10+
## [[v5.?.?](https://github.com/terraform-aws-modules/terraform-aws-eks/compare/v5.0.0...HEAD)] - 2019-06-??]
11+
12+
### Added
13+
14+
- Write your awesome addition here (by @you)
15+
16+
### Changed
17+
18+
- Write your awesome change here (by @you)
19+
20+
# History
21+
22+
## [[v5.0.0](https://github.com/terraform-aws-modules/terraform-aws-eks/compare/v4.0.2...v5.0.0)] - 2019-05-07]
1123

1224
### Added
1325

@@ -25,9 +37,7 @@ project adheres to [Semantic Versioning](http://semver.org/).
2537
- Change override instance_types to list (by @nauxliu on behalf of RightCapital)
2638
- Fix toggle for IAM instance profile creation for mixed launch templates (by @jnozo)
2739

28-
# History
29-
30-
## [[v4.0.2](https://github.com/terraform-aws-modules/terraform-aws-eks/compare/v4.0.0...v4.0.1)] - 2019-05-07]
40+
## [[v4.0.2](https://github.com/terraform-aws-modules/terraform-aws-eks/compare/v4.0.1...v4.0.2)] - 2019-05-07]
3141

3242
### Changed
3343

README.md

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -112,47 +112,47 @@ MIT Licensed. See [LICENSE](https://github.com/terraform-aws-modules/terraform-a
112112
113113
| Name | Description | Type | Default | Required |
114114
|------|-------------|:----:|:-----:|:-----:|
115-
| cluster\_create\_security\_group | Whether to create a security group for the cluster or attach the cluster to `cluster_security_group_id`. | string | `"true"` | no |
115+
| cluster\_create\_security\_group | Whether to create a security group for the cluster or attach the cluster to `cluster_security_group_id`. | bool | `"true"` | no |
116116
| cluster\_create\_timeout | Timeout value when creating the EKS cluster. | string | `"15m"` | no |
117117
| cluster\_delete\_timeout | Timeout value when deleting the EKS cluster. | string | `"15m"` | no |
118-
| cluster\_enabled\_log\_types | A list of the desired control plane logging to enable. For more information, see Amazon EKS Control Plane Logging documentation (https://docs.aws.amazon.com/eks/latest/userguide/control-plane-logs.html) | list | `[]` | no |
119-
| cluster\_endpoint\_private\_access | Indicates whether or not the Amazon EKS private API server endpoint is enabled. | string | `"false"` | no |
120-
| cluster\_endpoint\_public\_access | Indicates whether or not the Amazon EKS public API server endpoint is enabled. | string | `"true"` | no |
118+
| cluster\_enabled\_log\_types | A list of the desired control plane logging to enable. For more information, see Amazon EKS Control Plane Logging documentation (https://docs.aws.amazon.com/eks/latest/userguide/control-plane-logs.html) | list(string) | `[]` | no |
119+
| cluster\_endpoint\_private\_access | Indicates whether or not the Amazon EKS private API server endpoint is enabled. | bool | `"false"` | no |
120+
| cluster\_endpoint\_public\_access | Indicates whether or not the Amazon EKS public API server endpoint is enabled. | bool | `"true"` | no |
121121
| cluster\_iam\_role\_name | IAM role name for the cluster. Only applicable if manage_cluster_iam_resources is set to false. | string | `""` | no |
122-
| cluster\_log\_retention\_in\_days | Number of days to retain log events. Default retention - 90 days | string | `"90"` | no |
122+
| cluster\_log\_retention\_in\_days | Number of days to retain log events. Default retention - 90 days. | number | `"90"` | no |
123123
| cluster\_name | Name of the EKS cluster. Also used as a prefix in names of related resources. | string | n/a | yes |
124124
| cluster\_security\_group\_id | If provided, the EKS cluster will be attached to this security group. If not given, a security group will be created with necessary ingres/egress to work with the workers and provide API access to your current IP/32. | string | `""` | no |
125125
| cluster\_version | Kubernetes version to use for the EKS cluster. | string | `"1.12"` | no |
126126
| config\_output\_path | Where to save the Kubectl config file (if `write_kubeconfig = true`). Should end in a forward slash `/` . | string | `"./"` | no |
127127
| iam\_path | If provided, all IAM roles will be created on this path. | string | `"/"` | no |
128-
| kubeconfig\_aws\_authenticator\_additional\_args | Any additional arguments to pass to the authenticator such as the role to assume. e.g. ["-r", "MyEksRole"]. | list | `[]` | no |
128+
| kubeconfig\_aws\_authenticator\_additional\_args | Any additional arguments to pass to the authenticator such as the role to assume. e.g. ["-r", "MyEksRole"]. | list(string) | `[]` | no |
129129
| kubeconfig\_aws\_authenticator\_command | Command to use to fetch AWS EKS credentials. | string | `"aws-iam-authenticator"` | no |
130-
| kubeconfig\_aws\_authenticator\_command\_args | Default arguments passed to the authenticator command. Defaults to [token -i $cluster_name]. | list | `[]` | no |
131-
| kubeconfig\_aws\_authenticator\_env\_variables | Environment variables that should be used when executing the authenticator. e.g. { AWS_PROFILE = "eks"}. | map | `{}` | no |
130+
| kubeconfig\_aws\_authenticator\_command\_args | Default arguments passed to the authenticator command. Defaults to [token -i $cluster_name]. | list(string) | `[]` | no |
131+
| kubeconfig\_aws\_authenticator\_env\_variables | Environment variables that should be used when executing the authenticator. e.g. { AWS_PROFILE = "eks"}. | map(string) | `{}` | no |
132132
| kubeconfig\_name | Override the default name used for items kubeconfig. | string | `""` | no |
133-
| local\_exec\_interpreter | Command to run for local-exec resources. Must be a shell-style interpreter. If you are on Windows Git Bash is a good choice. | list | `[ "/bin/sh", "-c" ]` | no |
133+
| local\_exec\_interpreter | Command to run for local-exec resources. Must be a shell-style interpreter. If you are on Windows Git Bash is a good choice. | list(string) | `[ "/bin/sh", "-c" ]` | no |
134134
| manage\_aws\_auth | Whether to apply the aws-auth configmap file. | string | `"true"` | no |
135-
| manage\_cluster\_iam\_resources | Whether to let the module manage cluster IAM resources. If set to false, cluster_iam_role_name must be specified. | string | `"true"` | no |
136-
| manage\_worker\_iam\_resources | Whether to let the module manage worker IAM resources. If set to false, iam_instance_profile_name must be specified for workers. | string | `"true"` | no |
137-
| map\_accounts | Additional AWS account numbers to add to the aws-auth configmap. See examples/basic/variables.tf for example format. | list | `[]` | no |
138-
| map\_roles | Additional IAM roles to add to the aws-auth configmap. See examples/basic/variables.tf for example format. | list | `[]` | no |
139-
| map\_users | Additional IAM users to add to the aws-auth configmap. See examples/basic/variables.tf for example format. | list | `[]` | no |
135+
| manage\_cluster\_iam\_resources | Whether to let the module manage cluster IAM resources. If set to false, cluster_iam_role_name must be specified. | bool | `"true"` | no |
136+
| manage\_worker\_iam\_resources | Whether to let the module manage worker IAM resources. If set to false, iam_instance_profile_name must be specified for workers. | bool | `"true"` | no |
137+
| map\_accounts | Additional AWS account numbers to add to the aws-auth configmap. See examples/basic/variables.tf for example format. | list(string) | `[]` | no |
138+
| map\_roles | Additional IAM roles to add to the aws-auth configmap. See examples/basic/variables.tf for example format. | list(map(string)) | `[]` | no |
139+
| map\_users | Additional IAM users to add to the aws-auth configmap. See examples/basic/variables.tf for example format. | list(map(string)) | `[]` | no |
140140
| permissions\_boundary | If provided, all IAM roles will be created with this permissions boundary attached. | string | `""` | no |
141-
| subnets | A list of subnets to place the EKS cluster and workers within. | list | n/a | yes |
142-
| tags | A map of tags to add to all resources. | map | `{}` | no |
141+
| subnets | A list of subnets to place the EKS cluster and workers within. | list(string) | n/a | yes |
142+
| tags | A map of tags to add to all resources. | map(string) | `{}` | no |
143143
| vpc\_id | VPC where the cluster and workers will be deployed. | string | n/a | yes |
144-
| worker\_additional\_security\_group\_ids | A list of additional security group ids to attach to worker instances | list | `[]` | no |
144+
| worker\_additional\_security\_group\_ids | A list of additional security group ids to attach to worker instances | list(string) | `[]` | no |
145145
| worker\_ami\_name\_filter | Additional name filter for AWS EKS worker AMI. Default behaviour will get latest for the cluster_version but could be set to a release from amazon-eks-ami, e.g. "v20190220" | string | `"v*"` | no |
146-
| worker\_create\_security\_group | Whether to create a security group for the workers or attach the workers to `worker_security_group_id`. | string | `"true"` | no |
147-
| worker\_groups | A list of maps defining worker group configurations to be defined using AWS Launch Configurations. See workers_group_defaults for valid keys. | list | `[ { "name": "default" } ]` | no |
148-
| worker\_groups\_launch\_template | A list of maps defining worker group configurations to be defined using AWS Launch Templates. See workers_group_defaults for valid keys. | list | `[ { "name": "default" } ]` | no |
149-
| worker\_groups\_launch\_template\_mixed | A list of maps defining worker group configurations to be defined using AWS Launch Templates. See workers_group_defaults for valid keys. | list | `[ { "name": "default" } ]` | no |
146+
| worker\_create\_security\_group | Whether to create a security group for the workers or attach the workers to `worker_security_group_id`. | bool | `"true"` | no |
147+
| worker\_groups | A list of maps defining worker group configurations to be defined using AWS Launch Configurations. See workers_group_defaults for valid keys. | any | `[]` | no |
148+
| worker\_groups\_launch\_template | A list of maps defining worker group configurations to be defined using AWS Launch Templates. See workers_group_defaults for valid keys. | any | `[]` | no |
149+
| worker\_groups\_launch\_template\_mixed | A list of maps defining worker group configurations to be defined using AWS Launch Templates. See workers_group_defaults for valid keys. | any | `[]` | no |
150150
| worker\_security\_group\_id | If provided, all workers will be attached to this security group. If not given, a security group will be created with necessary ingres/egress to work with the EKS cluster. | string | `""` | no |
151-
| worker\_sg\_ingress\_from\_port | Minimum port number from which pods will accept communication. Must be changed to a lower value if some pods in your cluster will expose a port lower than 1025 (e.g. 22, 80, or 443). | string | `"1025"` | no |
152-
| workers\_additional\_policies | Additional policies to be added to workers | list | `[]` | no |
153-
| workers\_group\_defaults | Override default values for target groups. See workers_group_defaults_defaults in local.tf for valid keys. | map | `{}` | no |
154-
| write\_aws\_auth\_config | Whether to write the aws-auth configmap file. | string | `"true"` | no |
155-
| write\_kubeconfig | Whether to write a Kubectl config file containing the cluster configuration. Saved to `config_output_path`. | string | `"true"` | no |
151+
| worker\_sg\_ingress\_from\_port | Minimum port number from which pods will accept communication. Must be changed to a lower value if some pods in your cluster will expose a port lower than 1025 (e.g. 22, 80, or 443). | number | `"1025"` | no |
152+
| workers\_additional\_policies | Additional policies to be added to workers | list(string) | `[]` | no |
153+
| workers\_group\_defaults | Override default values for target groups. See workers_group_defaults_defaults in local.tf for valid keys. | any | `{}` | no |
154+
| write\_aws\_auth\_config | Whether to write the aws-auth configmap file. | bool | `"true"` | no |
155+
| write\_kubeconfig | Whether to write a Kubectl config file containing the cluster configuration. Saved to `config_output_path`. | bool | `"true"` | no |
156156
157157
## Outputs
158158

cluster.tf

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
resource "aws_cloudwatch_log_group" "this" {
2+
count = length(var.cluster_enabled_log_types) > 0 ? 1 : 0
23
name = "/aws/eks/${var.cluster_name}/cluster"
34
retention_in_days = var.cluster_log_retention_in_days
4-
5-
count = length(var.cluster_enabled_log_types) > 0 ? 1 : 0
65
}
76

87
resource "aws_eks_cluster" "this" {
@@ -86,4 +85,3 @@ resource "aws_iam_role_policy_attachment" "cluster_AmazonEKSServicePolicy" {
8685
policy_arn = "arn:aws:iam::aws:policy/AmazonEKSServicePolicy"
8786
role = aws_iam_role.cluster[0].name
8887
}
89-

examples/basic/main.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ resource "aws_security_group" "all_worker_mgmt" {
7171
}
7272

7373
module "vpc" {
74-
source = "terraform-aws-modules/vpc/aws"
75-
version = "2.6.0"
74+
source = "terraform-aws-modules/vpc/aws"
75+
version = "2.6.0"
7676

7777
name = "test-vpc"
7878
cidr = "10.0.0.0/16"
@@ -107,7 +107,7 @@ module "eks" {
107107
GithubOrg = "terraform-aws-modules"
108108
}
109109

110-
vpc_id = module.vpc.vpc_id
110+
vpc_id = module.vpc.vpc_id
111111

112112
worker_groups = [
113113
{

examples/launch_templates/main.tf

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ resource "random_string" "suffix" {
2424
}
2525

2626
module "vpc" {
27-
source = "terraform-aws-modules/vpc/aws"
28-
version = "2.6.0"
27+
source = "terraform-aws-modules/vpc/aws"
28+
version = "2.6.0"
2929

3030
name = "test-vpc-lt"
3131
cidr = "10.0.0.0/16"
@@ -38,10 +38,10 @@ module "vpc" {
3838
}
3939

4040
module "eks" {
41-
source = "../.."
42-
cluster_name = local.cluster_name
43-
subnets = module.vpc.public_subnets
44-
vpc_id = module.vpc.vpc_id
41+
source = "../.."
42+
cluster_name = local.cluster_name
43+
subnets = module.vpc.public_subnets
44+
vpc_id = module.vpc.vpc_id
4545

4646
worker_groups_launch_template = [
4747
{

examples/spot_instances/main.tf

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ resource "random_string" "suffix" {
2424
}
2525

2626
module "vpc" {
27-
source = "terraform-aws-modules/vpc/aws"
28-
version = "2.6.0"
27+
source = "terraform-aws-modules/vpc/aws"
28+
version = "2.6.0"
2929

3030
name = "test-vpc-spot"
3131
cidr = "10.0.0.0/16"
@@ -38,20 +38,20 @@ module "vpc" {
3838
}
3939

4040
module "eks" {
41-
source = "../.."
42-
cluster_name = local.cluster_name
43-
subnets = module.vpc.public_subnets
44-
vpc_id = module.vpc.vpc_id
41+
source = "../.."
42+
cluster_name = local.cluster_name
43+
subnets = module.vpc.public_subnets
44+
vpc_id = module.vpc.vpc_id
4545

4646
worker_groups_launch_template_mixed = [
4747
{
48-
name = "spot-1"
49-
override_instance_types = ["m5.large", "c5.large", "t3.large", "r5.large"]
50-
spot_instance_pools = 4
51-
asg_max_size = 5
52-
asg_desired_capacity = 5
53-
kubelet_extra_args = "--node-labels=kubernetes.io/lifecycle=spot"
54-
public_ip = true
48+
name = "spot-1"
49+
override_instance_types = ["m5.large", "c5.large", "t3.large", "r5.large"]
50+
spot_instance_pools = 4
51+
asg_max_size = 5
52+
asg_desired_capacity = 5
53+
kubelet_extra_args = "--node-labels=kubernetes.io/lifecycle=spot"
54+
public_ip = true
5555
},
5656
]
5757
}

version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v4.0.2
1+
v5.0.0

0 commit comments

Comments
 (0)