-
-
Notifications
You must be signed in to change notification settings - Fork 359
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
OIDC thumbprint_list can be retrieved and tags added to OIDC provider #115
Conversation
- With hashicorp/terraform-provider-tls#62 sha1_fingerprint can be retrieved instead of hardcoding it (which isn't safe as not all regions have the same)
/rebuild-readme |
/test all |
main.tf
Outdated
@@ -84,13 +84,17 @@ resource "aws_eks_cluster" "default" { | |||
# https://docs.aws.amazon.com/eks/latest/userguide/enable-iam-roles-for-service-accounts.html | |||
# https://medium.com/@marcincuber/amazon-eks-with-oidc-provider-iam-roles-for-kubernetes-services-accounts-59015d15cb0c | |||
# | |||
|
|||
data "tls_certificate" "cluster" { | |||
url = join("", aws_eks_cluster.default.*.identity.0.oidc.0.issuer) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add
count = (local.enabled && var.oidc_provider_enabled) ? 1 : 0
so if the module is disabled, the data sources won't be read
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you @nnsense, those are very good improvements.
Just a minor nitpick, please see comments
Co-authored-by: Andriy Knysh <[email protected]>
Hi @aknysh , I've added the |
/test all |
what/why
sha1_fingerprint
can be set automatically instead of be hardcoded, which is prone to error since some region has a different one.module.label.tags
references