Data Source: aws_eks_cluster#
Provides information about an EKS cluster.
Example Usage#
data "aws_eks_cluster" "example" {
name = "example"
}
Argument Reference#
name- (Required) The name of the cluster.
Attribute Reference#
Supported attributes#
In addition to all arguments above, the following attributes are exported:
arn- Cluster ID.certificate_authority- Nested attribute containingcertificate-authority-datafor your cluster.data- The base64 encoded certificate data required to communicate with your cluster. Add this to thecertificate-authority-datasection of thekubeconfigfile for your cluster.
created_at- The Unix epoch time stamp in seconds for when the cluster was created.id- The name of the cluster.kubernetes_network_config- The Kubernetes network configuration. The structure of this block is described below.legacy_cluster_params- The parameters for fine-tuning the Kubernetes cluster. The structure of this block is described below.platform_version- The platform version for the cluster.status- The status of the EKS cluster. One ofCLAIMED,CREATING,DELETED,DELETING,ERROR,MODIFYING,PENDING,PROVISIONING,READY,REPAIRING.version- The Kubernetes server version for the cluster.vpc_config- The VPC configuration for the cluster. The structure of this block is described below.tags- Map of tags assigned to the cluster.
kubernetes_network_config#
The kubernetes_network_config block has the following structure:
ip_family- The IP family used to assign Kubernetes pod and service addresses.service_ipv4_cidr- The CIDR block to assign Kubernetes service IP addresses from.
legacy_cluster_params#
The legacy_cluster_params block has the following structure:
docker_registry_config– The configuration of the Docker Registry. The structure of this block is described below.ebs_provider_config– The configuration of the EBS Provider. The structure of this block is described below.ingress_config– The configuration of the Ingress controller. The structure of this block is described below.master_config– The configuration of the master node of the cluster. The structure of this block is described below.user_data_config- The configuration of the cluster user data. The structure of this block is described below.nlb_provider_config– The configuration of the NLB Provider. The structure of this block is described below.placement_config- The placement of the cluster. The structure of this block is described below.
docker_registry_config#
The docker_registry_config block has the following structure:
volume_iops- The number of read/write operations per second for the Docker Registry volume.volume_size- The size of the Docker Registry volume in GiB.volume_type- The type of the Docker Registry volume.- Valid values:
st2,gp2,io2
- Valid values:
ebs_provider_config#
The ebs_provider_config block has the following structure:
ebs_user- The EBS Provider user name.
ingress_config#
The ingress_config block has the following structure:
instance_type- The instance type of the Ingress controller.public_ip- The public IP address at which the Ingress controller can be accessed.volume_iops- The number of read/write operations per second for the Ingress controller volume.volume_size- The size of the Ingress controller volume in GiB.volume_type- The type of the Ingress controller volume.- Valid values:
st2,gp2,io2
- Valid values:
master_config#
The master_config block has the following structure:
high_availability- Indicates whether to deploy a high-availability cluster.instance_type- The instance type of the master node.public_ip- The public IP address at which the master node can be accessed.volume_iops- The number of read/write operations per second for the master node volume.volume_size- The size of the master node volume in GiB.volume_type- The type of the master node volume.- Valid values:
st2,gp2,io2
- Valid values:
nlb_provider_config#
The nlb_provider_config block has the following structure:
nlb_user- The NLB Provider user name.
placement_config#
The placement_config block has the following structure:
affinity- The affinity setting for an instance on a dedicated host.- Constraints: The parameter could be set to
hostonly iftenancyishost - Valid values:
default,host - Default value:
default
- Constraints: The parameter could be set to
host_id- The ID of the dedicated host for the instance.tenancy- The tenancy of the instance (if the instance is running in a VPC).- Valid values:
default,host - Default value:
default
- Valid values:
user_data_config#
The user_data_config block has the following structure:
user_data- User data.user_data_content_type- The type ofuser_data.- Valid values:
cloud-config,x-shellscript
- Valid values:
vpc_config#
The vpc_config block has the following structure:
cluster_security_group_id- The cluster security group that was created by the cloud for the cluster.security_group_ids- List of security group IDs.subnet_ids- List of subnet IDs.vpc_id- The VPC associated with your cluster.
Unsupported attributes#
~> Note These attributes may be present in the terraform.tfstate file, but they have preset values and cannot be specified in configuration files.
The following attributes are not currently supported:
enabled_cluster_log_types, encryption_config, endpoint, identity, role_arn, vpc_config.endpoint_private_access, vpc_config.endpoint_public_access, vpc_config.public_access_cidrs.