Skip to content

Commit

Permalink
* minor updates for vpc
Browse files Browse the repository at this point in the history
  • Loading branch information
kg6zgj committed May 16, 2023
1 parent 1b87aa9 commit 1f243e4
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 6 deletions.
2 changes: 1 addition & 1 deletion examples/simple/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ provider "aws" {
}

module "eks_windows" {
source = "../../" # Actually set to "1nval1dctf/eks-windows/aws"
source = "git::https://github.com/chtbks/devops-terraform-aws-eks-windows?ref=v1.0.0"
}
6 changes: 3 additions & 3 deletions modules/vpc/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ module "vpc" {
name = "${var.eks_cluster_name}-vpc"
cidr = var.vpc_cidr_block
azs = data.aws_availability_zones.available.names
private_subnets = ["10.0.1.0/24", "10.0.2.0/24", "10.0.3.0/24"]
public_subnets = ["10.0.4.0/24", "10.0.5.0/24", "10.0.6.0/24"]
private_subnets = var.vpc_cidr_private_subnets
public_subnets = var.vpc_cidr_public_subnets
enable_dns_hostnames = true
enable_dns_support = true
enable_nat_gateway = true
single_nat_gateway = true
single_nat_gateway = false

enable_flow_log = true
create_flow_log_cloudwatch_iam_role = true
Expand Down
14 changes: 14 additions & 0 deletions modules/vpc/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,17 @@ variable "vpc_cidr_block" {
description = "The top-level CIDR block for the VPC."
default = "10.0.0.0/16"
}


variable "vpc_cidr_private_subnets" {
type = list(string)
description = "private subnets in the main CIDR block for the VPC."
default = ["10.0.1.0/24", "10.0.2.0/24", "10.0.3.0/24"]
}


variable "vpc_cidr_public_subnets" {
type = list(string)
description = "private subnets in the main CIDR block for the VPC."
default = ["10.0.4.0/24", "10.0.5.0/24", "10.0.6.0/24"]
}
4 changes: 2 additions & 2 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ variable "aws_region" {

variable "eks_cluster_version" {
type = string
description = "KKubernetes version for the EKS cluster"
description = "Kubernetes version for the EKS cluster"
default = "1.26"
}

Expand Down Expand Up @@ -73,7 +73,7 @@ variable "eks_autoscaling_group_windows_max_size" {

variable "external_dns_support" {
type = bool
description = "Setup IAM, service accoutn and cluster role for external_dns in EKS"
description = "Setup IAM, service accounts and cluster role for external_dns in EKS"
default = false
}

Expand Down

0 comments on commit 1f243e4

Please sign in to comment.