Skip to content

Latest commit

 

History

History
110 lines (88 loc) · 7.04 KB

README.md

File metadata and controls

110 lines (88 loc) · 7.04 KB

terraform-aws-eks

Overview

This is just a simple EKS module for terraform which I am using for learning and testing purposes.

An optionable bastian host can be created if you intend to protect your cluster in a private network, thus not accessible from internet. If that's the case, then set the variable create_bastion_host to true.

The work here is currently in progress.

CI Tooling

Pre-commit

[..]

Terraform-docs

[..]

Semantic-Release

Configured to react on changes for the following branches:

main
dev/*
feature/*
hotfix/*
ci/*

It relies on formalzed commit message convention to document changes and while producing a new release version. Link here

Commit message convention

Angular conceived a truly good reference, here is their official resource

Terraform

Requirements

No requirements.

Providers

Name Version
aws 5.68.0
http 3.4.5

Modules

No modules.

Resources

Name Type
aws_cloudwatch_log_group.this resource
aws_eks_access_entry.this resource
aws_eks_access_policy_association.this resource
aws_eks_addon.this resource
aws_eks_cluster.this resource
aws_eks_node_group.ec2_ondemand resource
aws_iam_instance_profile.this resource
aws_iam_role.ec2_role resource
aws_iam_role.eksrole resource
aws_iam_role.workernoderole resource
aws_iam_role_policy.this resource
aws_iam_role_policy_attachment.AmazonEKSClusterPolicy resource
aws_iam_role_policy_attachment.AmazonEKSVPCResourceController resource
aws_iam_role_policy_attachment.EC2ContainerRegistryReadOnly resource
aws_iam_role_policy_attachment.EKS_CNI_Policy resource
aws_iam_role_policy_attachment.WorkerNodePolicy resource
aws_instance.bastion resource
aws_launch_template.this resource
aws_lb_target_group.this resource
aws_security_group.bastion resource
aws_security_group.this resource
aws_security_group_rule.this resource
aws_ami.al2023 data source
aws_default_tags.vars data source
aws_iam_policy_document.eksassumepolicy data source
aws_ssm_parameter.eks_ami_release_version data source
http_http.myip data source

Inputs

Name Description Type Default Required
addons n/a
list(object({
name = string
version = string
}))
n/a yes
ami_subnet __todo__ string n/a yes
capacity_type Define the EKS capacity type (ON_DEMAND, SPOT) string n/a yes
create_bastion_host It defines whether to create a bastion host or not bool false no
eks_subnets __todo__ list(any) n/a yes
eks_version Version of EKS string n/a yes
key_name __todo__ string n/a yes
private_access Enable / Disable private access to the cluster bool "false" no
public_access Enable / Disable public access to the cluster bool "false" no
public_keys A list of public keys used to connect to the server list(any) n/a yes
vpc __todo__ string n/a yes

Outputs

Name Description
bastion_public_ip n/a
endpoint n/a

Prerequisites

Before getting your hands dirty, make sure you have the following tools installed in your developer machine:

  • Terraform
  • Kubectl (this is only needed if your cluster is exposed to public internet)