Skip to content

Commit c7dbcda

Browse files
authored
Merge pull request #197 from tablexi/allow_custom_cidr_for_eks_vpc
Improve granularity of control for EKS module
2 parents f1f61c8 + 2f7381b commit c7dbcda

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

aws/eks/main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ locals {
1111
module "eks-vpc" {
1212
source = "../vpc"
1313

14+
cidr = var.vpc_cidr
1415
tags = merge(
1516
local.tags,
1617
{

aws/eks/outputs.tf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ output "cluster_arn" {
22
value = aws_eks_cluster.master.arn
33
}
44

5+
output "cluster_security_group_id" {
6+
value = aws_eks_cluster.master.vpc_config[0].cluster_security_group_id
7+
}
8+
59
output "main_oidc_identity" {
610
value = aws_eks_cluster.master.identity[0].oidc[0].issuer
711
}
@@ -26,6 +30,10 @@ output "vpc_id" {
2630
value = module.eks-vpc.vpc_id
2731
}
2832

33+
output "vpc_cidr_block" {
34+
value = module.eks-vpc.cidr_block
35+
}
36+
2937
output "elastic_ip" {
3038
value = var.uses_nat_gateway ? module.eks-vpc-nat-gateway[0].elastic_ip : null
3139
}

aws/eks/variables.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ variable "subnet_module" {
4444
description = "(Optional) Expose some subnet module variables to root module"
4545
}
4646

47+
variable "vpc_cidr" {
48+
description = "(Optional) The CIDR block for the VPC."
49+
default = "10.0.0.0/16"
50+
}
51+
4752
variable "tags" {
4853
description = "(Optional) A mapping of tags to assign to the resources"
4954
type = map(string)

0 commit comments

Comments
 (0)