Skip to content

Commit c3f0e8c

Browse files
committed
Use variable vpc_cidr_block
1 parent b08712d commit c3f0e8c

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,7 @@ module "private_alb_config" {
236236

237237
private_alb_arn = module.private_alb_basic.private_alb_arn
238238
waf_logs_bucket_name = var.waf_logs_bucket_name
239+
vpc_cidr_block = module.network.vpc_cidr_block
239240
}
240241

241242
module "public_nlb_config" {

obp_private_alb_config/private-alb-waf.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ resource "aws_wafv2_ip_set" "internal_ips" {
22
name = "internal_IPs"
33
scope = "REGIONAL"
44
ip_address_version = "IPV4"
5-
addresses = ["10.0.0.0/16"]
5+
addresses = [var.vpc_cidr_block]
66
}
77
resource "aws_wafv2_web_acl" "basic_protection" {
88
name = "private-alb-waf"

obp_private_alb_config/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,9 @@ variable "waf_logs_bucket_name" {
99
type = string
1010
sensitive = false
1111
}
12+
13+
variable "vpc_cidr_block" {
14+
description = "CIDR block or network range of the VPC"
15+
type = string
16+
sensitive = false
17+
}

0 commit comments

Comments
 (0)