Created
April 4, 2022 09:07
-
-
Save SamuelBagattin/1bf652d64bfbae6a4cdf009e7f9998bf to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Get EKS cluster certificate thumbprint | |
| data "tls_certificate" "eks_cluster" { | |
| url = aws_eks_cluster.main.identity[0].oidc[0].issuer | |
| } | |
| # Create the OIDC provider | |
| resource "aws_iam_openid_connect_provider" "eks_cluster" { | |
| client_id_list = ["sts.amazonaws.com"] | |
| thumbprint_list = [data.tls_certificate.eks_cluster.certificates[0].sha1_fingerprint] | |
| url = aws_eks_cluster.main.identity[0].oidc[0].issuer | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment