summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--playground/eks-test/main.tf67
-rw-r--r--playground/eks-test/variables.tf4
2 files changed, 0 insertions, 71 deletions
diff --git a/playground/eks-test/main.tf b/playground/eks-test/main.tf
index a23a708..c17f136 100644
--- a/playground/eks-test/main.tf
+++ b/playground/eks-test/main.tf
@@ -11,70 +11,3 @@ provider "aws" {
region = "eu-central-1" # or your preferred AWS region
}
-# Create a VPC
-resource "aws_vpc" "my_vpc" {
- cidr_block = "10.0.0.0/16"
- enable_dns_support = true
-
- tags = {
- Name = "my_vpc"
- Terraform = "true"
- }
-}
-
-# Create a Public Subnet
-resource "aws_subnet" "my_public_subnet" {
- count = 3
- cidr_block = "10.0.${count.index + 1}.0/24"
- vpc_id = aws_vpc.my_vpc.id
-
- map_public_ip_on_launch = true
-
- tags = {
- Name = "my_public_subnet-${count.index}"
- Terraform = "true"
- }
-}
-
-# Create a Private Subnet
-resource "aws_subnet" "my_private_subnet" {
- count = 3
- cidr_block = "10.0.${count.index + 4}.0/24"
- vpc_id = aws_vpc.my_vpc.id
-
- tags = {
- Name = "my_private_subnet-${count.index}"
- Terraform = "true"
- }
-}
-
-# EKS Cluster
-module "eks" {
- source = "terraform-aws-modules/eks/aws"
- cluster_name = "my-cluster"
- cluster_version = "1.27"
- subnet_ids = aws_subnet.my_private_subnet[*].id
- tags = {
- Terraform = "true"
- Environment = "dev"
- }
-
- vpc_id = aws_vpc.my_vpc.id
-
- node_groups = {
- eks_nodes = {
- desired_capacity = 2
- max_capacity = 3
- min_capacity = 1
-
- instance_type = "t3.small"
- key_name = var.key_name
- subnets = aws_subnet.my_private_subnet[*].id
-
- tags = {
- Terraform = "true"
- Environment = "dev"
- }
- }
- }
-}
diff --git a/playground/eks-test/variables.tf b/playground/eks-test/variables.tf
deleted file mode 100644
index f6ccd1d..0000000
--- a/playground/eks-test/variables.tf
+++ /dev/null
@@ -1,4 +0,0 @@
-variable "key_name" {
- description = "The key name to use for the instance"
- default = ""
-}