Skip to content

Commit

Permalink
FIX: Azure/Gcloud Networking - set target_cidrblocks to the regions c…
Browse files Browse the repository at this point in the history
…idr range so port rules only target the region it is configured in. This is not needed for AWS since a security group is created and attached to the VPC.
  • Loading branch information
bryan-bar committed Feb 15, 2024
1 parent 2a382ba commit 4cb9e9a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions edbterraform/data/templates/azure/network.tf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ module "security_{{ region_ }}" {
public_cidrblocks = var.public_cidrblocks
service_cidrblocks = local.service_cidrblocks
internal_cidrblocks = module.spec.region_cidrblocks
target_cidrblocks = [module.spec.base[{{ region_ }}].cidr_block]
tags = module.spec.base.tags

depends_on = [module.network_{{ region_ }}]
Expand Down
1 change: 1 addition & 0 deletions edbterraform/data/templates/gcloud/network.tf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ module "security_{{ region_ }}" {
public_cidrblocks = var.public_cidrblocks
service_cidrblocks = local.service_cidrblocks
internal_cidrblocks = module.spec.region_cidrblocks
target_cidrblocks = [module.spec.base[{{ region_ }}].cidr_block]
region = "{{ region }}"
name_id = module.spec.hex_id

Expand Down

0 comments on commit 4cb9e9a

Please sign in to comment.