File tree Expand file tree Collapse file tree 6 files changed +22
-6
lines changed
examples/eks_test_fixture Expand file tree Collapse file tree 6 files changed +22
-6
lines changed Original file line number Diff line number Diff line change 77.kitchen.local.yml
88Gemfile.lock
99terraform.tfstate.d /
10+ config
11+ config-map-aws-auth.yaml
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ script:
2626- echo 'script'
2727- terraform init
2828- terraform fmt -check=true
29- - terraform validate -var "region=${AWS_REGION}" -var "subnets=[]" -var "workers_ami_id=ami-123456" -var "cluster_ingress_cidrs=[]" -var "cluster_name=test_cluster"
29+ - terraform validate -var "region=${AWS_REGION}" -var "vpc_id=vpc-123456" -var " subnets=[]" -var "workers_ami_id=ami-123456" -var "cluster_ingress_cidrs=[]" -var "cluster_name=test_cluster"
3030- docker run --rm -v $(pwd):/app/ --workdir=/app/ -t wata727/tflint --error-with-issues
3131- cd examples/eks_test_fixture
3232- terraform init
Original file line number Diff line number Diff line change @@ -4,6 +4,8 @@ A terraform module to create a managed Kubernetes cluster on AWS EKS. Available
44through the [ Terraform registry] ( https://registry.terraform.io/modules/terraform-aws-modules/eks/aws ) .
55Inspired by and adapted from [ this doc] ( https://www.terraform.io/docs/providers/aws/guides/eks-getting-started.html )
66and its [ source code] ( https://github.com/terraform-providers/terraform-provider-aws/tree/master/examples/eks-getting-started ) .
7+ Instructions on [ this post] ( https://aws.amazon.com/blogs/aws/amazon-eks-now-generally-available/ )
8+ can help guide you through connecting to the cluster via ` kubectl ` .
79
810| Branch | Build status |
911| ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
@@ -104,5 +106,5 @@ MIT Licensed. See [LICENSE](https://github.com/terraform-aws-modules/terraform-a
104106| cluster_id | The name/id of the cluster. |
105107| cluster_security_group_ids | description |
106108| cluster_version | The Kubernetes server version for the cluster. |
107- | config_map_aws_auth | |
109+ | config_map_aws_auth | A kubernetes configuration to authenticate to this cluster. |
108110| kubeconfig | kubectl config file contents for this cluster. |
Original file line number Diff line number Diff line change @@ -45,14 +45,24 @@ resource "random_string" "suffix" {
4545 special = false
4646}
4747
48+ resource "local_file" "config" {
49+ content = " ${ module . eks . kubeconfig } "
50+ filename = " ${ path . module } /config"
51+ }
52+
53+ resource "local_file" "config-map-aws-auth" {
54+ content = " ${ module . eks . config_map_aws_auth } "
55+ filename = " ${ path . module } /config-map-aws-auth.yaml"
56+ }
57+
4858module "vpc" {
4959 source = " terraform-aws-modules/vpc/aws"
5060 version = " 1.14.0"
5161 name = " test-vpc"
5262 cidr = " 10.0.0.0/16"
53- azs = [" ${ data . aws_availability_zones . available . names [0 ]} " , " ${ data . aws_availability_zones . available . names [1 ]} " ]
54- private_subnets = [" 10.0.1.0/24" , " 10.0.2.0/24" ]
55- public_subnets = [" 10.0.3 .0/24" , " 10.0.4 .0/24" ]
63+ azs = [" ${ data . aws_availability_zones . available . names [0 ]} " , " ${ data . aws_availability_zones . available . names [1 ]} " , " ${ data . aws_availability_zones . available . names [ 2 ] } " ]
64+ private_subnets = [" 10.0.1.0/24" , " 10.0.2.0/24" , " 10.0.3.0/24 " ]
65+ public_subnets = [" 10.0.4 .0/24" , " 10.0.5.0/24 " , " 10.0.6 .0/24" ]
5666 enable_nat_gateway = true
5767 single_nat_gateway = true
5868 tags = " ${ merge (local. tags , map (" kubernetes.io/cluster/${ local . cluster_name } " , " shared" ))} "
Original file line number Diff line number Diff line change 55* through the [Terraform registry](https://registry.terraform.io/modules/terraform-aws-modules/eks/aws).
66* Inspired by and adapted from [this doc](https://www.terraform.io/docs/providers/aws/guides/eks-getting-started.html)
77* and its [source code](https://github.com/terraform-providers/terraform-provider-aws/tree/master/examples/eks-getting-started).
8+ * Instructions on [this post](https://aws.amazon.com/blogs/aws/amazon-eks-now-generally-available/)
9+ * can help guide you through connecting to the cluster via `kubectl`.
810
911* | Branch | Build status |
1012* | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
Original file line number Diff line number Diff line change 11output "config_map_aws_auth" {
2- description = " "
2+ description = " A kubernetes configuration to authenticate to this cluster. "
33 value = " ${ local . config_map_aws_auth } "
44}
55
You can’t perform that action at this time.
0 commit comments