Merge pull request #1161 from VincentS/aws_deployment

Fixes for AWS Terraform Deployment
pull/1181/head
Matthew Mosesohn 2017-03-23 11:59:39 +03:00 committed by GitHub
commit d27ca7854f
5 changed files with 43 additions and 4 deletions

View File

@ -17,6 +17,14 @@ resource "aws_security_group_rule" "aws-allow-api-access" {
security_group_id = "${aws_security_group.aws-elb.id}"
}
resource "aws_security_group_rule" "aws-allow-api-egress" {
type = "egress"
from_port = 0
to_port = 65535
protocol = "TCP"
cidr_blocks = ["0.0.0.0/0"]
security_group_id = "${aws_security_group.aws-elb.id}"
}
# Create a new AWS ELB for K8S API
resource "aws_elb" "aws-elb-api" {

View File

@ -76,7 +76,7 @@ resource "aws_route_table" "kubernetes-private" {
vpc_id = "${aws_vpc.cluster-vpc.id}"
route {
cidr_block = "0.0.0.0/0"
gateway_id = "${element(aws_nat_gateway.cluster-nat-gateway.*.id, count.index)}"
nat_gateway_id = "${element(aws_nat_gateway.cluster-nat-gateway.*.id, count.index)}"
}
tags {
Name = "kubernetes-${var.aws_cluster_name}-routetable-private-${count.index}"

View File

@ -1,6 +1,5 @@
#Global Vars
aws_cluster_name = "devtest"
aws_region = "eu-central-1"
#VPC Vars
aws_vpc_cidr_block = "10.250.192.0/18"

View File

@ -0,0 +1,32 @@
#Global Vars
aws_cluster_name = "devtest"
aws_region = "eu-central-1"
#VPC Vars
aws_vpc_cidr_block = "10.250.192.0/18"
aws_cidr_subnets_private = ["10.250.192.0/20","10.250.208.0/20"]
aws_cidr_subnets_public = ["10.250.224.0/20","10.250.240.0/20"]
aws_avail_zones = ["eu-central-1a","eu-central-1b"]
#Bastion Host
aws_bastion_ami = "ami-5900cc36"
aws_bastion_size = "t2.small"
#Kubernetes Cluster
aws_kube_master_num = 3
aws_kube_master_size = "t2.medium"
aws_etcd_num = 3
aws_etcd_size = "t2.medium"
aws_kube_worker_num = 4
aws_kube_worker_size = "t2.medium"
aws_cluster_ami = "ami-903df7ff"
#Settings AWS ELB
aws_elb_api_port = 443
k8s_secure_api_port = 443

View File

@ -33,12 +33,12 @@ variable "aws_avail_zones" {
}
variable "aws_cidr_subnets_private" {
description = "CIDR Blocks for private subnets in Availability zones1"
description = "CIDR Blocks for private subnets in Availability Zones"
type = "list"
}
variable "aws_cidr_subnets_public" {
description = "CIDR Blocks for public subnets in Availability zones1"
description = "CIDR Blocks for public subnets in Availability Zones"
type = "list"
}