From 3178f4fb61f8ae95050c43723f7ccc60d24bb96e Mon Sep 17 00:00:00 2001 From: "1nv@l1d" Date: Sat, 17 Feb 2024 16:47:32 +1100 Subject: [PATCH] Formatting fixes --- modules/eks-extras/vpc_cni.tf | 2 +- modules/eks/main.tf | 14 ++++++-------- modules/vpc/main.tf | 25 ++++++++++++------------- test/fixture/main.tf | 3 +-- 4 files changed, 20 insertions(+), 24 deletions(-) diff --git a/modules/eks-extras/vpc_cni.tf b/modules/eks-extras/vpc_cni.tf index b7225db..4633992 100644 --- a/modules/eks-extras/vpc_cni.tf +++ b/modules/eks-extras/vpc_cni.tf @@ -12,4 +12,4 @@ resource "kubernetes_config_map_v1_data" "amazon_vpc_cni" { enable-network-policy-controller = true } force = true -} \ No newline at end of file +} diff --git a/modules/eks/main.tf b/modules/eks/main.tf index a1e6cca..1efc505 100644 --- a/modules/eks/main.tf +++ b/modules/eks/main.tf @@ -32,10 +32,9 @@ module "eks" { } instance_types = [var.eks_instance_type] - - min_size = var.eks_autoscaling_group_linux_min_size - max_size = var.eks_autoscaling_group_linux_max_size - desired_size = var.eks_autoscaling_group_linux_desired_capacity + min_size = var.eks_autoscaling_group_linux_min_size + max_size = var.eks_autoscaling_group_linux_max_size + desired_size = var.eks_autoscaling_group_linux_desired_capacity } windows = { # By default, the module creates a launch template to ensure tags are propagated to instances, etc., @@ -47,10 +46,9 @@ module "eks" { "k8s.io/cluster-autoscaler/${var.eks_cluster_name}" = "owned" } instance_types = [var.eks_instance_type] - - min_size = var.eks_autoscaling_group_windows_min_size - max_size = var.eks_autoscaling_group_windows_max_size - desired_size = var.eks_autoscaling_group_windows_desired_capacity + min_size = var.eks_autoscaling_group_windows_min_size + max_size = var.eks_autoscaling_group_windows_max_size + desired_size = var.eks_autoscaling_group_windows_desired_capacity } } cluster_addons = { diff --git a/modules/vpc/main.tf b/modules/vpc/main.tf index 6115465..03a1742 100644 --- a/modules/vpc/main.tf +++ b/modules/vpc/main.tf @@ -13,19 +13,18 @@ data "aws_availability_zones" "available" {} # Create a VPC to launch our instances into module "vpc" { - source = "terraform-aws-modules/vpc/aws" - version = "5.5.2" - 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"] - enable_dns_hostnames = true - enable_dns_support = true - enable_nat_gateway = true - single_nat_gateway = true - map_public_ip_on_launch = true - + source = "terraform-aws-modules/vpc/aws" + version = "5.5.2" + 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"] + enable_dns_hostnames = true + enable_dns_support = true + enable_nat_gateway = true + single_nat_gateway = true + map_public_ip_on_launch = true enable_flow_log = true create_flow_log_cloudwatch_iam_role = true create_flow_log_cloudwatch_log_group = true diff --git a/test/fixture/main.tf b/test/fixture/main.tf index 9be3029..147dbcb 100644 --- a/test/fixture/main.tf +++ b/test/fixture/main.tf @@ -138,8 +138,7 @@ resource "kubernetes_deployment" "windows" { } spec { container { - image = "mcr.microsoft.com/windows/servercore/iis:latest" - + image = "mcr.microsoft.com/windows/servercore/iis:latest" name = "windows" image_pull_policy = "Always" port {