Skip to content

OpenClassrooms/terraform-aws-eks-module

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

74 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Requirements

No requirements.

Providers

Name Version
aws n/a
tls n/a

Modules

Name Source Version
karpenter_irsa terraform-aws-modules/eks/aws//modules/karpenter 18.31.0

Resources

Name Type
aws_cloudwatch_log_group.cloudwatch_log_group resource
aws_eip.nat_gateway_eip resource
aws_eks_cluster.eks_cluster resource
aws_eks_fargate_profile.eks_fargate_profile resource
aws_eks_node_group.eks_node_group resource
aws_iam_instance_profile.karpenter resource
aws_iam_openid_connect_provider.eks_openid_connect_provider resource
aws_iam_policy.AmazonEKSClusterCloudWatchMetricsPolicy resource
aws_iam_policy.eks_admin_role_policy resource
aws_iam_policy.eks_node_group_custom_policy resource
aws_iam_role.eks_admin_role resource
aws_iam_role.eks_cluster_role resource
aws_iam_role.eks_fargate_role resource
aws_iam_role.eks_node_group_role resource
aws_iam_role.ext_secrets_role resource
aws_iam_role.karpenter_role resource
aws_iam_role_policy_attachment.AmazonEC2ContainerRegistryReadOnly resource
aws_iam_role_policy_attachment.AmazonEKSCloudWatchMetricsPolicy resource
aws_iam_role_policy_attachment.AmazonEKSClusterPolicy resource
aws_iam_role_policy_attachment.AmazonEKSClusterPolicy1 resource
aws_iam_role_policy_attachment.AmazonEKSFargatePodExecutionRolePolicy resource
aws_iam_role_policy_attachment.AmazonEKSVPCResourceController resource
aws_iam_role_policy_attachment.AmazonEKSVPCResourceController1 resource
aws_iam_role_policy_attachment.AmazonEKSWorkerNodePolicy resource
aws_iam_role_policy_attachment.AmazonEKS_CNI_Policy resource
aws_iam_role_policy_attachment.AmazonSSMManagedInstanceCore resource
aws_iam_role_policy_attachment.ElasticLoadBalancingFullAccess resource
aws_iam_role_policy_attachment.claire_api_iam_role_policy_attachment resource
aws_iam_role_policy_attachment.eks_admin_role_policy_attachment resource
aws_internet_gateway.internet_gateway resource
aws_launch_template.eks_node_group_launch_template resource
aws_nat_gateway.nat_gateway resource
aws_route.private_default_route resource
aws_route.public_default_route resource
aws_route_table.private_route_table resource
aws_route_table.public_route_table resource
aws_route_table_association.private_route_table_association resource
aws_route_table_association.public_route_table_association resource
aws_subnet.private_subnet resource
aws_subnet.public_subnet resource
aws_vpc.vpc resource
aws_availability_zones.available data source
aws_caller_identity.current data source
aws_iam_policy_document.ext_secrets_assumerole_policy data source
aws_iam_policy_document.karpenter_assumerole_policy data source
aws_partition.current data source
aws_region.current data source
tls_certificate.eks_cluster_tls_certificate data source

Inputs

Name Description Type Default Required
default_tags n/a map(string)
{
"module": "eks",
"module_github_repo": "https://github.com/OpenClassrooms/terraform-aws-eks-module"
}
no
eks_cluster_name The name of the EKS cluster any n/a yes
eks_logs_retention_in_days The log retention in days for EKS logs number 30 no
eks_node_group_instance_capacity_type Choose between ON_DEMAND and SPOT string "ON_DEMAND" no
eks_node_group_instance_desired The desired instances nb for nodes number 2 no
eks_node_group_instance_disk_size The disk size for node instances number 50 no
eks_node_group_instance_max The max instances nb for nodes number 3 no
eks_node_group_instance_min The min instances nb for nodes number 2 no
eks_node_group_instance_types The type of instances for nodes list(string)
[
"t3.medium"
]
no
eks_private_subnet_cidr Private subnets' CIDR blocks. list(string)
[
"10.20.20.0/24",
"10.20.22.0/24"
]
no
eks_public_subnet_cidr Public subnets' CIDR blocks. list(string)
[
"10.20.10.0/24",
"10.20.12.0/24"
]
no
eks_version The version of K8s you want to run string "1.25" no
eks_vpc_cidr VPC CIDR block. string "10.20.0.0/16" no
tags The tags to apply map(string) {} no
use_external_secrets Do you want to install an IRSA for external secrets? (role created will be <cluster_name>-external-secrets and service account authorized to assume it will be <cluster_name>-external-secrets) bool false no
use_fargate Do you want to use fargate or manage your node group yourself? bool false no
use_karpenter Do you want to use karpenter (https://karpenter.sh/) or manage your node group yourself? bool false no

Outputs

Name Description
cluster_ca_certificate The EKS cluster CA Cert
cluster_identity_oidc_issuer_arn The OIDC Identity issuer ARN for the cluster that can be used to associate IAM roles with a service account
cluster_oidc_issuer_url The URL on the EKS cluster for the OpenID Connect identity provider
cluster_oidc_provider_thumbprint The thumbprint of the OpenID Connect identity provider
cluster_security_group_id The SG id generated and used by the cluster
eks_admin_role_name The EKS admin role name
eks_cluster_endpoint The EKS cluster endpoint
eks_cluster_id The EKS cluster id (not always the same as the cluster_name)
eks_cluster_name The EKS cluster name
eks_node_group_role_name The EKS node_group role name
karpenter_iam_instance_profile_name The karpenter iam instance profile name
karpenter_irsa_iam_role_arn The karpenter_irsa iam role arn
karpenter_queue_name The karpenter SQS queue name
vpc_eips The EKS VPC EIPs
vpc_id The EKS VPC id