Add ability to pass computed values to cluster_security_group_id and worker_security_group_id (#186)

* Add ability to pass computer values to cluster_security_group_id and worker_security_group_id

* Fix contributer name in CHANGELOG.md

* Format variables.tf file
This commit is contained in:
rmakram-ims
2018-12-13 11:00:48 -05:00
committed by Max Williams
parent 1822a677dc
commit 9d6740e116
5 changed files with 21 additions and 8 deletions

View File

@@ -24,7 +24,7 @@ resource "aws_security_group" "cluster" {
description = "EKS cluster security group."
vpc_id = "${var.vpc_id}"
tags = "${merge(var.tags, map("Name", "${var.cluster_name}-eks_cluster_sg"))}"
count = "${var.cluster_security_group_id == "" ? 1 : 0}"
count = "${var.cluster_create_security_group ? 1 : 0}"
}
resource "aws_security_group_rule" "cluster_egress_internet" {
@@ -35,7 +35,7 @@ resource "aws_security_group_rule" "cluster_egress_internet" {
from_port = 0
to_port = 0
type = "egress"
count = "${var.cluster_security_group_id == "" ? 1 : 0}"
count = "${var.cluster_create_security_group ? 1 : 0}"
}
resource "aws_security_group_rule" "cluster_https_worker_ingress" {
@@ -46,7 +46,7 @@ resource "aws_security_group_rule" "cluster_https_worker_ingress" {
from_port = 443
to_port = 443
type = "ingress"
count = "${var.cluster_security_group_id == "" ? 1 : 0}"
count = "${var.cluster_create_security_group ? 1 : 0}"
}
resource "aws_iam_role" "cluster" {