File tree Expand file tree Collapse file tree 3 files changed +10
-3
lines changed Expand file tree Collapse file tree 3 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -46,6 +46,7 @@ module "aws_lbc" {
46
46
source = " ./modules/aws-lbc"
47
47
count = var. install_aws_load_balancer_controller ? 1 : 0
48
48
49
+ name_prefix = " ${ var . namespace } -${ var . environment } "
49
50
eks_cluster_name = module. eks . cluster_name
50
51
oidc_provider_arn = module. eks . oidc_provider_arn
51
52
oidc_issuer_url = module. eks . cluster_oidc_issuer_url
Original file line number Diff line number Diff line change 1
1
resource "aws_iam_policy" "aws_load_balancer_controller" {
2
- name = var. iam_name
2
+ name = " ${ var . name_prefix } - ${ var . iam_name } "
3
3
description = " AWS Load balancer controller"
4
4
# From https://raw.githubusercontent.com/kubernetes-sigs/aws-load-balancer-controller/v2.11.0/docs/install/iam_policy.json
5
5
policy = << EOF
254
254
}
255
255
256
256
resource "aws_iam_role" "aws_load_balancer_controller" {
257
- name = var. iam_name
257
+ name = " ${ var . name_prefix } - ${ var . iam_name } "
258
258
assume_role_policy = jsonencode (
259
259
{
260
260
Version : " 2012-10-17" ,
Original file line number Diff line number Diff line change @@ -4,6 +4,12 @@ variable "namespace" {
4
4
default = " kube-system"
5
5
}
6
6
7
+ variable "name_prefix" {
8
+ description = " Prefix to use for AWS LBC resources"
9
+ type = string
10
+ default = " "
11
+ }
12
+
7
13
variable "service_account_name" {
8
14
description = " Name of the Kubernetes service account used by the AWS LBC"
9
15
type = string
@@ -13,7 +19,7 @@ variable "service_account_name" {
13
19
variable "iam_name" {
14
20
description = " Name of the AWS IAM role and policy"
15
21
type = string
16
- default = " aws-load-balancer-controller "
22
+ default = " albc "
17
23
}
18
24
19
25
variable "eks_cluster_name" {
You can’t perform that action at this time.
0 commit comments