Data Source: awsEksClusters
Retrieve EKS Clusters list
Example Usage
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
const dataAwsEksClustersExample = new aws.dataAwsEksClusters.DataAwsEksClusters(
this,
"example",
{}
);
const dataAwsEksClusterExample = new aws.dataAwsEksCluster.DataAwsEksCluster(
this,
"example_1",
{
name: "${each.value}",
}
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
dataAwsEksClusterExample.overrideLogicalId("example");
/*In most cases loops should be handled in the programming language context and
not inside of the Terraform context. If you are looping over something external, e.g. a variable or a file input
you should consider using a for loop. If you are looping over something only known to Terraform, e.g. a result of a data source
you need to keep this like it is.*/
dataAwsEksClusterExample.addOverride(
"for_each",
`\${toset(${dataAwsEksClustersExample.names})}`
);
Attributes Reference
id
- AWS Region.names
- Set of EKS clusters names