Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convenience command to retrieve OIDC Issuer thumbprint #62

Merged
merged 1 commit into from
Sep 13, 2019

Conversation

yorinasub17
Copy link
Contributor

Currently setting up the IAM Role for Service Accounts feature in Terraform is a bit of a pain because there is no easy way to retrieve the OIDC issuer thumbprint for setting up the provider. This adds the functionality into kubergrunt so that it can be used as an external data source:

resource "aws_eks_cluster" "example" {
  # ... other configuration ...
}

data "external" "oidc_thumbprint" {
  program = ["kubergrunt", "eks", "oidc-thumbprint", "--issuer-url", aws_eks_cluster.example.identity.0.oidc.0.issuer]
}

resource "aws_iam_openid_connect_provider" "example" {
  client_id_list  = ["sts.amazonaws.com"]
  thumbprint_list = [data.external.oidc_thumbprint.result.thumbprint]
  url             = "${aws_eks_cluster.example.identity.0.oidc.0.issuer}"
}

Copy link
Member

@brikis98 brikis98 left a comment

Choose a reason for hiding this comment

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

Very nice 👍

@yorinasub17
Copy link
Contributor Author

Thanks for the review! Will merge and release this now.

@yorinasub17 yorinasub17 merged commit 5ea61cc into master Sep 13, 2019
@yorinasub17 yorinasub17 deleted the yori-oidc-thumbpring branch September 13, 2019 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants