You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
╷
│ Error: Duplicate object key
│
│ on locals.tf line 71, in locals:
│ 51: owners = { for owner in flatten([
│ 52: # This will iterate over the identity_groups map and return a list of maps based of the values of the owners
│ 53: # that includes the group key.
│ 54: for identity_group_key, group in var.identity_groups : [
│ 55: for owner in group.owners : {
│ 56: group = identity_group_key
│ 57: owner = owner
│ 58: # Split Function
│ 59: # https://developer.hashicorp.com/terraform/language/functions/split
│ 60: # This will split the owner string into a list of strings based on the @ symbol.
│ 61: # We do this because the owner string is an email address and we want to use the
│ 62: # the group plus the first part of the email address as resource name key.
│ 63: owner_split = split("@", owner)
│ 64: }
│ 65: ]
│ 66: ]) : "${owner.group}-${owner.owner_split[0]}" => owner }
│ ├────────────────
│ │ owner.group is "backstage"
│ │ owner.owner_split[0] is "plt-backstage-github"
│
│ Two different items produced the key "backstage-plt-backstage-github" in this 'for' expression. If duplicates are expected, use the ellipsis (...) after the value expression
│ to enable grouping by key.
╵
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: