agent: |
OwuIjonHGLWj8QRhU3JbAdd the following code blocks in eks/main.tf outside the eks module
Add the following code blocks in eks/main.tf outside the eks module
There was a problem that the LLM was not able to address. Please rephrase your prompt and try again.
inputs
outputs
data "tls_certificate" "cognito_oidc_thumbprint" {
url = "https://cognito-idp.us-east-2.amazonaws.com/${data.aws_cognito_user_pool.eks_user_pool.id}"
}
data "aws_cognito_user_pool" "eks_user_pool" {
user_pool_id = <user_pool_id>
}
resource "aws_iam_openid_connect_provider" "eks_oidc" {
client_id_list = ["sts.amazonaws.com"]
thumbprint_list = [data.tls_certificate.cognito_oidc_thumbprint.certificates[0].sha1_fingerprint]
url = "https://cognito-idp.us-east-2.amazonaws.com/${data.aws_cognito_user_pool.eks_user_pool.user_pool_id}"
}
resource "aws_eks_identity_provider_config" "eks_oidc" {
cluster_name = module.eks.cluster_name
oidc {
identity_provider_config_name = "eks-oidc-cognito"
issuer_url = "https://${aws_iam_openid_connect_provider.eks_oidc.url}"
client_id = <client_id>
}
depends_on = [aws_iam_openid_connect_provider.eks_oidc]
}
copied