Skip to content

Commit

Permalink
feat(gen3-module): Updated gen3 module to improve deployment experience
Browse files Browse the repository at this point in the history
  • Loading branch information
Edward Malinowski authored and Edward Malinowski committed Jun 11, 2024
1 parent ae07c20 commit 9406d7c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tf_files/gen3/service-accounts.tf
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,7 @@ resource "aws_iam_role_policy" "aws-load-balancer-role-policy" {
}

resource "aws_iam_role" "external-secrets-role" {
count = var.namespace == "default" ? 1 : 0
count = var.namespace == "default" || var.deploy_external_secrets ? 1 : 0
name = "${var.vpc_name}-${var.namespace}-external-secrets-sa"
description = "Role for external-secrets service account for ${var.vpc_name}"
assume_role_policy = jsonencode({
Expand Down Expand Up @@ -612,7 +612,7 @@ resource "aws_iam_role" "external-secrets-role" {
}

resource "aws_iam_role_policy" "external-secrets-role-policy" {
count = var.namespace == "default" ? 1 : 0
count = var.namespace == "default" || var.deploy_external_secrets ? 1 : 0
name = "external-secrets-role-policy"
role = aws_iam_role.external-secrets-role[0].id

Expand Down
6 changes: 6 additions & 0 deletions tf_files/gen3/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@ variable "dd_enabled" {
default = false
}

variable "deploy_external_secrets" {
description = "Deploy external secrets"
type = bool
default = false
}

variable "dictionary_url" {
description = "URL to the data dictionary"
default = ""
Expand Down

0 comments on commit 9406d7c

Please sign in to comment.