diff --git a/aws/main.tf b/aws/main.tf index 112ef4d..90f0b28 100644 --- a/aws/main.tf +++ b/aws/main.tf @@ -43,13 +43,13 @@ module "cdp_aws_prereqs" { module "cdp_deploy" { source = "git::https://github.com/cloudera-labs/terraform-cdp-modules.git//modules/terraform-cdp-deploy?ref=v0.2.0" - env_prefix = var.env_prefix infra_type = "aws" region = var.aws_region keypair_name = var.aws_key_pair deployment_template = var.deployment_template + cdp_lb_subnet_ids = var.cdp_lb_subnet_ids # From pre-reqs module output aws_vpc_id = module.cdp_aws_prereqs.aws_vpc_id aws_public_subnet_ids = module.cdp_aws_prereqs.aws_public_subnet_ids diff --git a/aws/terraform.tfvars.template b/aws/terraform.tfvars.template index e527195..f4ba476 100644 --- a/aws/terraform.tfvars.template +++ b/aws/terraform.tfvars.template @@ -38,5 +38,7 @@ ingress_extra_cidrs_and_ports = { # cdp_public_subnet_ids=["",""] # List of pre-existing public subnet ids. Required if create_vpc is false # cdp_private_subnet_ids=[","] # List of pre-existing private subnet ids. Required if create_vpc is false +# cdp_lb_subnet_ids=[","] # List of pre-existing private subnets to be used for Load Balancer targeting. If provided LBs will be placed in these subnets. Only required when deployment type is PRIVATE + # ------- Optional inputs for Control Plane Connectivity in fully private environment ------- # private_network_extensions=true # Set to false if external networking connectivity to CDP Control Plane exists diff --git a/aws/variables.tf b/aws/variables.tf index 7ceaf8f..6de700b 100644 --- a/aws/variables.tf +++ b/aws/variables.tf @@ -84,6 +84,12 @@ variable "cdp_private_subnet_ids" { default = null } +variable "cdp_lb_subnet_ids" { + type = list(any) + description = "List of subnet ids for Load Balancer. Required if we want to target subnets for LB" + + default = null +} # ------- Optional inputs for Control Plane Connectivity in fully private environment ------- variable "private_network_extensions" { type = bool @@ -91,4 +97,4 @@ variable "private_network_extensions" { description = "Enable creation of resources for connectivity to CDP Control Plane (public subnet and NAT Gateway) for Private Deployment. Only relevant for private deployment template" default = true -} \ No newline at end of file +}