From 799c3ce29bc8285a889633d083d6aaa7b3d947b2 Mon Sep 17 00:00:00 2001 From: sagilaufer1992 Date: Tue, 14 Nov 2023 14:04:46 +0200 Subject: [PATCH 1/5] add more IPs to the list --- env0/data_ip_ranges.go | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/env0/data_ip_ranges.go b/env0/data_ip_ranges.go index 95beb8a9..18e4bae9 100644 --- a/env0/data_ip_ranges.go +++ b/env0/data_ip_ranges.go @@ -27,8 +27,24 @@ func dataIpRanges() *schema.Resource { func dataIpRangesRead(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { ipv4s := []string{ - "18.214.210.123/32", - "44.195.170.230/32", + "3.209.36.240", + "3.222.51.117", + "3.226.24.146", + "18.214.49.142", + "18.214.210.123", + "35.81.146.242", + "35.85.88.233", + "44.195.170.230", + "44.212.144.113", + "44.227.16.37", + "44.228.227.2", + "44.229.129.182", + "44.240.181.100", + "52.73.227.111", + "54.68.137.240", + "54.88.50.2", + "54.149.16.114", + "54.165.19.49" } d.Set("ipv4", ipv4s) From 00e232b5a76cf58036268f7c5d665058454d36eb Mon Sep 17 00:00:00 2001 From: sagilaufer1992 Date: Tue, 14 Nov 2023 15:05:35 +0200 Subject: [PATCH 2/5] add comma instead of new line --- env0/data_ip_ranges.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/env0/data_ip_ranges.go b/env0/data_ip_ranges.go index 18e4bae9..4bc7ebd9 100644 --- a/env0/data_ip_ranges.go +++ b/env0/data_ip_ranges.go @@ -44,7 +44,7 @@ func dataIpRangesRead(ctx context.Context, d *schema.ResourceData, meta interfac "54.68.137.240", "54.88.50.2", "54.149.16.114", - "54.165.19.49" + "54.165.19.49", } d.Set("ipv4", ipv4s) From 7f2d6d2ac1401f959171808a72d78ecb4858f018 Mon Sep 17 00:00:00 2001 From: sagilaufer1992 Date: Tue, 14 Nov 2023 15:10:55 +0200 Subject: [PATCH 3/5] add `/32` for ip addresses --- env0/data_ip_ranges.go | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/env0/data_ip_ranges.go b/env0/data_ip_ranges.go index 4bc7ebd9..ac4197a2 100644 --- a/env0/data_ip_ranges.go +++ b/env0/data_ip_ranges.go @@ -27,24 +27,24 @@ func dataIpRanges() *schema.Resource { func dataIpRangesRead(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { ipv4s := []string{ - "3.209.36.240", - "3.222.51.117", - "3.226.24.146", - "18.214.49.142", - "18.214.210.123", - "35.81.146.242", - "35.85.88.233", - "44.195.170.230", - "44.212.144.113", - "44.227.16.37", - "44.228.227.2", - "44.229.129.182", - "44.240.181.100", - "52.73.227.111", - "54.68.137.240", - "54.88.50.2", - "54.149.16.114", - "54.165.19.49", + "3.209.36.240/32", + "3.222.51.117/32", + "3.226.24.146/32", + "18.214.49.142/32", + "18.214.210.123/32", + "35.81.146.242/32", + "35.85.88.233/32", + "44.195.170.230/32", + "44.212.144.113/32", + "44.227.16.37/32", + "44.228.227.2/32", + "44.229.129.182/32", + "44.240.181.100/32", + "52.73.227.111/32", + "54.68.137.240/32", + "54.88.50.2/32", + "54.149.16.114/32", + "54.165.19.49/32", } d.Set("ipv4", ipv4s) From 4c4b572664b4fa04bd95572e60c3e301965115df Mon Sep 17 00:00:00 2001 From: Tomer Heber Date: Tue, 14 Nov 2023 07:29:07 -0600 Subject: [PATCH 4/5] fix formatting --- env0/data_ip_ranges.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/env0/data_ip_ranges.go b/env0/data_ip_ranges.go index ac4197a2..04110a0c 100644 --- a/env0/data_ip_ranges.go +++ b/env0/data_ip_ranges.go @@ -38,7 +38,7 @@ func dataIpRangesRead(ctx context.Context, d *schema.ResourceData, meta interfac "44.212.144.113/32", "44.227.16.37/32", "44.228.227.2/32", - "44.229.129.182/32", + "44.229.129.182/32", "44.240.181.100/32", "52.73.227.111/32", "54.68.137.240/32", From d3d2a2034f63baeb7ff85a85778322c0dd4f9585 Mon Sep 17 00:00:00 2001 From: Tomer Heber Date: Tue, 14 Nov 2023 07:34:13 -0600 Subject: [PATCH 5/5] fix test --- env0/data_ip_ranges_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/env0/data_ip_ranges_test.go b/env0/data_ip_ranges_test.go index 98b12d7f..83ec2984 100644 --- a/env0/data_ip_ranges_test.go +++ b/env0/data_ip_ranges_test.go @@ -18,8 +18,8 @@ func TestIpRangesDataSource(t *testing.T) { { Config: dataSourceConfigCreate(resourceType, resourceName, map[string]interface{}{}), Check: resource.ComposeAggregateTestCheckFunc( - resource.TestCheckResourceAttr(accessor, "ipv4.0", "18.214.210.123/32"), - resource.TestCheckResourceAttr(accessor, "ipv4.1", "44.195.170.230/32"), + resource.TestCheckResourceAttr(accessor, "ipv4.0", "3.209.36.240/32"), + resource.TestCheckResourceAttr(accessor, "ipv4.1", "3.222.51.117/32"), ), }, },