Skip to content

Commit

Permalink
Add version 18
Browse files Browse the repository at this point in the history
  • Loading branch information
psychomantys committed Oct 22, 2024
1 parent f02cadb commit 8edf6aa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions _variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ variable "create_iam_eks_role" {
}

variable "extra_custom_policy" {
type = string
default = "{}"
type = any
default = false
}

variable "cors_rules" {
Expand Down
4 changes: 2 additions & 2 deletions iam.tf
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@ resource "aws_iam_policy" "bucket_rw" {

// Extra custom policy
resource "aws_iam_user_policy_attachment" "extra_custom_policy" {
count = var.create && var.create_iam_user ? 1 : 0
count = var.create && var.create_iam_user && var.create_iam_user ? 1 : 0

user = aws_iam_user.bucket_user[0].name
policy_arn = aws_iam_policy.extra_custom_policy[0].arn
}

resource "aws_iam_policy" "extra_custom_policy" {
count = var.create && (var.create_iam_user || length(var.create_iam_eks_role) > 0) ? 1 : 0
count = var.create && var.create_iam_user && (var.create_iam_user || length(var.create_iam_eks_role) > 0) ? 1 : 0

name = "${var.bucket_name}-extra-custom-policy"
policy = try(
Expand Down

0 comments on commit 8edf6aa

Please sign in to comment.