Skip to content

Commit e811468

Browse files
committed
Removed additional IAM config; Disabled providers for kubernetes and helm, and removed associated data sources and cluster addons
1 parent b840ed9 commit e811468

File tree

3 files changed

+9
-43
lines changed

3 files changed

+9
-43
lines changed

main.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
data "aws_availability_zones" "available" {}
22

3+
/*
34
data "aws_eks_cluster_auth" "this" {
45
name = module.eks_deployment[0].cluster_name
56
}
7+
*/
68

79
locals {
810
resource_name = "comet-${var.environment}"

modules/eks_deployment/main.tf

Lines changed: 4 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@ locals {
55
}
66
}
77

8+
/*
89
data "aws_eks_cluster_auth" "this" {
910
name = module.eks.cluster_name
1011
}
12+
*/
1113

1214
data "aws_iam_policy" "ebs_csi_policy" {
1315
arn = "arn:aws:iam::aws:policy/service-role/AmazonEBSCSIDriverPolicy"
@@ -39,20 +41,7 @@ module "eks" {
3941
vpc_id = var.vpc_id
4042
subnet_ids = var.vpc_private_subnets
4143

42-
manage_aws_auth_configmap = true
43-
44-
/* Remove additional IAM configuration for now; Enable later if warranted
45-
aws_auth_roles = [
46-
{
47-
rolearn = aws_iam_role.eks_admin.arn
48-
username = "${aws_iam_role.eks_admin.name}"
49-
groups = [
50-
"system:masters"
51-
]
52-
53-
}
54-
]
55-
*/
44+
#manage_aws_auth_configmap = true
5645

5746
eks_managed_node_group_defaults = {
5847
ami_type = "AL2_x86_64"
@@ -84,6 +73,7 @@ module "irsa-ebs-csi" {
8473
oidc_fully_qualified_subjects = ["system:serviceaccount:kube-system:ebs-csi-controller-sa"]
8574
}
8675

76+
/*
8777
module "eks_blueprints_kubernetes_addons" {
8878
source = "github.com/aws-ia/terraform-aws-eks-blueprints//modules/kubernetes-addons"
8979
@@ -98,32 +88,4 @@ module "eks_blueprints_kubernetes_addons" {
9888
9989
tags = local.tags
10090
}
101-
102-
/* Remove additional IAM configuration for now; Enable later if warranted
103-
resource "aws_iam_role" "eks_admin" {
104-
name = "admin-${var.cluster_name}"
105-
106-
assume_role_policy = jsonencode({
107-
Version = "2012-10-17"
108-
Statement = [
109-
{
110-
Action = "sts:AssumeRole"
111-
Effect = "Allow"
112-
Sid = ""
113-
Principal = {
114-
"AWS": [
115-
"arn:aws:iam::897196112581:user/martinb"
116-
]
117-
}
118-
},
119-
]
120-
})
121-
122-
tags = local.tags
123-
}
124-
125-
resource "aws_iam_role_policy_attachment" "eks_adminrole_policy_attach" {
126-
role = "${aws_iam_role.eks_admin.name}"
127-
policy_arn = "${data.aws_iam_policy.administrator_access.arn}"
128-
}
12991
*/

providers.tf

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ provider "aws" {
22
region = var.region
33
}
44

5+
/*
56
provider "kubernetes" {
67
host = module.eks_deployment[0].cluster_endpoint
78
cluster_ca_certificate = base64decode(module.eks_deployment[0].cluster_certificate_authority_data)
@@ -14,4 +15,5 @@ provider "helm" {
1415
cluster_ca_certificate = base64decode(module.eks_deployment[0].cluster_certificate_authority_data)
1516
token = data.aws_eks_cluster_auth.this.token
1617
}
17-
}
18+
}
19+
*/

0 commit comments

Comments
 (0)