Skip to content

Commit 32079e1

Browse files
authored
Merge pull request #149 from ExpediaGroup/feature/enable_vpce
feat: add waggledance vpce
2 parents 1f9c307 + 6254555 commit 32079e1

File tree

3 files changed

+33
-0
lines changed

3 files changed

+33
-0
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@ All notable changes to this project will be documented in this file.
33

44
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
55

6+
## [4.5.6] - 2024-12-10
7+
### Added
8+
- Added waggledance VPC endpoint service
9+
- Added following new variables to support waggledance VPC endpint service:
10+
- `enable_vpc_endpoint_services`
11+
- `waggledance_customer_accounts`
12+
613
## [4.5.5] - 2024-10-04
714
### Added
815
- Added variables to control Waggledance deployment dns policy and config.

endpoints.tf

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,3 +72,17 @@ resource "aws_route53_record" "metastore_alias" {
7272
ttl = "60"
7373
records = [aws_vpc_endpoint.remote_metastores[count.index].dns_entry[0].dns_name]
7474
}
75+
76+
77+
data "aws_lb" "waggledance_lb" {
78+
count = var.wd_instance_type == "k8s" && var.enable_vpc_endpoint_services ? 1 : 0
79+
name = split("-", split(".", kubernetes_service.waggle_dance[0].status.0.load_balancer.0.ingress.0.hostname).0).0
80+
}
81+
82+
resource "aws_vpc_endpoint_service" "waggledance" {
83+
count = var.enable_vpc_endpoint_services ? 1 : 0
84+
network_load_balancer_arns = var.wd_instance_type == "ecs" ? aws_lb.waggledance[0].*.arn : data.aws_lb.waggledance_lb[0].*.arn
85+
acceptance_required = false
86+
allowed_principals = formatlist("arn:aws:iam::%s:root", var.waggledance_customer_accounts)
87+
tags = merge(tomap({"Name"="${local.instance_alias}"}), var.tags)
88+
}

variables.tf

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -524,3 +524,15 @@ variable "extended_server_config" {
524524
type = string
525525
default = ""
526526
}
527+
528+
variable "enable_vpc_endpoint_services" {
529+
description = "Enable metastore NLB, Route53 entries VPC access and VPC endpoint services, for cross-account access."
530+
type = bool
531+
default = false
532+
}
533+
534+
variable "waggledance_customer_accounts" {
535+
description = "Waggledance VPC Endpoint customer accounts"
536+
type = list(string)
537+
default = []
538+
}

0 commit comments

Comments
 (0)