-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathvirtual_private_endpoints.tf
26 lines (23 loc) · 1.14 KB
/
virtual_private_endpoints.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
##############################################################################
# Virtual Private Endpoints
##############################################################################
module "vpe_subnets" {
source = "github.com/Cloud-Schematics/get-subnets"
for_each = module.icse_vpc_network.vpc_networks
subnet_zone_list = each.value.subnet_zone_list
regex = "-vpe-"
}
module "virtual_private_endpoints" {
source = "github.com/Cloud-Schematics/vpe-module"
for_each = toset(var.enable_virtual_private_endpoints == true ? var.vpcs_create_endpoint_gateway_on_vpe_tier : [])
prefix = var.prefix
region = var.region
vpc_name = each.key
vpc_id = module.icse_vpc_network.vpc_networks[each.key].id
subnet_zone_list = module.vpe_subnets[each.key].subnets
resource_group_id = local.resource_group_vpc_map[each.key]
service_endpoints = "private"
cloud_services = var.vpe_services
security_group_ids = [module.security_groups["${each.key}-vpe"].groups[0].id]
}
##############################################################################