1
0
mirror of https://github.com/terraform-aws-modules/terraform-aws-eks.git synced 2025-09-09 19:32:58 +08:00

Update changelog

Fix cluster count
This commit is contained in:
syst0m
2019-10-31 16:51:40 +00:00
committed by Tomislav Tomasic
parent c89da3772e
commit 75248e97df
7 changed files with 34 additions and 34 deletions
+8 -8
View File
@@ -1,5 +1,5 @@
resource "aws_cloudwatch_log_group" "this" {
count = length(var.cluster_enabled_log_types) > 0 && local.enabled ? 1 : 0
count = length(var.cluster_enabled_log_types) > 0 && var.enabled ? 1 : 0
name = "/aws/eks/${var.cluster_name}/cluster"
retention_in_days = var.cluster_log_retention_in_days
kms_key_id = var.cluster_log_kms_key_id
@@ -7,7 +7,7 @@ resource "aws_cloudwatch_log_group" "this" {
}
resource "aws_eks_cluster" "this" {
count = local.enabled
count = var.enabled ? 1 : 0
name = var.cluster_name
enabled_cluster_log_types = var.cluster_enabled_log_types
role_arn = local.cluster_iam_role_arn
@@ -34,7 +34,7 @@ resource "aws_eks_cluster" "this" {
}
resource "aws_security_group" "cluster" {
count = var.cluster_create_security_group && local.enabled ? 1 : 0
count = var.cluster_create_security_group && var.enabled ? 1 : 0
name_prefix = var.cluster_name
description = "EKS cluster security group."
vpc_id = var.vpc_id
@@ -47,7 +47,7 @@ resource "aws_security_group" "cluster" {
}
resource "aws_security_group_rule" "cluster_egress_internet" {
count = var.cluster_create_security_group && local.enabled ? 1 : 0
count = var.cluster_create_security_group && var.enabled ? 1 : 0
description = "Allow cluster egress access to the Internet."
protocol = "-1"
security_group_id = local.cluster_security_group_id
@@ -58,7 +58,7 @@ resource "aws_security_group_rule" "cluster_egress_internet" {
}
resource "aws_security_group_rule" "cluster_https_worker_ingress" {
count = var.cluster_create_security_group && local.enabled ? 1 : 0
count = var.cluster_create_security_group && var.enabled ? 1 : 0
description = "Allow pods to communicate with the EKS cluster API."
protocol = "tcp"
security_group_id = local.cluster_security_group_id
@@ -69,7 +69,7 @@ resource "aws_security_group_rule" "cluster_https_worker_ingress" {
}
resource "aws_iam_role" "cluster" {
count = var.manage_cluster_iam_resources && local.enabled ? 1 : 0
count = var.manage_cluster_iam_resources && var.enabled ? 1 : 0
name_prefix = var.cluster_name
assume_role_policy = data.aws_iam_policy_document.cluster_assume_role_policy.json
permissions_boundary = var.permissions_boundary
@@ -79,13 +79,13 @@ resource "aws_iam_role" "cluster" {
}
resource "aws_iam_role_policy_attachment" "cluster_AmazonEKSClusterPolicy" {
count = var.manage_cluster_iam_resources && local.enabled ? 1 : 0
count = var.manage_cluster_iam_resources && var.enabled ? 1 : 0
policy_arn = "arn:aws:iam::aws:policy/AmazonEKSClusterPolicy"
role = local.cluster_iam_role_name
}
resource "aws_iam_role_policy_attachment" "cluster_AmazonEKSServicePolicy" {
count = var.manage_cluster_iam_resources && local.enabled ? 1 : 0
count = var.manage_cluster_iam_resources && var.enabled ? 1 : 0
policy_arn = "arn:aws:iam::aws:policy/AmazonEKSServicePolicy"
role = local.cluster_iam_role_name
}