Terraform code using modules to privision EKS cluster, node groups, VPC, security groups and IAM roles and policy attachments on AWS. Required to create the simple infrastructure to deploy and run applications across the AWS EKS.
Before you begin, ensure you have the following installed:
- Terraform (latest)
- AWS CLI (latest)
- AWS account with read and write permissions to create EKS, VPC, ECR, S3, EC2 and IAM resources
- Generate access key and secret key for that account to be used for configuring aws credentials
- For this project we will be using aws region eu-north-1
git clone https://github.com/ArpitAggIN/aws-eks-tf.git
cd aws-eks-tf
aws configure
aws ec2 create-key-pair \
--key-name TestKeyPair \
--key-type rsa \
--key-format pem \
--output text > TestKeyPair.pem
aws ecr create-repository \
--repository-name java-eks \
--region eu-north-1 \
cd remote-state
terraform init
terraform plan
terraform apply -auto-approve
cd ..
terraform init
terraform plan
terraform apply -auto-approve
Check for all the resources created in AWS