Skip to content

Commit 0c2ac4f

Browse files
Merge pull request #14 from BorisLabs/add-allowed-prefixes
feat: Add ability to pass allowed prefixes into DX GW association.
2 parents 93cc20c + 3e0ec6f commit 0c2ac4f

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

main.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,8 @@ resource "aws_dx_gateway_association" "this" {
102102

103103
dx_gateway_id = aws_dx_gateway.this[0].id
104104
associated_gateway_id = concat(aws_vpn_gateway.this.*.id[0], [var.vgw_id])[0]
105+
106+
allowed_prefixes = var.allowed_prefixes
105107
}
106108

107109
resource "aws_dx_gateway_association" "cross_account" {
@@ -111,6 +113,8 @@ resource "aws_dx_gateway_association" "cross_account" {
111113
dx_gateway_id = var.dx_gateway_id
112114
proposal_id = aws_dx_gateway_association_proposal.this.*.id[0]
113115
associated_gateway_owner_account_id = data.aws_caller_identity.this.account_id
116+
117+
allowed_prefixes = var.allowed_prefixes
114118
}
115119

116120
resource "aws_dx_gateway_association_proposal" "this" {

variables.tf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -449,3 +449,10 @@ variable "dx_bgp_customer_address" {
449449

450450
type = string
451451
}
452+
453+
variable "allowed_prefixes" {
454+
description = "List of allowed prefixes to advertise to the Direct Connect Gateway"
455+
default = null
456+
457+
type = set(string)
458+
}

0 commit comments

Comments
 (0)