Skip to content

Commit

Permalink
Merge pull request #12 from MaterializeInc/allow_multiple_service_acc…
Browse files Browse the repository at this point in the history
…ounts_to_assume_role

Allow any service account to assume the role
  • Loading branch information
bobbyiliev authored Dec 20, 2024
2 parents dc32a58 + 33a805f commit e5304a9
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 22 deletions.
10 changes: 9 additions & 1 deletion .terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 0 additions & 14 deletions examples/simple/versions.tf

This file was deleted.

1 change: 1 addition & 0 deletions examples/simple/versions.tf
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ resource "aws_iam_role" "materialize_s3" {
Action = "sts:AssumeRoleWithWebIdentity"
Condition = {
StringEquals = {
"${trimprefix(module.eks.cluster_oidc_issuer_url, "https://")}:sub" : "${var.bucket_prefix}:serviceaccount:${var.namespace}:${var.service_account_name}",
"${trimprefix(module.eks.cluster_oidc_issuer_url, "https://")}:sub" : "system:serviceaccount:*:*",
"${trimprefix(module.eks.cluster_oidc_issuer_url, "https://")}:aud" : "sts.amazonaws.com"
}
}
Expand Down
6 changes: 0 additions & 6 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -246,12 +246,6 @@ variable "service_account_name" {
default = "12345678-1234-1234-1234-123456789012"
}

variable "bucket_prefix" {
description = "Prefix for the S3 bucket"
type = string
default = "system"
}

variable "mz_iam_service_account_name" {
description = "Name of the IAM user for Materialize service authentication (will be prefixed with environment name)"
type = string
Expand Down
4 changes: 4 additions & 0 deletions versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,9 @@ terraform {
source = "hashicorp/helm"
version = "~> 2.0"
}
random = {
source = "hashicorp/random"
version = "~> 3.0"
}
}
}

0 comments on commit e5304a9

Please sign in to comment.