Skip to content

Commit e876ce2

Browse files
karolinepaulsmax-rocket-internet
authored andcommitted
VPC: enable_dns_hostnames = true in examples (#446)
1 parent f755300 commit e876ce2

File tree

5 files changed

+21
-17
lines changed

5 files changed

+21
-17
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ project adheres to [Semantic Versioning](http://semver.org/).
2020
### Changed
2121

2222
- Update default override instance types to work with Cluster Autoscaler (by @nauxliu on behalf of RightCapital)
23+
- Examples now specify `enable_dns_hostnames = true`, as per [EKS documentation](https://docs.aws.amazon.com/eks/latest/userguide/network_reqs.html) (by @karolinepauls)
2324
- Write your awesome change here (by @you)
2425

2526
# History

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Read the [AWS docs on EKS to get connected to the k8s dashboard](https://docs.aw
1414

1515
* You want to create an EKS cluster and an autoscaling group of workers for the cluster.
1616
* You want these resources to exist within security groups that allow communication and coordination. These can be user provided or created within the module.
17-
* You've created a Virtual Private Cloud (VPC) and subnets where you intend to put the EKS resources.
17+
* You've created a Virtual Private Cloud (VPC) and subnets where you intend to put the EKS resources. The VPC satisfies [EKS requirements](https://docs.aws.amazon.com/eks/latest/userguide/network_reqs.html).
1818
* If `manage_aws_auth = true`, it's required that both [`kubectl`](https://kubernetes.io/docs/tasks/tools/install-kubectl/#install-kubectl) (>=1.10) and [`aws-iam-authenticator`](https://github.com/kubernetes-sigs/aws-iam-authenticator#4-set-up-kubectl-to-use-authentication-tokens-provided-by-aws-iam-authenticator-for-kubernetes) are installed and on your shell's PATH.
1919

2020
## Usage example
@@ -141,7 +141,7 @@ MIT Licensed. See [LICENSE](https://github.com/terraform-aws-modules/terraform-a
141141
| permissions\_boundary | If provided, all IAM roles will be created with this permissions boundary attached. | string | `""` | no |
142142
| subnets | A list of subnets to place the EKS cluster and workers within. | list(string) | n/a | yes |
143143
| tags | A map of tags to add to all resources. | map(string) | `{}` | no |
144-
| vpc\_id | VPC where the cluster and workers will be deployed. | string | n/a | yes |
144+
| vpc\_id | VPC where the cluster and workers will be deployed. It must satisfy [EKS requirements](https://docs.aws.amazon.com/eks/latest/userguide/network_reqs.html). | string | n/a | yes |
145145
| worker\_additional\_security\_group\_ids | A list of additional security group ids to attach to worker instances | list(string) | `[]` | no |
146146
| 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 |
147147
| 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 |

examples/basic/main.tf

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -86,13 +86,14 @@ module "vpc" {
8686
source = "terraform-aws-modules/vpc/aws"
8787
version = "2.6.0"
8888

89-
name = "test-vpc"
90-
cidr = "10.0.0.0/16"
91-
azs = data.aws_availability_zones.available.names
92-
private_subnets = ["10.0.1.0/24", "10.0.2.0/24", "10.0.3.0/24"]
93-
public_subnets = ["10.0.4.0/24", "10.0.5.0/24", "10.0.6.0/24"]
94-
enable_nat_gateway = true
95-
single_nat_gateway = true
89+
name = "test-vpc"
90+
cidr = "10.0.0.0/16"
91+
azs = data.aws_availability_zones.available.names
92+
private_subnets = ["10.0.1.0/24", "10.0.2.0/24", "10.0.3.0/24"]
93+
public_subnets = ["10.0.4.0/24", "10.0.5.0/24", "10.0.6.0/24"]
94+
enable_nat_gateway = true
95+
single_nat_gateway = true
96+
enable_dns_hostnames = true
9697

9798
tags = {
9899
"kubernetes.io/cluster/${local.cluster_name}" = "shared"

examples/launch_templates/main.tf

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,11 @@ module "vpc" {
3939
source = "terraform-aws-modules/vpc/aws"
4040
version = "2.6.0"
4141

42-
name = "test-vpc-lt"
43-
cidr = "10.0.0.0/16"
44-
azs = data.aws_availability_zones.available.names
45-
public_subnets = ["10.0.4.0/24", "10.0.5.0/24", "10.0.6.0/24"]
42+
name = "test-vpc-lt"
43+
cidr = "10.0.0.0/16"
44+
azs = data.aws_availability_zones.available.names
45+
public_subnets = ["10.0.4.0/24", "10.0.5.0/24", "10.0.6.0/24"]
46+
enable_dns_hostnames = true
4647

4748
tags = {
4849
"kubernetes.io/cluster/${local.cluster_name}" = "shared"

examples/spot_instances/main.tf

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,11 @@ module "vpc" {
3939
source = "terraform-aws-modules/vpc/aws"
4040
version = "2.6.0"
4141

42-
name = "test-vpc-spot"
43-
cidr = "10.0.0.0/16"
44-
azs = data.aws_availability_zones.available.names
45-
public_subnets = ["10.0.4.0/24", "10.0.5.0/24", "10.0.6.0/24"]
42+
name = "test-vpc-spot"
43+
cidr = "10.0.0.0/16"
44+
azs = data.aws_availability_zones.available.names
45+
public_subnets = ["10.0.4.0/24", "10.0.5.0/24", "10.0.6.0/24"]
46+
enable_dns_hostnames = true
4647

4748
tags = {
4849
"kubernetes.io/cluster/${local.cluster_name}" = "shared"

0 commit comments

Comments
 (0)