From 4fdfe91cb6014ed4b80cbb77d755e04c1f2f595b Mon Sep 17 00:00:00 2001 From: christofwe Date: Tue, 20 Mar 2018 14:24:15 +0100 Subject: [PATCH] Add common tagging of aws resources (#7) * added tags to AWS resources where supported * update readme for common tagging * fixed conflict - variable additional_certificates * refactored tagging * added tags to new S3 object for optional certificate --- README.md | 48 ++++++++------- autoscaling_master.tf | 43 +++++--------- autoscaling_nodes.tf | 29 +++------ certificate.tf | 2 + iam.tf | 27 +++++---- input.tf | 18 +++--- locals.tf | 133 ++++++++++++++++++++++++++++++++++++++++++ main.tf | 3 - output.tf | 5 +- s3.tf | 21 ++++++- 10 files changed, 227 insertions(+), 102 deletions(-) create mode 100644 locals.tf diff --git a/README.md b/README.md index 4033f8c..b9de2a2 100644 --- a/README.md +++ b/README.md @@ -16,40 +16,44 @@ resource "aws_key_pair" "ssh" { } module "kubernetes" { - source = "github.com/Jnig/terraform-kubernetes-aws?ref=v0.6" - name = "devops-dev-cluster" + source = "github.com/Jnig/terraform-kubernetes-aws?ref=v0.6" + name = "devops-dev-cluster" - ssh_key = "${aws_key_pair.ssh.key_name}" + ssh_key = "${aws_key_pair.ssh.key_name}" - master_instance_type = "t2.medium" + master_instance_type = "t2.medium" - node_instance_type = "t2.large" - node_asg_min = 1 - node_asg_max = 2 - node_asg_desired = 2 + node_instance_type = "t2.large" + node_asg_min = 1 + node_asg_max = 2 + node_asg_desired = 2 - #aws ec2 describe-vpcs - vpc = "" + #aws ec2 describe-vpcs + vpc = "" - # aws ec2 describe-subnets --filters Name=vpc-id,Values= - # tag all subnets with the name of the cluster: kubernetes.io/cluster/ - subnets = ["subnet1", "subnet2", "subnet3"] + # aws ec2 describe-subnets --filters Name=vpc-id,Values= + # tag all subnets with the name of the cluster: kubernetes.io/cluster/ + subnets = ["subnet1", "subnet2", "subnet3"] - proxy_servers = "" - - # optional add addtional certificates to the nodes - # useful if you have private docker repositories - additional_certificates = <