Skip to content

Commit

Permalink
Use toset() instead.
Browse files Browse the repository at this point in the history
  • Loading branch information
zbmowrey committed Sep 26, 2022
1 parent 1d3f66d commit 1e2a908
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// limitations under the License.

locals {
github_organizations = [for repo in var.github_repositories : split("/", repo)[0]]
github_organizations = toset([for repo in var.github_repositories : split("/", repo)[0]])
oidc_provider_arn = var.enabled ? (var.create_oidc_provider ? aws_iam_openid_connect_provider.github[0].arn : data.aws_iam_openid_connect_provider.github[0].arn) : ""
partition = data.aws_partition.current.partition
}
Expand Down Expand Up @@ -64,10 +64,10 @@ resource "aws_iam_role_policy_attachment" "custom" {
resource "aws_iam_openid_connect_provider" "github" {
count = var.enabled && var.create_oidc_provider ? 1 : 0

client_id_list = distinct(concat(
client_id_list = concat(
[for org in local.github_organizations : "https://github.com/${org}"],
["sts.amazonaws.com"]
))
)

tags = var.tags
thumbprint_list = [var.github_thumbprint]
Expand Down

0 comments on commit 1e2a908

Please sign in to comment.