Data Source: awsEksAddonVersion
Retrieve information about a specific EKS add-on version compatible with an EKS cluster version.
Example Usage
import * as cdktf from "cdktf";
/*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 dataAwsEksAddonVersionDefault =
new aws.dataAwsEksAddonVersion.DataAwsEksAddonVersion(this, "default", {
addonName: "vpc-cni",
kubernetesVersion: "${aws_eks_cluster.example.version}",
});
const dataAwsEksAddonVersionLatest =
new aws.dataAwsEksAddonVersion.DataAwsEksAddonVersion(this, "latest", {
addonName: "vpc-cni",
kubernetesVersion: "${aws_eks_cluster.example.version}",
mostRecent: true,
});
const cdktfTerraformOutputDefault = new cdktf.TerraformOutput(
this,
"default_2",
{
value: dataAwsEksAddonVersionDefault.version,
}
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
cdktfTerraformOutputDefault.overrideLogicalId("default");
const cdktfTerraformOutputLatest = new cdktf.TerraformOutput(this, "latest_3", {
value: dataAwsEksAddonVersionLatest.version,
});
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
cdktfTerraformOutputLatest.overrideLogicalId("latest");
new aws.eksAddon.EksAddon(this, "vpc_cni", {
addonName: "vpc-cni",
addonVersion: dataAwsEksAddonVersionLatest.version,
clusterName: "${aws_eks_cluster.example.name}",
});
Argument Reference
addonName
– (Required) Name of the EKS add-on. The name must match one of the names returned by list-addon.kubernetesVersion
– (Required) Version of the EKS Cluster. Must be between 1-100 characters in length. Must begin with an alphanumeric character, and must only contain alphanumeric characters, dashes and underscores (^[09AZaZ][aZaZ09\_]+$
).mostRecent
- (Optional) Determines if the most recent or default version of the addon should be returned.
Attributes Reference
In addition to all arguments above, the following attributes are exported:
id
- Name of the add-onversion
- Version of the EKS add-on.