diff --git a/main.tf b/main.tf index a7f64db..3e3e20f 100644 --- a/main.tf +++ b/main.tf @@ -52,6 +52,18 @@ module "subnets" { tags = local.tags } +module "vpc_endpoints" { + #count = var.enable_s3_endpoint ? 1 : 0 + #source = "git@github.com:webuildyourcloud/terraform-aws-vpc_endpoints.git?ref=tags/0.18.1" + source = "git@github.com:webuildyourcloud/terraform-aws-vpc_endpoints.git" + #region = var.region + #name = var.name + vpc_id = module.vpc.vpc_id + private_route_table_id = module.subnets.private_route_table_ids + public_route_table_id = module.subnets.public_route_table_ids + #tags = local.tags +} + module "bastion" { source = "git@github.com:webuildyourcloud/terraform-aws-bastion.git" enable_bastion = true @@ -81,13 +93,13 @@ module "eks_cluster" { kubeconfig_path = var.kubeconfig_path oidc_provider_enabled = var.oidc_provider_enabled - workers_role_arns = [module.eks_node_group.eks_node_group_role_arn] - workers_security_group_ids = [module.eks_cluster.workers_security_group_ids] + workers_role_arns = [module.eks_node_group.eks_node_group_role_arn] + workers_security_group_ids = [module.eks_cluster.workers_security_group_ids] aws_eks_update_kubeconfig_additional_arguments = var.aws_eks_update_kubeconfig_additional_arguments } module "eks_node_group" { - source = "git@github.com:webuildyourcloud/terraform-aws-eks_node_group.git" + source = "git@github.com:webuildyourcloud/terraform-aws-eks_node_group.git" stage = var.stage name = var.name attributes = var.attributes diff --git a/outputs.tf b/outputs.tf index 2fc023e..6dc5c4a 100644 --- a/outputs.tf +++ b/outputs.tf @@ -10,11 +10,11 @@ output "private_subnet_cidrs" { } output "public_subnet_ids" { - value = module.subnets.public_subnet_ids + value = module.subnets.public_subnet_ids } output "private_subnet_ids" { - value = module.subnets.private_subnet_ids + value = module.subnets.private_subnet_ids } #### vpc module outputs #### @@ -26,7 +26,7 @@ output "vpc_cidr_block" { output "vpc_id" { value = module.vpc.vpc_id description = "VPC ID Main VPC" -} +} #### eks_cluster outputs #### output "eks_cluster_id" { diff --git a/variables.tf b/variables.tf index d73003c..ed29530 100644 --- a/variables.tf +++ b/variables.tf @@ -4,7 +4,7 @@ variable "region" { } variable "availability_zones" { - type = list(string) + type = list(string) } variable "vpc_cidr_block" { @@ -47,12 +47,12 @@ variable "tags" { ### Bastion Server Settings ### variable "bastion_instance_type" { - type = string + type = string description = "EC2 type for bastion" } variable "bastion_ami" { - type = string + type = string } variable "keyname" { @@ -116,10 +116,10 @@ variable "kubernetes_namespace" { type = string default = "kube-apps" description = "Kubernetes namespace to run your fargate workloads on" -} +} variable "aws_eks_update_kubeconfig_additional_arguments" { - type = string + type = string default = null description = "Additional arguments for `aws eks update-kubeconfig` command, e.g. `--role-arn xxxxxxxxx`. For more info, see https://docs.aws.amazon.com/cli/latest/reference/eks/update-kubeconfig.html" }