Fixes for AWS Terraform Deployment

This commit is contained in:
Vincent Schwarzer
2017-03-20 12:06:07 +01:00
parent 859c08620b
commit 952ab03d2a
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}"