Skip to content

Commit

Permalink
(#75) use byo vpc cidr for nfs export and private cluster range (#79)
Browse files Browse the repository at this point in the history
  • Loading branch information
enderm authored Jul 7, 2021
1 parent f6dcedb commit 0a1a87e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ data "template_file" "nfs-cloudconfig" {

vars = {
vm_admin = var.nfs_vm_admin
base_cidr_block = var.vpc_cidr
base_cidr_block = module.vpc.vpc_cidr
}

}
Expand Down Expand Up @@ -346,7 +346,7 @@ module "eks" {
cluster_name = local.cluster_name
cluster_version = var.kubernetes_version
cluster_endpoint_private_access = true
cluster_endpoint_private_access_cidrs = [var.vpc_cidr]
cluster_endpoint_private_access_cidrs = [module.vpc.vpc_cidr]
cluster_endpoint_public_access = true
cluster_endpoint_public_access_cidrs = local.cluster_endpoint_public_access_cidrs
write_kubeconfig = false
Expand Down
5 changes: 5 additions & 0 deletions modules/aws_vpc/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,8 @@ output "private_route_table_ids" {
description = "List of IDs of private route tables"
value = aws_route_table.private.*.id
}

output "vpc_cidr" {
description = "CIDR block of VPC"
value = var.vpc_id == null ? var.cidr : data.aws_vpc.vpc[0].cidr_block
}

0 comments on commit 0a1a87e

Please sign in to comment.