Skip to content

Conversation

@jonathancolby-olx
Copy link

@jonathancolby-olx jonathancolby-olx commented Dec 30, 2019

PR o'clock

Description

The OIDC provider ARN is required for the assume role policy as the "Federated" principal of the iam-for-pods role. This change adds the OIDC provider ARN as a module output.

usage example:

data "aws_iam_policy_document" "this" {
  statement {
    actions = ["sts:AssumeRoleWithWebIdentity"]

    principals {
      type        = "Federated"
      identifiers = [module.eks.aws_iam_openid_connect_provider_arn]
    }

Please explain the changes you made here and link to any relevant issues.

Checklist

@jonathancolby-olx jonathancolby-olx force-pushed the oidc_issuer_arn_output branch 2 times, most recently from bcc331e to 9a3951c Compare December 30, 2019 12:52
@jonathancolby-olx jonathancolby-olx changed the title add output for aws_iam_openid_connect_provider arn [approach in 653 seems better] add output for aws_iam_openid_connect_provider arn Jan 2, 2020
@jonathancolby-olx jonathancolby-olx changed the title [approach in 653 seems better] add output for aws_iam_openid_connect_provider arn [conceding to 653] add output for aws_iam_openid_connect_provider arn Jan 2, 2020

output "cluster_oidc_connect_provider_arn" {
description = "The ARN of the IAM OpenID Connect provider"
value = flatten(concat(aws_iam_openid_connect_provider.oidc_provider[*].arn, [""]))[0]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi. The flatten is unnecessary here. It was used in cluster_oidc_issuer_url due to the double wildcards.

@jonathancolby-olx
Copy link
Author

closing this in favour of the implementation in #653

@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants