From ef6517240875d0736f07114794abcf83d39bd27f Mon Sep 17 00:00:00 2001 From: Jameson Molnar Date: Tue, 8 Oct 2024 09:15:39 -0400 Subject: [PATCH] chore: add byo_endpoint_service_name to cc_gwlb_asg --- examples/cc_gwlb_asg/README.md | 1 + examples/cc_gwlb_asg/main.tf | 19 ++++++++++--------- examples/cc_gwlb_asg/terraform.tfvars | 6 ++++++ examples/cc_gwlb_asg/variables.tf | 6 ++++++ 4 files changed, 23 insertions(+), 9 deletions(-) diff --git a/examples/cc_gwlb_asg/README.md b/examples/cc_gwlb_asg/README.md index 83c10a6..7a40f30 100644 --- a/examples/cc_gwlb_asg/README.md +++ b/examples/cc_gwlb_asg/README.md @@ -91,6 +91,7 @@ From cc_gwlb_asg directory execute: | [asg\_lambda\_filename](#input\_asg\_lambda\_filename) | Name of the lambda zip file without suffix | `string` | `"zscaler_cc_lambda_service"` | no | | [aws\_region](#input\_aws\_region) | The AWS region. | `string` | `"us-west-2"` | no | | [az\_count](#input\_az\_count) | Default number of subnets to create based on availability zone | `number` | `2` | no | +| [byo\_endpoint\_service\_name](#input\_byo\_endpoint\_service\_name) | Exising GWLB Endpoint Service name to associate GWLB Endpoints to. Example string format: "com.amazonaws.vpce.." | `string` | `null` | no | | [byo\_iam](#input\_byo\_iam) | Bring your own IAM Instance Profile for Cloud Connector | `bool` | `false` | no | | [byo\_iam\_instance\_profile\_id](#input\_byo\_iam\_instance\_profile\_id) | IAM Instance Profile ID for Cloud Connector association | `list(string)` | `null` | no | | [byo\_igw](#input\_byo\_igw) | Bring your own AWS VPC for Cloud Connector | `bool` | `false` | no | diff --git a/examples/cc_gwlb_asg/main.tf b/examples/cc_gwlb_asg/main.tf index f48dea8..dbb3d11 100755 --- a/examples/cc_gwlb_asg/main.tf +++ b/examples/cc_gwlb_asg/main.tf @@ -234,15 +234,16 @@ module "gwlb" { # per Cloud Connector subnet/availability zone. ################################################################################ module "gwlb_endpoint" { - source = "../../modules/terraform-zscc-gwlbendpoint-aws" - name_prefix = var.name_prefix - resource_tag = random_string.suffix.result - global_tags = local.global_tags - vpc_id = module.network.vpc_id - subnet_ids = module.network.cc_subnet_ids - gwlb_arn = module.gwlb.gwlb_arn - acceptance_required = var.acceptance_required - allowed_principals = var.allowed_principals + source = "../../modules/terraform-zscc-gwlbendpoint-aws" + name_prefix = var.name_prefix + resource_tag = random_string.suffix.result + global_tags = local.global_tags + vpc_id = module.network.vpc_id + subnet_ids = module.network.cc_subnet_ids + gwlb_arn = module.gwlb.gwlb_arn + acceptance_required = var.acceptance_required + allowed_principals = var.allowed_principals + byo_endpoint_service_name = var.byo_endpoint_service_name } diff --git a/examples/cc_gwlb_asg/terraform.tfvars b/examples/cc_gwlb_asg/terraform.tfvars index c7ce592..9f4f694 100755 --- a/examples/cc_gwlb_asg/terraform.tfvars +++ b/examples/cc_gwlb_asg/terraform.tfvars @@ -364,3 +364,9 @@ ## By uncommenting (setting to false) this assumes that you have an existing VPC/Subnets (byo_subnets = true) #cc_route_table_enabled = false + +## 52. By default, this script will create a new VPC Endpoint Service in all availability zones specifified. +## Uncomment, and provide your existing GWLB Endpoint Service name to associate new GWLB Endpoints to +## Example string format: "com.amazonaws.vpce.." + +#byo_endpoint_service_name = "endpoint service name" diff --git a/examples/cc_gwlb_asg/variables.tf b/examples/cc_gwlb_asg/variables.tf index 08896e2..3eb0b95 100755 --- a/examples/cc_gwlb_asg/variables.tf +++ b/examples/cc_gwlb_asg/variables.tf @@ -502,3 +502,9 @@ variable "cc_route_table_enabled" { description = "For brownfield environments where VPC subnets already exist, set to false to not create a new route table to associate to Cloud Connector subnet(s). Default is true which means module will try to create new route tables" default = true } + +variable "byo_endpoint_service_name" { + type = string + description = "Exising GWLB Endpoint Service name to associate GWLB Endpoints to. Example string format: \"com.amazonaws.vpce..\"" + default = null +}