I am trying to implement a cluster similar to this:
https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/eks_cluster
My difficulty comes in trying to create the IAM roles, specifically replicating this resource in CDK. Example below.
resource "aws_iam_openid_connect_provider" "example" {
client_id_list = ["sts.amazonaws.com"]
thumbprint_list = data.tls_certificate.example.certificates[*].sha1_fingerprint
url = data.tls_certificate.example.url
}
My code looks like this
this.cluster = new aws.eksCluster.EksCluster(this, id, {
name: id,
roleArn: clusterRole.arn,
vpcConfig: {
subnetIds: props.subnetIds
},
dependsOn: [clusterRole, clusterRoleAttachment]
})
const tlsCert = new tls.dataTlsCertificate.DataTlsCertificate(this, "tls", {
url: this.cluster.identity.get(0).oidc.get(0).issuer
})
const provider = new aws.iamOpenidConnectProvider.IamOpenidConnectProvider(this, "provider", {
clientIdList: ["sts.amazonaws.com"],
// HELP NEEEDED HERE
thumbprintList: [], // ${data.tls_certificate.tls.certificates[*].sha1_fingerprint}
url: tlsCert.url,
})
What is the proper syntax to refer to a string array from a list of data elements?