An open API service indexing awesome lists of open source software.

https://github.com/ekedonald/eks-self-managed-cluster

Terraform EKS Self-Managed Cluster Module
https://github.com/ekedonald/eks-self-managed-cluster

Last synced: 2 months ago
JSON representation

Terraform EKS Self-Managed Cluster Module

Awesome Lists containing this project

README

        

## EKS Self-Managed Cluster Module

## Requirements

| Name | Version |
|------|---------|
| [terraform](#requirement\_terraform) | >= 1.0 |
| [aws](#requirement\_aws) | >= 4.0 |
| [tls](#requirement\_tls) | >= 3.0.0 |

## Providers

| Name | Version |
|------|---------|
| [aws](#provider\_aws) | >= 4.0 |
| [tls](#provider\_tls) | >= 3.0.0 |

## Modules

No modules.

## Resources

| Name | Type |
|------|------|
| [aws_eks_cluster.main](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/eks_cluster) | resource |
| [aws_eks_node_group.main](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/eks_node_group) | resource |
| [aws_iam_openid_connect_provider.eks](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_openid_connect_provider) | resource |
| [aws_iam_policy.alb_controller](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_policy) | resource |
| [aws_iam_policy.ebs_csi_policy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_policy) | resource |
| [aws_iam_role.alb_controller](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role) | resource |
| [aws_iam_role.ebs_csi](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role) | resource |
| [aws_iam_role.eks_cluster](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role) | resource |
| [aws_iam_role.eks_nodes](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role) | resource |
| [aws_iam_role_policy_attachment.alb_controller_attach](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy_attachment) | resource |
| [aws_iam_role_policy_attachment.ebs_csi_attach](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy_attachment) | resource |
| [aws_iam_role_policy_attachment.eks_cluster_policy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy_attachment) | resource |
| [aws_iam_role_policy_attachment.eks_cni_policy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy_attachment) | resource |
| [aws_iam_role_policy_attachment.eks_container_registry](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy_attachment) | resource |
| [aws_iam_role_policy_attachment.eks_worker_node_policy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy_attachment) | resource |
| [aws_launch_template.eks_nodes](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_template) | resource |
| [aws_security_group.eks_cluster](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group) | resource |
| [aws_security_group.eks_nodes](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group) | resource |
| [aws_security_group.internal_alb](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group) | resource |
| [aws_security_group_rule.control_plane_to_nodes](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group_rule) | resource |
| [aws_security_group_rule.nodes_to_control_plane](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group_rule) | resource |
| [aws_ami.eks_worker](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/ami) | data source |
| [aws_vpc.selected](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/vpc) | data source |
| [tls_certificate.eks](https://registry.terraform.io/providers/hashicorp/tls/latest/docs/data-sources/certificate) | data source |

## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| [cluster\_name](#input\_cluster\_name) | Name of the EKS cluster | `string` | n/a | yes |
| [cluster\_version](#input\_cluster\_version) | Kubernetes version to use for the EKS cluster | `string` | n/a | yes |
| [desired\_nodes](#input\_desired\_nodes) | Desired number of worker nodes | `number` | n/a | yes |
| [disk\_size](#input\_disk\_size) | Disk size in GiB for worker nodes | `number` | n/a | yes |
| [environment](#input\_environment) | Environment name | `string` | n/a | yes |
| [instance\_types](#input\_instance\_types) | List of instance types for the node group | `list(string)` | n/a | yes |
| [max\_nodes](#input\_max\_nodes) | Maximum number of worker nodes | `number` | n/a | yes |
| [min\_nodes](#input\_min\_nodes) | Minimum number of worker nodes | `number` | n/a | yes |
| [private\_subnet\_ids](#input\_private\_subnet\_ids) | List of private subnet IDs | `list(string)` | n/a | yes |
| [region](#input\_region) | AWS region | `string` | n/a | yes |
| [vpc\_id](#input\_vpc\_id) | ID of the existing VPC | `string` | n/a | yes |

## Outputs

| Name | Description |
|------|-------------|
| [cluster\_certificate\_authority\_data](#output\_cluster\_certificate\_authority\_data) | Certificate authority data for the cluster |
| [cluster\_endpoint](#output\_cluster\_endpoint) | Endpoint for EKS control plane |
| [cluster\_iam\_role\_name](#output\_cluster\_iam\_role\_name) | IAM role name associated with EKS cluster |
| [cluster\_id](#output\_cluster\_id) | EKS cluster ID |
| [cluster\_name](#output\_cluster\_name) | EKS cluster name |
| [cluster\_security\_group\_id](#output\_cluster\_security\_group\_id) | Security group ID attached to the EKS cluster |
| [ebs\_csi\_role\_arn](#output\_ebs\_csi\_role\_arn) | ARN of IAM role for EBS CSI driver |

## Usage

```hcl
module "eks" {
source = "github.com/ekedonald/EKS-Self-Managed-Cluster?ref=main"

cluster_name = "my-eks-cluster"
cluster_version = "1.31"
vpc_id = "vpc-1234567890"
private_subnet_ids = ["subnet-123", "subnet-456"]
environment = "production"

instance_types = ["t3.xlarge"]
disk_size = 100
desired_nodes = 2
max_nodes = 3
min_nodes = 1
}
```