Skip to content

Latest commit

 

History

History
89 lines (77 loc) · 9.09 KB

File metadata and controls

89 lines (77 loc) · 9.09 KB

AWS EKS Cluster Module

Terraform module which creates AWS EKS (Kubernetes) resources with an opinionated configuration targeting Camunda 8.

Usage

Following is a simple example configuration and should be adjusted as required.

See inputs for further configuration options and how they affect the cluster creation.

module "eks_cluster" {
  source = "github.com/camunda/camunda-tf-eks-module/modules/eks-cluster"

  region             = "eu-central-1"
  name               = "cluster-name"

  cluster_service_ipv4_cidr = "10.190.0.0/16"
  cluster_node_ipv4_cidr    = "10.192.0.0/16"
}

Modules

Name Source Version
cert_manager_role terraform-aws-modules/iam/aws//modules/iam-role-for-service-accounts-eks 5.44.0
ebs_cs_role terraform-aws-modules/iam/aws//modules/iam-role-for-service-accounts-eks 5.44.0
eks terraform-aws-modules/eks/aws 20.24.0
external_dns_role terraform-aws-modules/iam/aws//modules/iam-role-for-service-accounts-eks 5.44.0
vpc terraform-aws-modules/vpc/aws 5.13.0

Resources

Name Type
aws_iam_policy.cert_manager_policy resource
aws_iam_policy.ebs_sc_access resource
aws_iam_policy.ebs_sc_access_2 resource
aws_iam_policy.eks_admin_policy resource
aws_iam_policy.external_dns_policy resource
aws_kms_key.eks resource
aws_security_group_rule.cluster_api_to_nodes resource
kubernetes_storage_class_v1.ebs_sc resource
time_sleep.eks_cluster_warmup resource
aws_caller_identity.current data source
aws_region.current data source

Inputs

Name Description Type Default Required
access_entries Map of access entries to add to the cluster. any {} no
authentication_mode The authentication mode for the cluster. string "API" no
cluster_node_ipv4_cidr The CIDR block for public and private subnets of loadbalancers and nodes. Between /28 and /16. string "10.192.0.0/16" no
cluster_service_ipv4_cidr The CIDR block to assign Kubernetes service IP addresses from. Between /24 and /12. string "10.190.0.0/16" no
enable_cluster_creator_admin_permissions Indicates whether or not to add the cluster creator (the identity used by Terraform) as an administrator via access entry. bool true no
kubernetes_version Kubernetes version to be used by EKS string "1.30" no
name Name being used for relevant resources - including EKS cluster name string n/a yes
np_ami_type Amazon Machine Image string "AL2_x86_64" no
np_capacity_type Allows setting the capacity type to ON_DEMAND or SPOT to determine stable nodes string "ON_DEMAND" no
np_desired_node_count Actual number of nodes for the default node pool. Min-Max will be used for autoscaling number 4 no
np_disk_size Disk size of the nodes on the default node pool number 20 no
np_instance_types Allow passing a list of instance types for the auto scaler to select from when scaling the default node pool list(string)
[
"m6i.xlarge"
]
no
np_max_node_count Maximum number of nodes for the default node pool number 10 no
np_min_node_count Minimum number of nodes for the default node pool number 1 no
region The region where the cluster and relevant resources should be deployed in string n/a yes

Outputs

Name Description
access_entries Map of access entries created and their attributes
cert_manager_arn Amazon Resource Name of the cert-manager IAM role used for IAM Roles to Service Accounts mappings
cluster_endpoint Endpoint for your Kubernetes API server
cluster_iam_role_arn IAM role ARN of the EKS cluster
cluster_iam_role_name IAM role name of the EKS cluster
cluster_primary_security_group_id Cluster primary security group that was created by Amazon EKS for the cluster. Managed node groups use this security group for control-plane-to-data-plane communication. Referred to as 'Cluster security group' in the EKS console
cluster_security_group_arn Amazon Resource Name (ARN) of the cluster security group
cluster_security_group_id Cluster security group that was created by Amazon EKS for the cluster. Managed node groups use this security group for control-plane-to-data-plane communication. Referred to as 'Cluster security group' in the EKS console
default_security_group_id The ID of the security group created by default on VPC creation
ebs_cs_arn Amazon Resource Name of the ebs-csi IAM role used for IAM Roles to Service Accounts mappings
external_dns_arn Amazon Resource Name of the external-dns IAM role used for IAM Roles to Service Accounts mappings
oidc_provider_arn Amazon Resource Name of the OIDC provider for the EKS cluster. Allows to add additional IRSA mappings
private_route_table_ids The IDs of the private route tables associated with this VPC
private_subnet_ids Private subnet IDs
private_vpc_cidr_blocks Private VPC CIDR blocks
public_vpc_cidr_blocks Public VPC CIDR blocks
vpc_id VPC id of the cluster
vpc_main_route_table_id The ID of the main route table associated with this VPC