Skip to content

Instantly share code, notes, and snippets.

@SamuelBagattin
Created April 4, 2022 09:07
Show Gist options
  • Select an option

  • Save SamuelBagattin/1bf652d64bfbae6a4cdf009e7f9998bf to your computer and use it in GitHub Desktop.

Select an option

Save SamuelBagattin/1bf652d64bfbae6a4cdf009e7f9998bf to your computer and use it in GitHub Desktop.
# 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