From 58284ee31509161d660015ad1d75079638b698a8 Mon Sep 17 00:00:00 2001 From: chinthalapalli Date: Thu, 12 Sep 2024 13:27:39 +0530 Subject: [PATCH] adding modules upstream --- go.mod | 2 +- go.sum | 4 +- .../provider/cm_waf_policy_resource_test.go | 40 +++++++++++++++---- .../bigipnext/bigipnextcm.go | 2 +- vendor/modules.txt | 2 +- 5 files changed, 37 insertions(+), 13 deletions(-) diff --git a/go.mod b/go.mod index 6ead6af..7d21954 100644 --- a/go.mod +++ b/go.mod @@ -9,7 +9,7 @@ require ( github.com/hashicorp/terraform-plugin-go v0.22.1 github.com/hashicorp/terraform-plugin-log v0.9.0 github.com/hashicorp/terraform-plugin-testing v1.7.0 - gitswarm.f5net.com/terraform-providers/bigipnext v0.0.2 + gitswarm.f5net.com/terraform-providers/bigipnext v0.0.3 ) require ( diff --git a/go.sum b/go.sum index 7c3d899..5dd9244 100644 --- a/go.sum +++ b/go.sum @@ -207,8 +207,8 @@ github.com/yuin/goldmark-meta v1.1.0 h1:pWw+JLHGZe8Rk0EGsMVssiNb/AaPMHfSRszZeUei github.com/yuin/goldmark-meta v1.1.0/go.mod h1:U4spWENafuA7Zyg+Lj5RqK/MF+ovMYtBvXi1lBb2VP0= github.com/zclconf/go-cty v1.14.3 h1:1JXy1XroaGrzZuG6X9dt7HL6s9AwbY+l4UNL8o5B6ho= github.com/zclconf/go-cty v1.14.3/go.mod h1:VvMs5i0vgZdhYawQNq5kePSpLAoz8u1xvZgrPIxfnZE= -gitswarm.f5net.com/terraform-providers/bigipnext v0.0.2 h1:vbWm25ioA7ekMrjDFqO2I+8V33qyLiMr4XBZrG5XKTY= -gitswarm.f5net.com/terraform-providers/bigipnext v0.0.2/go.mod h1:SLwUYHgvE++OJL3tdWyNT4vbu094xMq8sQZyei0r3So= +gitswarm.f5net.com/terraform-providers/bigipnext v0.0.3 h1:/B++Zq31fu92WmQFteKqyIamhfJWAe6TT768TdDnbtA= +gitswarm.f5net.com/terraform-providers/bigipnext v0.0.3/go.mod h1:SLwUYHgvE++OJL3tdWyNT4vbu094xMq8sQZyei0r3So= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= diff --git a/internal/provider/cm_waf_policy_resource_test.go b/internal/provider/cm_waf_policy_resource_test.go index ae8dce4..665c19a 100644 --- a/internal/provider/cm_waf_policy_resource_test.go +++ b/internal/provider/cm_waf_policy_resource_test.go @@ -23,10 +23,10 @@ func TestAccNextCMWAFPolicyCreateTC1Resource(t *testing.T) { resource.TestCheckResourceAttr("bigipnext_cm_waf_policy.sample", "enforcement_mode", "blocking"), resource.TestCheckResourceAttr("bigipnext_cm_waf_policy.sample", "application_language", "utf-8"), resource.TestCheckResourceAttr("bigipnext_cm_waf_policy.sample", "template_name", "Rating-Based-Template"), - resource.TestCheckResourceAttr("bigipnext_cm_waf_policy.sample", "bot_defense", "false"), - resource.TestCheckResourceAttr("bigipnext_cm_waf_policy.sample", "ip_intelligence", "false"), - resource.TestCheckResourceAttr("bigipnext_cm_waf_policy.sample", "dos_protection", "true"), - resource.TestCheckResourceAttr("bigipnext_cm_waf_policy.sample", "blocking_settings", "true"), + resource.TestCheckResourceAttr("bigipnext_cm_waf_policy.sample", "bot_defense.enabled", "false"), + resource.TestCheckResourceAttr("bigipnext_cm_waf_policy.sample", "ip_intelligence.enabled", "false"), + resource.TestCheckResourceAttr("bigipnext_cm_waf_policy.sample", "dos_protection.enabled", "true"), + resource.TestCheckResourceAttr("bigipnext_cm_waf_policy.sample", "blocking_settings.enabled", "true"), ), }, { @@ -39,10 +39,10 @@ func TestAccNextCMWAFPolicyCreateTC1Resource(t *testing.T) { resource.TestCheckResourceAttr("bigipnext_cm_waf_policy.sample", "enforcement_mode", "transparent"), resource.TestCheckResourceAttr("bigipnext_cm_waf_policy.sample", "application_language", "iso-8859-6"), resource.TestCheckResourceAttr("bigipnext_cm_waf_policy.sample", "template_name", "Fundamental-Template"), - resource.TestCheckResourceAttr("bigipnext_cm_waf_policy.sample", "bot_defense", "true"), - resource.TestCheckResourceAttr("bigipnext_cm_waf_policy.sample", "ip_intelligence", "true"), - resource.TestCheckResourceAttr("bigipnext_cm_waf_policy.sample", "dos_protection", "false"), - resource.TestCheckResourceAttr("bigipnext_cm_waf_policy.sample", "blocking_settings", "false"), + resource.TestCheckResourceAttr("bigipnext_cm_waf_policy.sample", "bot_defense.enabled", "true"), + resource.TestCheckResourceAttr("bigipnext_cm_waf_policy.sample", "ip_intelligence.enabled", "true"), + resource.TestCheckResourceAttr("bigipnext_cm_waf_policy.sample", "dos_protection.enabled", "false"), + resource.TestCheckResourceAttr("bigipnext_cm_waf_policy.sample", "blocking_settings.enabled", "false"), ), }, }, @@ -174,6 +174,18 @@ resource "bigipnext_cm_waf_policy" "sample" { enforcement_mode = "blocking" application_language = "utf-8" template_name = "Rating-Based-Template" + bot_defense = { + enabled = false + } + ip_intelligence = { + enabled = false + } + dos_protection = { + enabled = true + } + blocking_settings = { + enabled = true + } }` const testAccNextCMWAFPolicyResourceUpdateConfig = ` @@ -184,4 +196,16 @@ resource "bigipnext_cm_waf_policy" "sample" { enforcement_mode = "transparent" application_language = "iso-8859-6" template_name = "Fundamental-Template" + bot_defense = { + enabled = true + } + ip_intelligence = { + enabled = true + } + dos_protection = { + enabled = false + } + blocking_settings = { + enabled = false + } }` diff --git a/vendor/gitswarm.f5net.com/terraform-providers/bigipnext/bigipnextcm.go b/vendor/gitswarm.f5net.com/terraform-providers/bigipnext/bigipnextcm.go index 15ad847..53297f0 100644 --- a/vendor/gitswarm.f5net.com/terraform-providers/bigipnext/bigipnextcm.go +++ b/vendor/gitswarm.f5net.com/terraform-providers/bigipnext/bigipnextcm.go @@ -1006,7 +1006,7 @@ func (p *BigipNextCM) DeleteGlobalResiliencyGroup(id string) error { if err != nil { f5osLogger.Info("[DeleteGlobalResiliencyGroup]", "err status / code ", err.Error()) - if strings.Contains(err.Error(), "Requested Global Resiliency Group not found for the given group id") { + if strings.Contains(err.Error(), "Global Resiliency Group not found") { f5osLogger.Info("[DeleteGlobalResiliencyGroup] Resiliency Group already deleted") return nil } diff --git a/vendor/modules.txt b/vendor/modules.txt index a927e2f..9bbe493 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -364,7 +364,7 @@ github.com/zclconf/go-cty/cty/function/stdlib github.com/zclconf/go-cty/cty/gocty github.com/zclconf/go-cty/cty/json github.com/zclconf/go-cty/cty/set -# gitswarm.f5net.com/terraform-providers/bigipnext v0.0.2 +# gitswarm.f5net.com/terraform-providers/bigipnext v0.0.3 ## explicit; go 1.19 gitswarm.f5net.com/terraform-providers/bigipnext # golang.org/x/crypto v0.21.0