diff options
| author | Paul Buetow <paul@buetow.org> | 2023-09-02 12:33:12 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2023-09-02 12:33:12 +0300 |
| commit | cb3d970e37f97cdf614511d1161648b7d4cc8d14 (patch) | |
| tree | a0316849a1460c17bca4e7fe8a61fae2fbe5b6c7 /playground/eks-test | |
| parent | 8d21bfe1cbdda3119ccc9b02542020446d0735d3 (diff) | |
cleanup
Diffstat (limited to 'playground/eks-test')
| -rw-r--r-- | playground/eks-test/main.tf | 67 | ||||
| -rw-r--r-- | playground/eks-test/variables.tf | 4 |
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 = "" -} |
