Skip to content

Commit

Permalink
fix: set empty policy arn if create tekton role is set to false (#266)
Browse files Browse the repository at this point in the history
Signed-off-by: ankitm123 <[email protected]>
  • Loading branch information
ankitm123 authored May 27, 2021
1 parent 0bea394 commit 5a514ff
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,6 @@ module "nginx" {
nginx_namespace = var.nginx_namespace
nginx_chart_version = var.nginx_chart_version
create_nginx_namespace = var.create_nginx_namespace
nginx_values_file = var.nginx_values_file
nginx_values_file = var.nginx_values_file

}
2 changes: 1 addition & 1 deletion modules/cluster/irsa.tf
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ module "iam_assumable_role_tekton_bot" {
create_role = var.create_tekton_role
role_name = var.is_jx2 ? substr("tf-${var.cluster_name}-sa-role-tekton-bot-${local.generated_seed}", 0, 60) : "${local.cluster_trunc}-tekton-bot"
provider_url = local.oidc_provider_url
role_policy_arns = concat([aws_iam_policy.tekton-bot[0].arn], var.additional_tekton_role_policy_arns)
role_policy_arns = var.create_tekton_role ? concat([aws_iam_policy.tekton-bot[0].arn], var.additional_tekton_role_policy_arns) : [""]
oidc_fully_qualified_subjects = ["system:serviceaccount:${local.jenkins-x-namespace}:tekton-bot"]
}
resource "kubernetes_service_account" "tekton-bot" {
Expand Down

0 comments on commit 5a514ff

Please sign in to comment.