Skip to content

Commit e35cb39

Browse files
fix: improve QuickSight user name handling for non-IAM identities
1 parent 2c9dcb6 commit e35cb39

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

modules/destination/quicksights.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ resource "aws_quicksight_user" "users" {
1717
identity_type = each.value.identity_type
1818
namespace = try(each.value.namespace, "default")
1919
session_name = each.value.identity_type == "IAM" ? each.key : null
20-
user_name = each.value.identity_type == "QUICKSIGHT" ? try(each.value.user_name, null) : null
20+
user_name = each.value.identity_type == "QUICKSIGHT" ? split("@", each.key)[1] : null
2121
user_role = try(each.value.role, null)
2222

2323
lifecycle {

modules/destination/variables.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ variable "quicksights_username" {
261261
variable "quicksight_users" {
262262
description = "Map of user accounts to be registered in QuickSight"
263263
type = map(object({
264-
identity_type = optional(string, "IAM")
264+
identity_type = string
265265
namespace = optional(string, "default")
266266
role = optional(string, "READER")
267267
}))

0 commit comments

Comments
 (0)