From d44d3a195da9da883b4e2b172347fd7ee424553c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 9 Jul 2024 17:46:18 +0200 Subject: [PATCH 01/14] Bump golang.org/x/tools from 0.22.0 to 0.23.0 (#283) Bumps [golang.org/x/tools](https://github.com/golang/tools) from 0.22.0 to 0.23.0. - [Release notes](https://github.com/golang/tools/releases) - [Commits](https://github.com/golang/tools/compare/v0.22.0...v0.23.0) --- updated-dependencies: - dependency-name: golang.org/x/tools dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 10 +++++----- go.sum | 20 ++++++++++---------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/go.mod b/go.mod index ec635638..9cf6e659 100644 --- a/go.mod +++ b/go.mod @@ -14,7 +14,7 @@ require ( github.com/netascode/go-sdwan v0.1.6 github.com/tidwall/gjson v1.17.1 github.com/tidwall/sjson v1.2.5 - golang.org/x/tools v0.22.0 + golang.org/x/tools v0.23.0 gopkg.in/yaml.v3 v3.0.1 ) @@ -77,12 +77,12 @@ require ( github.com/yuin/goldmark-meta v1.1.0 // indirect github.com/zclconf/go-cty v1.14.4 // indirect go.abhg.dev/goldmark/frontmatter v0.2.0 // indirect - golang.org/x/crypto v0.24.0 // indirect + golang.org/x/crypto v0.25.0 // indirect golang.org/x/exp v0.0.0-20230809150735-7b3493d9a819 // indirect - golang.org/x/mod v0.18.0 // indirect - golang.org/x/net v0.26.0 // indirect + golang.org/x/mod v0.19.0 // indirect + golang.org/x/net v0.27.0 // indirect golang.org/x/sync v0.7.0 // indirect - golang.org/x/sys v0.21.0 // indirect + golang.org/x/sys v0.22.0 // indirect golang.org/x/text v0.16.0 // indirect google.golang.org/appengine v1.6.8 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de // indirect diff --git a/go.sum b/go.sum index b72cf037..ddc82776 100644 --- a/go.sum +++ b/go.sum @@ -222,20 +222,20 @@ go.abhg.dev/goldmark/frontmatter v0.2.0/go.mod h1:XqrEkZuM57djk7zrlRUB02x8I5J0px 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= -golang.org/x/crypto v0.24.0 h1:mnl8DM0o513X8fdIkmyFE/5hTYxbwYOjDS/+rK6qpRI= -golang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5DM= +golang.org/x/crypto v0.25.0 h1:ypSNr+bnYL2YhwoMt2zPxHFmbAN1KZs/njMG3hxUp30= +golang.org/x/crypto v0.25.0/go.mod h1:T+wALwcMOSE0kXgUAnPAHqTLW+XHgcELELW8VaDgm/M= golang.org/x/exp v0.0.0-20230809150735-7b3493d9a819 h1:EDuYyU/MkFXllv9QF9819VlI9a4tzGuCbhG0ExK9o1U= golang.org/x/exp v0.0.0-20230809150735-7b3493d9a819/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.18.0 h1:5+9lSbEzPSdWkH32vYPBwEpX8KwDbM52Ud9xBUvNlb0= -golang.org/x/mod v0.18.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.19.0 h1:fEdghXQSo20giMthA7cd28ZC+jts4amQ3YMXiP5oMQ8= +golang.org/x/mod v0.19.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= -golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ= -golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= +golang.org/x/net v0.27.0 h1:5K3Njcw06/l2y9vpGCSdcxWOYHOUk3dVNGDXN+FvAys= +golang.org/x/net v0.27.0/go.mod h1:dDi0PyhWNoiUOrAS8uXv/vnScO4wnHQO4mj9fn/RytE= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -254,8 +254,8 @@ golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= -golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI= +golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= @@ -270,8 +270,8 @@ golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.22.0 h1:gqSGLZqv+AI9lIQzniJ0nZDRG5GBPsSi+DRNHWNz6yA= -golang.org/x/tools v0.22.0/go.mod h1:aCwcsjqvq7Yqt6TNyX7QMU2enbQ/Gt0bo6krSeEri+c= +golang.org/x/tools v0.23.0 h1:SGsXPZ+2l4JsgaCKkx+FQ9YZ5XEtA1GZYuoDjenLjvg= +golang.org/x/tools v0.23.0/go.mod h1:pnu6ufv6vQkll6szChhK3C3L/ruaIv5eBeztNG8wtsI= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= From 76ab30bd5bb2856d48b1e8902d1cbce243a2c20b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 10 Jul 2024 11:08:33 +0200 Subject: [PATCH 02/14] Bump github.com/hashicorp/terraform-plugin-testing from 1.8.0 to 1.9.0 (#285) Bumps [github.com/hashicorp/terraform-plugin-testing](https://github.com/hashicorp/terraform-plugin-testing) from 1.8.0 to 1.9.0. - [Release notes](https://github.com/hashicorp/terraform-plugin-testing/releases) - [Changelog](https://github.com/hashicorp/terraform-plugin-testing/blob/main/CHANGELOG.md) - [Commits](https://github.com/hashicorp/terraform-plugin-testing/compare/v1.8.0...v1.9.0) --- updated-dependencies: - dependency-name: github.com/hashicorp/terraform-plugin-testing dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 6 +++--- go.sum | 16 ++++++++-------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/go.mod b/go.mod index 9cf6e659..626cc510 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,7 @@ require ( github.com/hashicorp/terraform-plugin-framework-validators v0.12.0 github.com/hashicorp/terraform-plugin-go v0.23.0 github.com/hashicorp/terraform-plugin-log v0.9.0 - github.com/hashicorp/terraform-plugin-testing v1.8.0 + github.com/hashicorp/terraform-plugin-testing v1.9.0 github.com/netascode/go-sdwan v0.1.6 github.com/tidwall/gjson v1.17.1 github.com/tidwall/sjson v1.2.5 @@ -46,11 +46,11 @@ require ( github.com/hashicorp/go-uuid v1.0.3 // indirect github.com/hashicorp/go-version v1.7.0 // indirect github.com/hashicorp/hc-install v0.7.0 // indirect - github.com/hashicorp/hcl/v2 v2.20.1 // indirect + github.com/hashicorp/hcl/v2 v2.21.0 // indirect github.com/hashicorp/logutils v1.0.0 // indirect github.com/hashicorp/terraform-exec v0.21.0 // indirect github.com/hashicorp/terraform-json v0.22.1 // indirect - github.com/hashicorp/terraform-plugin-sdk/v2 v2.33.0 // indirect + github.com/hashicorp/terraform-plugin-sdk/v2 v2.34.0 // indirect github.com/hashicorp/terraform-registry-address v0.2.3 // indirect github.com/hashicorp/terraform-svchost v0.1.1 // indirect github.com/hashicorp/yamux v0.1.1 // indirect diff --git a/go.sum b/go.sum index ddc82776..cd849745 100644 --- a/go.sum +++ b/go.sum @@ -91,8 +91,8 @@ github.com/hashicorp/go-version v1.7.0 h1:5tqGy27NaOTB8yJKUZELlFAS/LTKJkrmONwQKe github.com/hashicorp/go-version v1.7.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/hc-install v0.7.0 h1:Uu9edVqjKQxxuD28mR5TikkKDd/p55S8vzPC1659aBk= github.com/hashicorp/hc-install v0.7.0/go.mod h1:ELmmzZlGnEcqoUMKUuykHaPCIR1sYLYX+KSggWSKZuA= -github.com/hashicorp/hcl/v2 v2.20.1 h1:M6hgdyz7HYt1UN9e61j+qKJBqR3orTWbI1HKBJEdxtc= -github.com/hashicorp/hcl/v2 v2.20.1/go.mod h1:TZDqQ4kNKCbh1iJp99FdPiUaVDDUPivbqxZulxDYqL4= +github.com/hashicorp/hcl/v2 v2.21.0 h1:lve4q/o/2rqwYOgUg3y3V2YPyD1/zkCLGjIV74Jit14= +github.com/hashicorp/hcl/v2 v2.21.0/go.mod h1:62ZYHrXgPoX8xBnzl8QzbWq4dyDsDtfCRgIq1rbJEvA= github.com/hashicorp/logutils v1.0.0 h1:dLEQVugN8vlakKOUE3ihGLTZJRB4j+M2cdTm/ORI65Y= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= github.com/hashicorp/terraform-exec v0.21.0 h1:uNkLAe95ey5Uux6KJdua6+cv8asgILFVWkd/RG0D2XQ= @@ -109,10 +109,10 @@ github.com/hashicorp/terraform-plugin-go v0.23.0 h1:AALVuU1gD1kPb48aPQUjug9Ir/12 github.com/hashicorp/terraform-plugin-go v0.23.0/go.mod h1:1E3Cr9h2vMlahWMbsSEcNrOCxovCZhOOIXjFHbjc/lQ= github.com/hashicorp/terraform-plugin-log v0.9.0 h1:i7hOA+vdAItN1/7UrfBqBwvYPQ9TFvymaRGZED3FCV0= github.com/hashicorp/terraform-plugin-log v0.9.0/go.mod h1:rKL8egZQ/eXSyDqzLUuwUYLVdlYeamldAHSxjUFADow= -github.com/hashicorp/terraform-plugin-sdk/v2 v2.33.0 h1:qHprzXy/As0rxedphECBEQAh3R4yp6pKksKHcqZx5G8= -github.com/hashicorp/terraform-plugin-sdk/v2 v2.33.0/go.mod h1:H+8tjs9TjV2w57QFVSMBQacf8k/E1XwLXGCARgViC6A= -github.com/hashicorp/terraform-plugin-testing v1.8.0 h1:wdYIgwDk4iO933gC4S8KbKdnMQShu6BXuZQPScmHvpk= -github.com/hashicorp/terraform-plugin-testing v1.8.0/go.mod h1:o2kOgf18ADUaZGhtOl0YCkfIxg01MAiMATT2EtIHlZk= +github.com/hashicorp/terraform-plugin-sdk/v2 v2.34.0 h1:kJiWGx2kiQVo97Y5IOGR4EMcZ8DtMswHhUuFibsCQQE= +github.com/hashicorp/terraform-plugin-sdk/v2 v2.34.0/go.mod h1:sl/UoabMc37HA6ICVMmGO+/0wofkVIRxf+BMb/dnoIg= +github.com/hashicorp/terraform-plugin-testing v1.9.0 h1:xOsQRqqlHKXpFq6etTxih3ubdK3HVDtfE1IY7Rpd37o= +github.com/hashicorp/terraform-plugin-testing v1.9.0/go.mod h1:fhhVx/8+XNJZTD5o3b4stfZ6+q7z9+lIWigIYdT6/44= github.com/hashicorp/terraform-registry-address v0.2.3 h1:2TAiKJ1A3MAkZlH1YI/aTVcLZRu7JseiXNRHbOAyoTI= github.com/hashicorp/terraform-registry-address v0.2.3/go.mod h1:lFHA76T8jfQteVfT7caREqguFrW3c4MFSPhZB7HHgUM= github.com/hashicorp/terraform-svchost v0.1.1 h1:EZZimZ1GxdqFRinZ1tpJwVxxt49xc/S52uzrw4x0jKQ= @@ -215,8 +215,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.4 h1:uXXczd9QDGsgu0i/QFR/hzI5NYCHLf6NQw/atrbnhq8= github.com/zclconf/go-cty v1.14.4/go.mod h1:VvMs5i0vgZdhYawQNq5kePSpLAoz8u1xvZgrPIxfnZE= -github.com/zclconf/go-cty-debug v0.0.0-20191215020915-b22d67c1ba0b h1:FosyBZYxY34Wul7O/MSKey3txpPYyCqVO5ZyceuQJEI= -github.com/zclconf/go-cty-debug v0.0.0-20191215020915-b22d67c1ba0b/go.mod h1:ZRKQfBXbGkpdV6QMzT3rU1kSTAnfu1dO8dPKjYprgj8= +github.com/zclconf/go-cty-debug v0.0.0-20240509010212-0d6042c53940 h1:4r45xpDWB6ZMSMNJFMOjqrGHynW3DIBuR2H9j0ug+Mo= +github.com/zclconf/go-cty-debug v0.0.0-20240509010212-0d6042c53940/go.mod h1:CmBdvvj3nqzfzJ6nTCIwDTPZ56aVGvDrmztiO5g3qrM= go.abhg.dev/goldmark/frontmatter v0.2.0 h1:P8kPG0YkL12+aYk2yU3xHv4tcXzeVnN+gU0tJ5JnxRw= go.abhg.dev/goldmark/frontmatter v0.2.0/go.mod h1:XqrEkZuM57djk7zrlRUB02x8I5J0px76YjkOzhB4YlU= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= From fdbdb593f584e5073054c4f30c2f24a3e71f3fa5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 10 Jul 2024 11:08:43 +0200 Subject: [PATCH 03/14] Bump github.com/hashicorp/terraform-plugin-framework-validators (#286) Bumps [github.com/hashicorp/terraform-plugin-framework-validators](https://github.com/hashicorp/terraform-plugin-framework-validators) from 0.12.0 to 0.13.0. - [Release notes](https://github.com/hashicorp/terraform-plugin-framework-validators/releases) - [Changelog](https://github.com/hashicorp/terraform-plugin-framework-validators/blob/main/CHANGELOG.md) - [Commits](https://github.com/hashicorp/terraform-plugin-framework-validators/compare/v0.12.0...v0.13.0) --- updated-dependencies: - dependency-name: github.com/hashicorp/terraform-plugin-framework-validators dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 4 ++-- go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index 626cc510..6884cd68 100644 --- a/go.mod +++ b/go.mod @@ -6,8 +6,8 @@ toolchain go1.21.6 require ( github.com/hashicorp/terraform-plugin-docs v0.19.4 - github.com/hashicorp/terraform-plugin-framework v1.9.0 - github.com/hashicorp/terraform-plugin-framework-validators v0.12.0 + github.com/hashicorp/terraform-plugin-framework v1.10.0 + github.com/hashicorp/terraform-plugin-framework-validators v0.13.0 github.com/hashicorp/terraform-plugin-go v0.23.0 github.com/hashicorp/terraform-plugin-log v0.9.0 github.com/hashicorp/terraform-plugin-testing v1.9.0 diff --git a/go.sum b/go.sum index cd849745..bda75b6a 100644 --- a/go.sum +++ b/go.sum @@ -101,10 +101,10 @@ github.com/hashicorp/terraform-json v0.22.1 h1:xft84GZR0QzjPVWs4lRUwvTcPnegqlyS7 github.com/hashicorp/terraform-json v0.22.1/go.mod h1:JbWSQCLFSXFFhg42T7l9iJwdGXBYV8fmmD6o/ML4p3A= github.com/hashicorp/terraform-plugin-docs v0.19.4 h1:G3Bgo7J22OMtegIgn8Cd/CaSeyEljqjH3G39w28JK4c= github.com/hashicorp/terraform-plugin-docs v0.19.4/go.mod h1:4pLASsatTmRynVzsjEhbXZ6s7xBlUw/2Kt0zfrq8HxA= -github.com/hashicorp/terraform-plugin-framework v1.9.0 h1:caLcDoxiRucNi2hk8+j3kJwkKfvHznubyFsJMWfZqKU= -github.com/hashicorp/terraform-plugin-framework v1.9.0/go.mod h1:qBXLDn69kM97NNVi/MQ9qgd1uWWsVftGSnygYG1tImM= -github.com/hashicorp/terraform-plugin-framework-validators v0.12.0 h1:HOjBuMbOEzl7snOdOoUfE2Jgeto6JOjLVQ39Ls2nksc= -github.com/hashicorp/terraform-plugin-framework-validators v0.12.0/go.mod h1:jfHGE/gzjxYz6XoUwi/aYiiKrJDeutQNUtGQXkaHklg= +github.com/hashicorp/terraform-plugin-framework v1.10.0 h1:xXhICE2Fns1RYZxEQebwkB2+kXouLC932Li9qelozrc= +github.com/hashicorp/terraform-plugin-framework v1.10.0/go.mod h1:qBXLDn69kM97NNVi/MQ9qgd1uWWsVftGSnygYG1tImM= +github.com/hashicorp/terraform-plugin-framework-validators v0.13.0 h1:bxZfGo9DIUoLLtHMElsu+zwqI4IsMZQBRRy4iLzZJ8E= +github.com/hashicorp/terraform-plugin-framework-validators v0.13.0/go.mod h1:wGeI02gEhj9nPANU62F2jCaHjXulejm/X+af4PdZaNo= github.com/hashicorp/terraform-plugin-go v0.23.0 h1:AALVuU1gD1kPb48aPQUjug9Ir/125t+AAurhqphJ2Co= github.com/hashicorp/terraform-plugin-go v0.23.0/go.mod h1:1E3Cr9h2vMlahWMbsSEcNrOCxovCZhOOIXjFHbjc/lQ= github.com/hashicorp/terraform-plugin-log v0.9.0 h1:i7hOA+vdAItN1/7UrfBqBwvYPQ9TFvymaRGZED3FCV0= From 8f37062a13f75de29febf0d4837017a6eaeaed31 Mon Sep 17 00:00:00 2001 From: Sean Conroy <141843633+seconroy@users.noreply.github.com> Date: Wed, 10 Jul 2024 20:53:08 +0100 Subject: [PATCH 04/14] Resolve Issue #278 and #279 (#281) --- .../zone_based_firewall_policy_definition.md | 1 + .../zone_based_firewall_policy_definition.md | 21 ++++++++++--------- ...zone_based_firewall_policy_definition.yaml | 8 ++++++- ...n_zone_based_firewall_policy_definition.go | 4 ++++ ...n_zone_based_firewall_policy_definition.go | 12 +++++++++++ ...n_zone_based_firewall_policy_definition.go | 9 +++++++- 6 files changed, 43 insertions(+), 12 deletions(-) diff --git a/docs/data-sources/zone_based_firewall_policy_definition.md b/docs/data-sources/zone_based_firewall_policy_definition.md index 80d42b68..7d8b826d 100644 --- a/docs/data-sources/zone_based_firewall_policy_definition.md +++ b/docs/data-sources/zone_based_firewall_policy_definition.md @@ -69,6 +69,7 @@ Read-Only: Read-Only: - `policy_id` (String) policy id for selected match entry +- `protocol_type` (String) Should be included with additionally entries for `destinationPort` and `protocol` whenever the type `protocolName` is used. - `type` (String) Type of match entry - `value` (String) value for selected match entry - `value_variable` (String) variable value for selected match entry if it has variable option (sourceIp & destinationIp) diff --git a/docs/resources/zone_based_firewall_policy_definition.md b/docs/resources/zone_based_firewall_policy_definition.md index 7bbd5ad1..212cf0f7 100644 --- a/docs/resources/zone_based_firewall_policy_definition.md +++ b/docs/resources/zone_based_firewall_policy_definition.md @@ -80,13 +80,22 @@ Required: - `base_action` (String) Base action - Choices: `pass`, `drop`, `inspect` -- `match_entries` (Attributes List) List of match entries (see [below for nested schema](#nestedatt--rules--match_entries)) - `rule_name` (String) Rule name - `rule_order` (Number) Rule Optional: - `action_entries` (Attributes List) List of actions entries (see [below for nested schema](#nestedatt--rules--action_entries)) +- `match_entries` (Attributes List) List of match entries (see [below for nested schema](#nestedatt--rules--match_entries)) + + +### Nested Schema for `rules.action_entries` + +Optional: + +- `type` (String) Type of action entry + - Choices: `log`, `connectionEvents` + ### Nested Schema for `rules.match_entries` @@ -99,18 +108,10 @@ Required: Optional: - `policy_id` (String) policy id for selected match entry +- `protocol_type` (String) Should be included with additionally entries for `destinationPort` and `protocol` whenever the type `protocolName` is used. - `value` (String) value for selected match entry - `value_variable` (String) variable value for selected match entry if it has variable option (sourceIp & destinationIp) - - -### Nested Schema for `rules.action_entries` - -Optional: - -- `type` (String) Type of action entry - - Choices: `log`, `connectionEvents` - ## Import Import is supported using the following syntax: diff --git a/gen/definitions/generic/zone_based_firewall_policy_definition.yaml b/gen/definitions/generic/zone_based_firewall_policy_definition.yaml index de12b9ee..5506bea8 100644 --- a/gen/definitions/generic/zone_based_firewall_policy_definition.yaml +++ b/gen/definitions/generic/zone_based_firewall_policy_definition.yaml @@ -85,7 +85,6 @@ attributes: tf_name: match_entries data_path: [match] type: List - mandatory: true min_list: 1 description: List of match entries attributes: @@ -109,6 +108,12 @@ attributes: description: value for selected match entry exclude_test: true example: 2 + - model_name: app + tf_name: protocol_type + type: String + description: Should be included with additionally entries for `destinationPort` and `protocol` whenever the type `protocolName` is used. + exclude_test: true + example: dns - model_name: vipVariableName tf_name: value_variable type: String @@ -118,6 +123,7 @@ attributes: - model_name: actions tf_name: action_entries type: List + min_list: 1 description: List of actions entries attributes: - model_name: type diff --git a/internal/provider/data_source_sdwan_zone_based_firewall_policy_definition.go b/internal/provider/data_source_sdwan_zone_based_firewall_policy_definition.go index 5110c317..ba062cd4 100644 --- a/internal/provider/data_source_sdwan_zone_based_firewall_policy_definition.go +++ b/internal/provider/data_source_sdwan_zone_based_firewall_policy_definition.go @@ -131,6 +131,10 @@ func (d *ZoneBasedFirewallPolicyDefinitionDataSource) Schema(ctx context.Context MarkdownDescription: "value for selected match entry", Computed: true, }, + "protocol_type": schema.StringAttribute{ + MarkdownDescription: "Should be included with additionally entries for `destinationPort` and `protocol` whenever the type `protocolName` is used.", + Computed: true, + }, "value_variable": schema.StringAttribute{ MarkdownDescription: "variable value for selected match entry if it has variable option (sourceIp & destinationIp)", Computed: true, diff --git a/internal/provider/model_sdwan_zone_based_firewall_policy_definition.go b/internal/provider/model_sdwan_zone_based_firewall_policy_definition.go index 20053fc0..2c5e4720 100644 --- a/internal/provider/model_sdwan_zone_based_firewall_policy_definition.go +++ b/internal/provider/model_sdwan_zone_based_firewall_policy_definition.go @@ -57,6 +57,7 @@ type ZoneBasedFirewallPolicyDefinitionRulesMatchEntries struct { Type types.String `tfsdk:"type"` PolicyId types.String `tfsdk:"policy_id"` Value types.String `tfsdk:"value"` + ProtocolType types.String `tfsdk:"protocol_type"` ValueVariable types.String `tfsdk:"value_variable"` } type ZoneBasedFirewallPolicyDefinitionRulesActionEntries struct { @@ -132,6 +133,9 @@ func (data ZoneBasedFirewallPolicyDefinition) toBody(ctx context.Context) string if !childItem.Value.IsNull() { itemChildBody, _ = sjson.Set(itemChildBody, "value", childItem.Value.ValueString()) } + if !childItem.ProtocolType.IsNull() { + itemChildBody, _ = sjson.Set(itemChildBody, "app", childItem.ProtocolType.ValueString()) + } if !childItem.ValueVariable.IsNull() { itemChildBody, _ = sjson.Set(itemChildBody, "vipVariableName", childItem.ValueVariable.ValueString()) } @@ -238,6 +242,11 @@ func (data *ZoneBasedFirewallPolicyDefinition) fromBody(ctx context.Context, res } else { cItem.Value = types.StringNull() } + if ccValue := cv.Get("app"); ccValue.Exists() { + cItem.ProtocolType = types.StringValue(ccValue.String()) + } else { + cItem.ProtocolType = types.StringNull() + } if ccValue := cv.Get("vipVariableName"); ccValue.Exists() { cItem.ValueVariable = types.StringValue(ccValue.String()) } else { @@ -333,6 +342,9 @@ func (data *ZoneBasedFirewallPolicyDefinition) hasChanges(ctx context.Context, s if !data.Rules[i].MatchEntries[ii].Value.Equal(state.Rules[i].MatchEntries[ii].Value) { hasChanges = true } + if !data.Rules[i].MatchEntries[ii].ProtocolType.Equal(state.Rules[i].MatchEntries[ii].ProtocolType) { + hasChanges = true + } if !data.Rules[i].MatchEntries[ii].ValueVariable.Equal(state.Rules[i].MatchEntries[ii].ValueVariable) { hasChanges = true } diff --git a/internal/provider/resource_sdwan_zone_based_firewall_policy_definition.go b/internal/provider/resource_sdwan_zone_based_firewall_policy_definition.go index 70a8fea4..923cbb00 100644 --- a/internal/provider/resource_sdwan_zone_based_firewall_policy_definition.go +++ b/internal/provider/resource_sdwan_zone_based_firewall_policy_definition.go @@ -140,7 +140,7 @@ func (r *ZoneBasedFirewallPolicyDefinitionResource) Schema(ctx context.Context, }, "match_entries": schema.ListNestedAttribute{ MarkdownDescription: helpers.NewAttributeDescription("List of match entries").String, - Required: true, + Optional: true, NestedObject: schema.NestedAttributeObject{ Attributes: map[string]schema.Attribute{ "type": schema.StringAttribute{ @@ -158,6 +158,10 @@ func (r *ZoneBasedFirewallPolicyDefinitionResource) Schema(ctx context.Context, MarkdownDescription: helpers.NewAttributeDescription("value for selected match entry").String, Optional: true, }, + "protocol_type": schema.StringAttribute{ + MarkdownDescription: helpers.NewAttributeDescription("Should be included with additionally entries for `destinationPort` and `protocol` whenever the type `protocolName` is used.").String, + Optional: true, + }, "value_variable": schema.StringAttribute{ MarkdownDescription: helpers.NewAttributeDescription("variable value for selected match entry if it has variable option (sourceIp & destinationIp)").String, Optional: true, @@ -182,6 +186,9 @@ func (r *ZoneBasedFirewallPolicyDefinitionResource) Schema(ctx context.Context, }, }, }, + Validators: []validator.List{ + listvalidator.SizeAtLeast(1), + }, }, }, }, From 74588c0965b6b098ce8480c2364ab44bfb1497d9 Mon Sep 17 00:00:00 2001 From: Sean Conroy <141843633+seconroy@users.noreply.github.com> Date: Wed, 10 Jul 2024 20:56:28 +0100 Subject: [PATCH 05/14] Resolve issue #247 (#282) --- .../cisco_sig_credentials.yaml | 7 +++++ gen/generator.go | 1 + gen/schema/schema.yaml | 1 + gen/templates/feature_templates/model.go | 6 ++++ ..._cisco_sig_credentials_feature_template.go | 28 +++++++++++++++++++ 5 files changed, 43 insertions(+) diff --git a/gen/definitions/feature_templates/cisco_sig_credentials.yaml b/gen/definitions/feature_templates/cisco_sig_credentials.yaml index 4ced54a1..9ecc0757 100644 --- a/gen/definitions/feature_templates/cisco_sig_credentials.yaml +++ b/gen/definitions/feature_templates/cisco_sig_credentials.yaml @@ -6,18 +6,22 @@ attributes: - model_name: organization tf_name: zscaler_organization exclude_ignore: true + requires_const_and_var: true example: org1 - model_name: partner-base-uri tf_name: zscaler_partner_base_uri exclude_ignore: true + requires_const_and_var: true example: abc - model_name: username tf_name: zscaler_username exclude_ignore: true + requires_const_and_var: true example: user1 - model_name: password tf_name: zscaler_password exclude_ignore: true + requires_const_and_var: true example: password123 - model_name: cloud-gateway tf_name: zscaler_cloud_name @@ -26,14 +30,17 @@ attributes: - model_name: partner-id tf_name: zscaler_partner_username exclude_ignore: true + requires_const_and_var: true example: partner1 - model_name: partner-secret tf_name: zscaler_partner_password exclude_ignore: true + requires_const_and_var: true example: password123 - model_name: partner-key tf_name: zscaler_partner_api_key exclude_ignore: true + requires_const_and_var: true example: key123 - model_name: api-key tf_name: umbrella_api_key diff --git a/gen/generator.go b/gen/generator.go index ca9297b4..2aed2e2f 100644 --- a/gen/generator.go +++ b/gen/generator.go @@ -263,6 +263,7 @@ type YamlConfigAttribute struct { QueryParam bool `yaml:"query_param"` NoAugmentConfig bool `yaml:"no_augment_config"` TestTags []string `yaml:"test_tags"` + RequiresConstAndVar bool `yaml:"requires_const_and_var"` } type YamlConfigConditionalAttribute struct { diff --git a/gen/schema/schema.yaml b/gen/schema/schema.yaml index 417d3bd0..b2996383 100644 --- a/gen/schema/schema.yaml +++ b/gen/schema/schema.yaml @@ -76,6 +76,7 @@ attribute: query_param: bool(required=False) # Set to true if attribute is a query parameter to be included in request url no_augment_config: bool(required=False) # If true do not augment with model data test_tags: list(str(), required=False) # List of test tags, attribute is only included in acceptance tests if an environment variable with one of these tags is configured + requires_const_and_var: bool(required=False) # If true will include both constant and variable values in payload conditional_attribute: name: str() # Reference to other attribute diff --git a/gen/templates/feature_templates/model.go b/gen/templates/feature_templates/model.go index c6108c8e..86d520ae 100644 --- a/gen/templates/feature_templates/model.go +++ b/gen/templates/feature_templates/model.go @@ -153,6 +153,9 @@ func (data {{camelCase .Name}}) toBody(ctx context.Context) string { body, _ = sjson.Set(body, path+"{{range .DataPath}}{{.}}.{{end}}{{.ModelName}}."+"vipObjectType", "{{.ObjectType}}") body, _ = sjson.Set(body, path+"{{range .DataPath}}{{.}}.{{end}}{{.ModelName}}."+"vipType", "variableName") body, _ = sjson.Set(body, path+"{{range .DataPath}}{{.}}.{{end}}{{.ModelName}}."+"vipVariableName", data.{{toGoName .TfName}}Variable.ValueString()) + {{- if .RequiresConstAndVar }} + body, _ = sjson.Set(body, path+"{{range .DataPath}}{{.}}.{{end}}{{.ModelName}}."+"vipValue", data.{{toGoName .TfName}}.Value{{.Type}}()) + {{end}} } else {{- end}} if data.{{toGoName .TfName}}.IsNull() { {{- if and (not .Mandatory) (not .ExcludeIgnore)}} @@ -167,6 +170,9 @@ func (data {{camelCase .Name}}) toBody(ctx context.Context) string { body, _ = sjson.Set(body, path+"{{range .DataPath}}{{.}}.{{end}}{{.ModelName}}."+"vipObjectType", "{{.ObjectType}}") body, _ = sjson.Set(body, path+"{{range .DataPath}}{{.}}.{{end}}{{.ModelName}}."+"vipType", "constant") body, _ = sjson.Set(body, path+"{{range .DataPath}}{{.}}.{{end}}{{.ModelName}}."+"vipValue", data.{{toGoName .TfName}}.Value{{.Type}}()) + {{- if and (.RequiresConstAndVar) (.Variable) }} + body, _ = sjson.Set(body, path+"{{range .DataPath}}{{.}}.{{end}}{{.ModelName}}."+"vipVariableName", data.{{toGoName .TfName}}Variable.ValueString()) + {{end}} } {{- else if and (eq .Type "Bool") (not .NodeOnlyContainer)}} {{if .Variable}} diff --git a/internal/provider/model_sdwan_cisco_sig_credentials_feature_template.go b/internal/provider/model_sdwan_cisco_sig_credentials_feature_template.go index ed24ce17..f052d0c5 100644 --- a/internal/provider/model_sdwan_cisco_sig_credentials_feature_template.go +++ b/internal/provider/model_sdwan_cisco_sig_credentials_feature_template.go @@ -91,44 +91,60 @@ func (data CiscoSIGCredentials) toBody(ctx context.Context) string { body, _ = sjson.Set(body, path+"zscaler.organization."+"vipObjectType", "object") body, _ = sjson.Set(body, path+"zscaler.organization."+"vipType", "variableName") body, _ = sjson.Set(body, path+"zscaler.organization."+"vipVariableName", data.ZscalerOrganizationVariable.ValueString()) + body, _ = sjson.Set(body, path+"zscaler.organization."+"vipValue", data.ZscalerOrganization.ValueString()) + } else if data.ZscalerOrganization.IsNull() { } else { body, _ = sjson.Set(body, path+"zscaler.organization."+"vipObjectType", "object") body, _ = sjson.Set(body, path+"zscaler.organization."+"vipType", "constant") body, _ = sjson.Set(body, path+"zscaler.organization."+"vipValue", data.ZscalerOrganization.ValueString()) + body, _ = sjson.Set(body, path+"zscaler.organization."+"vipVariableName", data.ZscalerOrganizationVariable.ValueString()) + } if !data.ZscalerPartnerBaseUriVariable.IsNull() { body, _ = sjson.Set(body, path+"zscaler.partner-base-uri."+"vipObjectType", "object") body, _ = sjson.Set(body, path+"zscaler.partner-base-uri."+"vipType", "variableName") body, _ = sjson.Set(body, path+"zscaler.partner-base-uri."+"vipVariableName", data.ZscalerPartnerBaseUriVariable.ValueString()) + body, _ = sjson.Set(body, path+"zscaler.partner-base-uri."+"vipValue", data.ZscalerPartnerBaseUri.ValueString()) + } else if data.ZscalerPartnerBaseUri.IsNull() { } else { body, _ = sjson.Set(body, path+"zscaler.partner-base-uri."+"vipObjectType", "object") body, _ = sjson.Set(body, path+"zscaler.partner-base-uri."+"vipType", "constant") body, _ = sjson.Set(body, path+"zscaler.partner-base-uri."+"vipValue", data.ZscalerPartnerBaseUri.ValueString()) + body, _ = sjson.Set(body, path+"zscaler.partner-base-uri."+"vipVariableName", data.ZscalerPartnerBaseUriVariable.ValueString()) + } if !data.ZscalerUsernameVariable.IsNull() { body, _ = sjson.Set(body, path+"zscaler.username."+"vipObjectType", "object") body, _ = sjson.Set(body, path+"zscaler.username."+"vipType", "variableName") body, _ = sjson.Set(body, path+"zscaler.username."+"vipVariableName", data.ZscalerUsernameVariable.ValueString()) + body, _ = sjson.Set(body, path+"zscaler.username."+"vipValue", data.ZscalerUsername.ValueString()) + } else if data.ZscalerUsername.IsNull() { } else { body, _ = sjson.Set(body, path+"zscaler.username."+"vipObjectType", "object") body, _ = sjson.Set(body, path+"zscaler.username."+"vipType", "constant") body, _ = sjson.Set(body, path+"zscaler.username."+"vipValue", data.ZscalerUsername.ValueString()) + body, _ = sjson.Set(body, path+"zscaler.username."+"vipVariableName", data.ZscalerUsernameVariable.ValueString()) + } if !data.ZscalerPasswordVariable.IsNull() { body, _ = sjson.Set(body, path+"zscaler.password."+"vipObjectType", "object") body, _ = sjson.Set(body, path+"zscaler.password."+"vipType", "variableName") body, _ = sjson.Set(body, path+"zscaler.password."+"vipVariableName", data.ZscalerPasswordVariable.ValueString()) + body, _ = sjson.Set(body, path+"zscaler.password."+"vipValue", data.ZscalerPassword.ValueString()) + } else if data.ZscalerPassword.IsNull() { } else { body, _ = sjson.Set(body, path+"zscaler.password."+"vipObjectType", "object") body, _ = sjson.Set(body, path+"zscaler.password."+"vipType", "constant") body, _ = sjson.Set(body, path+"zscaler.password."+"vipValue", data.ZscalerPassword.ValueString()) + body, _ = sjson.Set(body, path+"zscaler.password."+"vipVariableName", data.ZscalerPasswordVariable.ValueString()) + } if !data.ZscalerCloudNameVariable.IsNull() { @@ -146,33 +162,45 @@ func (data CiscoSIGCredentials) toBody(ctx context.Context) string { body, _ = sjson.Set(body, path+"zscaler.partner-id."+"vipObjectType", "object") body, _ = sjson.Set(body, path+"zscaler.partner-id."+"vipType", "variableName") body, _ = sjson.Set(body, path+"zscaler.partner-id."+"vipVariableName", data.ZscalerPartnerUsernameVariable.ValueString()) + body, _ = sjson.Set(body, path+"zscaler.partner-id."+"vipValue", data.ZscalerPartnerUsername.ValueString()) + } else if data.ZscalerPartnerUsername.IsNull() { } else { body, _ = sjson.Set(body, path+"zscaler.partner-id."+"vipObjectType", "object") body, _ = sjson.Set(body, path+"zscaler.partner-id."+"vipType", "constant") body, _ = sjson.Set(body, path+"zscaler.partner-id."+"vipValue", data.ZscalerPartnerUsername.ValueString()) + body, _ = sjson.Set(body, path+"zscaler.partner-id."+"vipVariableName", data.ZscalerPartnerUsernameVariable.ValueString()) + } if !data.ZscalerPartnerPasswordVariable.IsNull() { body, _ = sjson.Set(body, path+"zscaler.partner-secret."+"vipObjectType", "object") body, _ = sjson.Set(body, path+"zscaler.partner-secret."+"vipType", "variableName") body, _ = sjson.Set(body, path+"zscaler.partner-secret."+"vipVariableName", data.ZscalerPartnerPasswordVariable.ValueString()) + body, _ = sjson.Set(body, path+"zscaler.partner-secret."+"vipValue", data.ZscalerPartnerPassword.ValueString()) + } else if data.ZscalerPartnerPassword.IsNull() { } else { body, _ = sjson.Set(body, path+"zscaler.partner-secret."+"vipObjectType", "object") body, _ = sjson.Set(body, path+"zscaler.partner-secret."+"vipType", "constant") body, _ = sjson.Set(body, path+"zscaler.partner-secret."+"vipValue", data.ZscalerPartnerPassword.ValueString()) + body, _ = sjson.Set(body, path+"zscaler.partner-secret."+"vipVariableName", data.ZscalerPartnerPasswordVariable.ValueString()) + } if !data.ZscalerPartnerApiKeyVariable.IsNull() { body, _ = sjson.Set(body, path+"zscaler.partner-key."+"vipObjectType", "object") body, _ = sjson.Set(body, path+"zscaler.partner-key."+"vipType", "variableName") body, _ = sjson.Set(body, path+"zscaler.partner-key."+"vipVariableName", data.ZscalerPartnerApiKeyVariable.ValueString()) + body, _ = sjson.Set(body, path+"zscaler.partner-key."+"vipValue", data.ZscalerPartnerApiKey.ValueString()) + } else if data.ZscalerPartnerApiKey.IsNull() { } else { body, _ = sjson.Set(body, path+"zscaler.partner-key."+"vipObjectType", "object") body, _ = sjson.Set(body, path+"zscaler.partner-key."+"vipType", "constant") body, _ = sjson.Set(body, path+"zscaler.partner-key."+"vipValue", data.ZscalerPartnerApiKey.ValueString()) + body, _ = sjson.Set(body, path+"zscaler.partner-key."+"vipVariableName", data.ZscalerPartnerApiKeyVariable.ValueString()) + } if !data.UmbrellaApiKeyVariable.IsNull() { From 5ec501b2929f441329e903f35dcabf6c34010776 Mon Sep 17 00:00:00 2001 From: danischm Date: Wed, 10 Jul 2024 21:57:01 +0200 Subject: [PATCH 06/14] Update changelog --- CHANGELOG.md | 4 ++++ docs/guides/changelog.md | 4 ++++ templates/guides/changelog.md.tmpl | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e95eb2d9..e5657ab5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.3.12 (unreleased) + +- Add `protocol_type` attribute to `sdwan_zone_based_firewall_policy_definition` resource and data source + ## 0.3.11 - Add workaround for issue when concurrently deleting localized policy objects where the reference count is not updated diff --git a/docs/guides/changelog.md b/docs/guides/changelog.md index e14d631f..8ac42555 100644 --- a/docs/guides/changelog.md +++ b/docs/guides/changelog.md @@ -7,6 +7,10 @@ description: |- # Changelog +## 0.3.12 (unreleased) + +- Add `protocol_type` attribute to `sdwan_zone_based_firewall_policy_definition` resource and data source + ## 0.3.11 - Add workaround for issue when concurrently deleting localized policy objects where the reference count is not updated diff --git a/templates/guides/changelog.md.tmpl b/templates/guides/changelog.md.tmpl index e14d631f..8ac42555 100644 --- a/templates/guides/changelog.md.tmpl +++ b/templates/guides/changelog.md.tmpl @@ -7,6 +7,10 @@ description: |- # Changelog +## 0.3.12 (unreleased) + +- Add `protocol_type` attribute to `sdwan_zone_based_firewall_policy_definition` resource and data source + ## 0.3.11 - Add workaround for issue when concurrently deleting localized policy objects where the reference count is not updated From 098a96f238df8171a2d9b18449882219a93feb1a Mon Sep 17 00:00:00 2001 From: danischm Date: Wed, 10 Jul 2024 22:04:04 +0200 Subject: [PATCH 07/14] Update model template --- gen/templates/feature_templates/model.go | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/gen/templates/feature_templates/model.go b/gen/templates/feature_templates/model.go index 86d520ae..937eb6a8 100644 --- a/gen/templates/feature_templates/model.go +++ b/gen/templates/feature_templates/model.go @@ -171,7 +171,7 @@ func (data {{camelCase .Name}}) toBody(ctx context.Context) string { body, _ = sjson.Set(body, path+"{{range .DataPath}}{{.}}.{{end}}{{.ModelName}}."+"vipType", "constant") body, _ = sjson.Set(body, path+"{{range .DataPath}}{{.}}.{{end}}{{.ModelName}}."+"vipValue", data.{{toGoName .TfName}}.Value{{.Type}}()) {{- if and (.RequiresConstAndVar) (.Variable) }} - body, _ = sjson.Set(body, path+"{{range .DataPath}}{{.}}.{{end}}{{.ModelName}}."+"vipVariableName", data.{{toGoName .TfName}}Variable.ValueString()) + body, _ = sjson.Set(body, path+"{{range .DataPath}}{{.}}.{{end}}{{.ModelName}}."+"vipVariableName", data.{{toGoName .TfName}}Variable.Value{{.Type}}()) {{end}} } {{- else if and (eq .Type "Bool") (not .NodeOnlyContainer)}} @@ -254,6 +254,9 @@ func (data {{camelCase .Name}}) toBody(ctx context.Context) string { itemBody, _ = sjson.Set(itemBody, "{{range .DataPath}}{{.}}.{{end}}{{.ModelName}}."+"vipObjectType", "{{.ObjectType}}") itemBody, _ = sjson.Set(itemBody, "{{range .DataPath}}{{.}}.{{end}}{{.ModelName}}."+"vipType", "variableName") itemBody, _ = sjson.Set(itemBody, "{{range .DataPath}}{{.}}.{{end}}{{.ModelName}}."+"vipVariableName", item.{{toGoName .TfName}}Variable.ValueString()) + {{- if .RequiresConstAndVar }} + itemBody, _ = sjson.Set(itemBody, "{{range .DataPath}}{{.}}.{{end}}{{.ModelName}}."+"vipValue", item.{{toGoName .TfName}}.Value{{.Type}}()) + {{end}} } else {{- end}} if item.{{toGoName .TfName}}.IsNull() { {{- if and (not .Mandatory) (not .ExcludeIgnore)}} @@ -268,6 +271,9 @@ func (data {{camelCase .Name}}) toBody(ctx context.Context) string { itemBody, _ = sjson.Set(itemBody, "{{range .DataPath}}{{.}}.{{end}}{{.ModelName}}."+"vipObjectType", "{{.ObjectType}}") itemBody, _ = sjson.Set(itemBody, "{{range .DataPath}}{{.}}.{{end}}{{.ModelName}}."+"vipType", "constant") itemBody, _ = sjson.Set(itemBody, "{{range .DataPath}}{{.}}.{{end}}{{.ModelName}}."+"vipValue", item.{{toGoName .TfName}}.Value{{.Type}}()) + {{- if and (.RequiresConstAndVar) (.Variable) }} + itemBody, _ = sjson.Set(itemBody, "{{range .DataPath}}{{.}}.{{end}}{{.ModelName}}."+"vipVariableName", item.{{toGoName .TfName}}Variable.Value{{.Type}}()) + {{end}} } {{- else if and (eq .Type "Bool") (not .NodeOnlyContainer)}} {{if .Variable}} @@ -349,6 +355,9 @@ func (data {{camelCase .Name}}) toBody(ctx context.Context) string { itemChildBody, _ = sjson.Set(itemChildBody, "{{range .DataPath}}{{.}}.{{end}}{{.ModelName}}."+"vipObjectType", "{{.ObjectType}}") itemChildBody, _ = sjson.Set(itemChildBody, "{{range .DataPath}}{{.}}.{{end}}{{.ModelName}}."+"vipType", "variableName") itemChildBody, _ = sjson.Set(itemChildBody, "{{range .DataPath}}{{.}}.{{end}}{{.ModelName}}."+"vipVariableName", childItem.{{toGoName .TfName}}Variable.ValueString()) + {{- if .RequiresConstAndVar }} + itemChildBody, _ = sjson.Set(itemChildBody, "{{range .DataPath}}{{.}}.{{end}}{{.ModelName}}."+"vipValue", childItem.{{toGoName .TfName}}.Value{{.Type}}()) + {{end}} } else {{- end}} if childItem.{{toGoName .TfName}}.IsNull() { {{- if and (not .Mandatory) (not .ExcludeIgnore)}} @@ -363,6 +372,9 @@ func (data {{camelCase .Name}}) toBody(ctx context.Context) string { itemChildBody, _ = sjson.Set(itemChildBody, "{{range .DataPath}}{{.}}.{{end}}{{.ModelName}}."+"vipObjectType", "{{.ObjectType}}") itemChildBody, _ = sjson.Set(itemChildBody, "{{range .DataPath}}{{.}}.{{end}}{{.ModelName}}."+"vipType", "constant") itemChildBody, _ = sjson.Set(itemChildBody, "{{range .DataPath}}{{.}}.{{end}}{{.ModelName}}."+"vipValue", childItem.{{toGoName .TfName}}.Value{{.Type}}()) + {{- if and (.RequiresConstAndVar) (.Variable) }} + itemChildBody, _ = sjson.Set(itemChildBody, "{{range .DataPath}}{{.}}.{{end}}{{.ModelName}}."+"vipVariableName", childItem.{{toGoName .TfName}}Variable.Value{{.Type}}()) + {{end}} } {{- else if and (eq .Type "Bool") (not .NodeOnlyContainer)}} {{if .Variable}} @@ -444,6 +456,9 @@ func (data {{camelCase .Name}}) toBody(ctx context.Context) string { itemChildChildBody, _ = sjson.Set(itemChildChildBody, "{{range .DataPath}}{{.}}.{{end}}{{.ModelName}}."+"vipObjectType", "{{.ObjectType}}") itemChildChildBody, _ = sjson.Set(itemChildChildBody, "{{range .DataPath}}{{.}}.{{end}}{{.ModelName}}."+"vipType", "variableName") itemChildChildBody, _ = sjson.Set(itemChildChildBody, "{{range .DataPath}}{{.}}.{{end}}{{.ModelName}}."+"vipVariableName", childChildItem.{{toGoName .TfName}}Variable.ValueString()) + {{- if .RequiresConstAndVar }} + itemChildChildBody, _ = sjson.Set(itemChildChildBody, "{{range .DataPath}}{{.}}.{{end}}{{.ModelName}}."+"vipValue", childChildItem.{{toGoName .TfName}}.Value{{.Type}}()) + {{end}} } else {{- end}} if childChildItem.{{toGoName .TfName}}.IsNull() { {{- if and (not .Mandatory) (not .ExcludeIgnore)}} @@ -458,6 +473,9 @@ func (data {{camelCase .Name}}) toBody(ctx context.Context) string { itemChildChildBody, _ = sjson.Set(itemChildChildBody, "{{range .DataPath}}{{.}}.{{end}}{{.ModelName}}."+"vipObjectType", "{{.ObjectType}}") itemChildChildBody, _ = sjson.Set(itemChildChildBody, "{{range .DataPath}}{{.}}.{{end}}{{.ModelName}}."+"vipType", "constant") itemChildChildBody, _ = sjson.Set(itemChildChildBody, "{{range .DataPath}}{{.}}.{{end}}{{.ModelName}}."+"vipValue", childChildItem.{{toGoName .TfName}}.Value{{.Type}}()) + {{- if and (.RequiresConstAndVar) (.Variable) }} + itemChildChildBody, _ = sjson.Set(itemChildChildBody, "{{range .DataPath}}{{.}}.{{end}}{{.ModelName}}."+"vipVariableName", childChildItem.{{toGoName .TfName}}Variable.Value{{.Type}}()) + {{end}} } {{- else if and (eq .Type "Bool") (not .NodeOnlyContainer)}} {{if .Variable}} From 7ac22dd025298b9f5056b3c1df51b44e080c9b6e Mon Sep 17 00:00:00 2001 From: danischm Date: Wed, 10 Jul 2024 22:07:01 +0200 Subject: [PATCH 08/14] Update changelog --- CHANGELOG.md | 1 + docs/guides/changelog.md | 1 + templates/guides/changelog.md.tmpl | 1 + 3 files changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e5657ab5..88ceb625 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ ## 0.3.12 (unreleased) - Add `protocol_type` attribute to `sdwan_zone_based_firewall_policy_definition` resource and data source +- Fix payload issue with `sdwan_cisco_sig_credentials_feature_template` resource, [link](https://github.com/CiscoDevNet/terraform-provider-sdwan/issues/247) ## 0.3.11 diff --git a/docs/guides/changelog.md b/docs/guides/changelog.md index 8ac42555..5aa78ceb 100644 --- a/docs/guides/changelog.md +++ b/docs/guides/changelog.md @@ -10,6 +10,7 @@ description: |- ## 0.3.12 (unreleased) - Add `protocol_type` attribute to `sdwan_zone_based_firewall_policy_definition` resource and data source +- Fix payload issue with `sdwan_cisco_sig_credentials_feature_template` resource, [link](https://github.com/CiscoDevNet/terraform-provider-sdwan/issues/247) ## 0.3.11 diff --git a/templates/guides/changelog.md.tmpl b/templates/guides/changelog.md.tmpl index 8ac42555..5aa78ceb 100644 --- a/templates/guides/changelog.md.tmpl +++ b/templates/guides/changelog.md.tmpl @@ -10,6 +10,7 @@ description: |- ## 0.3.12 (unreleased) - Add `protocol_type` attribute to `sdwan_zone_based_firewall_policy_definition` resource and data source +- Fix payload issue with `sdwan_cisco_sig_credentials_feature_template` resource, [link](https://github.com/CiscoDevNet/terraform-provider-sdwan/issues/247) ## 0.3.11 From b3303938cceb253e58624ce98071a3ff1c288654 Mon Sep 17 00:00:00 2001 From: danischm Date: Thu, 11 Jul 2024 16:34:15 +0200 Subject: [PATCH 09/14] 0.3.12 version bump --- CHANGELOG.md | 2 +- docs/guides/changelog.md | 2 +- templates/guides/changelog.md.tmpl | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 88ceb625..52b76b10 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -## 0.3.12 (unreleased) +## 0.3.12 - Add `protocol_type` attribute to `sdwan_zone_based_firewall_policy_definition` resource and data source - Fix payload issue with `sdwan_cisco_sig_credentials_feature_template` resource, [link](https://github.com/CiscoDevNet/terraform-provider-sdwan/issues/247) diff --git a/docs/guides/changelog.md b/docs/guides/changelog.md index 5aa78ceb..803373d5 100644 --- a/docs/guides/changelog.md +++ b/docs/guides/changelog.md @@ -7,7 +7,7 @@ description: |- # Changelog -## 0.3.12 (unreleased) +## 0.3.12 - Add `protocol_type` attribute to `sdwan_zone_based_firewall_policy_definition` resource and data source - Fix payload issue with `sdwan_cisco_sig_credentials_feature_template` resource, [link](https://github.com/CiscoDevNet/terraform-provider-sdwan/issues/247) diff --git a/templates/guides/changelog.md.tmpl b/templates/guides/changelog.md.tmpl index 5aa78ceb..803373d5 100644 --- a/templates/guides/changelog.md.tmpl +++ b/templates/guides/changelog.md.tmpl @@ -7,7 +7,7 @@ description: |- # Changelog -## 0.3.12 (unreleased) +## 0.3.12 - Add `protocol_type` attribute to `sdwan_zone_based_firewall_policy_definition` resource and data source - Fix payload issue with `sdwan_cisco_sig_credentials_feature_template` resource, [link](https://github.com/CiscoDevNet/terraform-provider-sdwan/issues/247) From 76379f8922adf659d1945d6fb403347fd539eb77 Mon Sep 17 00:00:00 2001 From: danischm Date: Fri, 12 Jul 2024 15:15:13 +0200 Subject: [PATCH 10/14] Add workaround for issue when concurrently deleting security policies --- CHANGELOG.md | 4 ++++ docs/guides/changelog.md | 4 ++++ gen/definitions/generic/security_policy.yaml | 1 + internal/provider/resource_sdwan_security_policy.go | 2 ++ templates/guides/changelog.md.tmpl | 4 ++++ 5 files changed, 15 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 52b76b10..b91ccb12 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.3.13 (unreleased) + +- Add workaround for issue when concurrently deleting security policy objects where the reference count is not updated + ## 0.3.12 - Add `protocol_type` attribute to `sdwan_zone_based_firewall_policy_definition` resource and data source diff --git a/docs/guides/changelog.md b/docs/guides/changelog.md index 803373d5..abc1238e 100644 --- a/docs/guides/changelog.md +++ b/docs/guides/changelog.md @@ -7,6 +7,10 @@ description: |- # Changelog +## 0.3.13 (unreleased) + +- Add workaround for issue when concurrently deleting security policy objects where the reference count is not updated + ## 0.3.12 - Add `protocol_type` attribute to `sdwan_zone_based_firewall_policy_definition` resource and data source diff --git a/gen/definitions/generic/security_policy.yaml b/gen/definitions/generic/security_policy.yaml index ac17ab59..05db2f48 100644 --- a/gen/definitions/generic/security_policy.yaml +++ b/gen/definitions/generic/security_policy.yaml @@ -5,6 +5,7 @@ get_rest_endpoint: /template/policy/security/definition/ has_version: true id_from_query_path: data id_from_query_path_attribute: policyId +delete_mutex: true doc_category: Security Policies attributes: - model_name: policyType diff --git a/internal/provider/resource_sdwan_security_policy.go b/internal/provider/resource_sdwan_security_policy.go index cb067655..ce954d17 100644 --- a/internal/provider/resource_sdwan_security_policy.go +++ b/internal/provider/resource_sdwan_security_policy.go @@ -332,7 +332,9 @@ func (r *SecurityPolicyResource) Delete(ctx context.Context, req resource.Delete tflog.Debug(ctx, fmt.Sprintf("%s: Beginning Delete", state.Name.ValueString())) + r.updateMutex.Lock() res, err := r.client.Delete(state.getPath() + url.QueryEscape(state.Id.ValueString())) + r.updateMutex.Unlock() if err != nil { resp.Diagnostics.AddError("Client Error", fmt.Sprintf("Failed to delete object (DELETE), got error: %s, %s", err, res.String())) return diff --git a/templates/guides/changelog.md.tmpl b/templates/guides/changelog.md.tmpl index 803373d5..abc1238e 100644 --- a/templates/guides/changelog.md.tmpl +++ b/templates/guides/changelog.md.tmpl @@ -7,6 +7,10 @@ description: |- # Changelog +## 0.3.13 (unreleased) + +- Add workaround for issue when concurrently deleting security policy objects where the reference count is not updated + ## 0.3.12 - Add `protocol_type` attribute to `sdwan_zone_based_firewall_policy_definition` resource and data source From 0da9e7be98dbb908750b76623e11bfedcd72ebfc Mon Sep 17 00:00:00 2001 From: danischm Date: Fri, 12 Jul 2024 15:20:00 +0200 Subject: [PATCH 11/14] Remove default value of failure mode attribute of security policy resource --- CHANGELOG.md | 1 + docs/guides/changelog.md | 1 + docs/resources/security_policy.md | 1 - gen/definitions/generic/security_policy.yaml | 1 - internal/provider/resource_sdwan_security_policy.go | 4 +--- templates/guides/changelog.md.tmpl | 1 + 6 files changed, 4 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b91ccb12..851d435e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ ## 0.3.13 (unreleased) - Add workaround for issue when concurrently deleting security policy objects where the reference count is not updated +- BREAKING CHANGE: Remove default value of `failure_mode` attribute of `sdwan_security_policy` resource ## 0.3.12 diff --git a/docs/guides/changelog.md b/docs/guides/changelog.md index abc1238e..7f3b00bf 100644 --- a/docs/guides/changelog.md +++ b/docs/guides/changelog.md @@ -10,6 +10,7 @@ description: |- ## 0.3.13 (unreleased) - Add workaround for issue when concurrently deleting security policy objects where the reference count is not updated +- BREAKING CHANGE: Remove default value of `failure_mode` attribute of `sdwan_security_policy` resource ## 0.3.12 diff --git a/docs/resources/security_policy.md b/docs/resources/security_policy.md index a2755878..a6d80f4c 100644 --- a/docs/resources/security_policy.md +++ b/docs/resources/security_policy.md @@ -51,7 +51,6 @@ resource "sdwan_security_policy" "example" { - Choices: `allow`, `deny` - `failure_mode` (String) Failure mode - Choices: `open`, `close` - - Default value: `open` - `high_speed_logging_server_ip` (String) High Speed Logging Server IP - `high_speed_logging_server_port` (String) High Speed Logging Port - `high_speed_logging_vpn` (String) High Speed Logging VPN diff --git a/gen/definitions/generic/security_policy.yaml b/gen/definitions/generic/security_policy.yaml index 05db2f48..19b1115c 100644 --- a/gen/definitions/generic/security_policy.yaml +++ b/gen/definitions/generic/security_policy.yaml @@ -96,7 +96,6 @@ attributes: data_path: [policyDefinition, settings] tf_name: failure_mode type: String - default_value: open enum_values: [open, close] description: Failure mode example: close diff --git a/internal/provider/resource_sdwan_security_policy.go b/internal/provider/resource_sdwan_security_policy.go index ce954d17..fa2a0ac5 100644 --- a/internal/provider/resource_sdwan_security_policy.go +++ b/internal/provider/resource_sdwan_security_policy.go @@ -152,13 +152,11 @@ func (r *SecurityPolicyResource) Schema(ctx context.Context, req resource.Schema }, }, "failure_mode": schema.StringAttribute{ - MarkdownDescription: helpers.NewAttributeDescription("Failure mode").AddStringEnumDescription("open", "close").AddDefaultValueDescription("open").String, + MarkdownDescription: helpers.NewAttributeDescription("Failure mode").AddStringEnumDescription("open", "close").String, Optional: true, - Computed: true, Validators: []validator.String{ stringvalidator.OneOf("open", "close"), }, - Default: stringdefault.StaticString("open"), }, "high_speed_logging_server_ip": schema.StringAttribute{ MarkdownDescription: helpers.NewAttributeDescription("High Speed Logging Server IP").String, diff --git a/templates/guides/changelog.md.tmpl b/templates/guides/changelog.md.tmpl index abc1238e..7f3b00bf 100644 --- a/templates/guides/changelog.md.tmpl +++ b/templates/guides/changelog.md.tmpl @@ -10,6 +10,7 @@ description: |- ## 0.3.13 (unreleased) - Add workaround for issue when concurrently deleting security policy objects where the reference count is not updated +- BREAKING CHANGE: Remove default value of `failure_mode` attribute of `sdwan_security_policy` resource ## 0.3.12 From ea51c939f29c4623bfaf3ffbff140d0083f59a45 Mon Sep 17 00:00:00 2001 From: danischm Date: Tue, 16 Jul 2024 16:47:28 +0200 Subject: [PATCH 12/14] Update test data --- docs/data-sources/device.md | 2 +- docs/resources/dns_security_policy_definition.md | 2 +- examples/data-sources/sdwan_device/data-source.tf | 2 +- .../sdwan_dns_security_policy_definition/resource.tf | 2 +- gen/definitions/generic/device.yaml | 6 +++--- .../generic/dns_security_policy_definition.yaml | 2 +- gen/definitions/generic/vedge_inventory.yaml | 8 ++++---- internal/provider/data_source_sdwan_device_test.go | 6 +++--- ...ta_source_sdwan_dns_security_policy_definition_test.go | 4 ++-- .../provider/data_source_sdwan_vedge_inventory_test.go | 4 ++-- .../resource_sdwan_dns_security_policy_definition_test.go | 4 ++-- 11 files changed, 21 insertions(+), 21 deletions(-) diff --git a/docs/data-sources/device.md b/docs/data-sources/device.md index 28487e66..5f51d1ba 100644 --- a/docs/data-sources/device.md +++ b/docs/data-sources/device.md @@ -14,7 +14,7 @@ This data source can read the Device . ```terraform data "sdwan_device" "example" { - serial_number = "AEB355490B954ABAB3A430797E9F4A78" + serial_number = "B668B2628BE74ED4A25BE4046E162330" name = "Controller01" } ``` diff --git a/docs/resources/dns_security_policy_definition.md b/docs/resources/dns_security_policy_definition.md index dcd74ee6..c15b25e9 100644 --- a/docs/resources/dns_security_policy_definition.md +++ b/docs/resources/dns_security_policy_definition.md @@ -21,7 +21,7 @@ resource "sdwan_dns_security_policy_definition" "example" { match_all_vpn = true dnscrypt = true umbrella_dns_default = true - cisco_sig_credentials_feature_template_id = "aed8498e-4714-42dc-9425-b17624c7acb4" + cisco_sig_credentials_feature_template_id = "839264db-3eac-441b-8e73-42b60bec9c7f" } ``` diff --git a/examples/data-sources/sdwan_device/data-source.tf b/examples/data-sources/sdwan_device/data-source.tf index b6c6b9e1..bb701317 100644 --- a/examples/data-sources/sdwan_device/data-source.tf +++ b/examples/data-sources/sdwan_device/data-source.tf @@ -1,4 +1,4 @@ data "sdwan_device" "example" { - serial_number = "AEB355490B954ABAB3A430797E9F4A78" + serial_number = "B668B2628BE74ED4A25BE4046E162330" name = "Controller01" } diff --git a/examples/resources/sdwan_dns_security_policy_definition/resource.tf b/examples/resources/sdwan_dns_security_policy_definition/resource.tf index b2988fa7..ebd741af 100644 --- a/examples/resources/sdwan_dns_security_policy_definition/resource.tf +++ b/examples/resources/sdwan_dns_security_policy_definition/resource.tf @@ -6,5 +6,5 @@ resource "sdwan_dns_security_policy_definition" "example" { match_all_vpn = true dnscrypt = true umbrella_dns_default = true - cisco_sig_credentials_feature_template_id = "aed8498e-4714-42dc-9425-b17624c7acb4" + cisco_sig_credentials_feature_template_id = "839264db-3eac-441b-8e73-42b60bec9c7f" } diff --git a/gen/definitions/generic/device.yaml b/gen/definitions/generic/device.yaml index 7cb9080d..3e8db616 100644 --- a/gen/definitions/generic/device.yaml +++ b/gen/definitions/generic/device.yaml @@ -10,7 +10,7 @@ attributes: tf_name: serial_number type: String description: Serial number for device. Could be board or virtual identifier - example: AEB355490B954ABAB3A430797E9F4A78 + example: B668B2628BE74ED4A25BE4046E162330 query_param: true - model_name: host-name tf_name: name @@ -32,7 +32,7 @@ attributes: type: String description: Unique identifier for device id: true - example: 8d2f2f23-6e0f-4086-81de-cc3e749faf64 + example: 39dde6c7-3cc0-41ef-a591-5a40a92846a5 - model_name: site-id tf_name: site_id type: String @@ -42,7 +42,7 @@ attributes: tf_name: serial_number type: String description: Serial number for device. Could be board or virtual identifier - example: AEB355490B954ABAB3A430797E9F4A78 + example: B668B2628BE74ED4A25BE4046E162330 - model_name: host-name tf_name: hostname type: String diff --git a/gen/definitions/generic/dns_security_policy_definition.yaml b/gen/definitions/generic/dns_security_policy_definition.yaml index 63d7be4d..99389e1d 100644 --- a/gen/definitions/generic/dns_security_policy_definition.yaml +++ b/gen/definitions/generic/dns_security_policy_definition.yaml @@ -103,7 +103,7 @@ attributes: id: true mandatory: true description: Credentials feature template ID - example: "aed8498e-4714-42dc-9425-b17624c7acb4" + example: "839264db-3eac-441b-8e73-42b60bec9c7f" - tf_name: cisco_sig_credentials_feature_template_version tf_only: true type: Version diff --git a/gen/definitions/generic/vedge_inventory.yaml b/gen/definitions/generic/vedge_inventory.yaml index ca66faf9..8b4971c3 100644 --- a/gen/definitions/generic/vedge_inventory.yaml +++ b/gen/definitions/generic/vedge_inventory.yaml @@ -16,23 +16,23 @@ attributes: type: String description: Chassis Number id: true - example: C8K-A5032213-D3C7-C452-187E-38CCE4C5AF87 + example: C8K-E94D7B88-4B9E-3323-C6C3-F29079FAAC3B - model_name: site-id tf_name: site_id type: String description: Site id for respective device - example: 2101 + example: 2102 exclude_test: true - model_name: serialNumber tf_name: serial_number type: String description: Serial number for device. Could be board or virtual identifier - example: 7d81a6b0983e4f99b862fb3a36018912 + example: B3E32500 - model_name: host-name tf_name: hostname type: String description: Hostname for respective device - example: SITE2101-C8KV-01 + example: SITE2102-C8KV-01 exclude_test: true - model_name: validity type: String diff --git a/internal/provider/data_source_sdwan_device_test.go b/internal/provider/data_source_sdwan_device_test.go index 1097437d..cad738ef 100644 --- a/internal/provider/data_source_sdwan_device_test.go +++ b/internal/provider/data_source_sdwan_device_test.go @@ -34,9 +34,9 @@ func TestAccDataSourceSdwanDevice(t *testing.T) { } var checks []resource.TestCheckFunc checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_device.test", "devices.0.device_id", "100.0.0.101")) - checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_device.test", "devices.0.uuid", "8d2f2f23-6e0f-4086-81de-cc3e749faf64")) + checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_device.test", "devices.0.uuid", "39dde6c7-3cc0-41ef-a591-5a40a92846a5")) checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_device.test", "devices.0.site_id", "100")) - checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_device.test", "devices.0.serial_number", "AEB355490B954ABAB3A430797E9F4A78")) + checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_device.test", "devices.0.serial_number", "B668B2628BE74ED4A25BE4046E162330")) checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_device.test", "devices.0.hostname", "Controller01")) checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_device.test", "devices.0.reachability", "reachable")) checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_device.test", "devices.0.status", "normal")) @@ -64,7 +64,7 @@ func testAccDataSourceSdwanDeviceConfig() string { config += ` data "sdwan_device" "test" { - serial_number = "AEB355490B954ABAB3A430797E9F4A78" + serial_number = "B668B2628BE74ED4A25BE4046E162330" name = "Controller01" } ` diff --git a/internal/provider/data_source_sdwan_dns_security_policy_definition_test.go b/internal/provider/data_source_sdwan_dns_security_policy_definition_test.go index 57b993e9..151733c0 100644 --- a/internal/provider/data_source_sdwan_dns_security_policy_definition_test.go +++ b/internal/provider/data_source_sdwan_dns_security_policy_definition_test.go @@ -39,7 +39,7 @@ func TestAccDataSourceSdwanDNSSecurityPolicyDefinition(t *testing.T) { checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_dns_security_policy_definition.test", "match_all_vpn", "true")) checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_dns_security_policy_definition.test", "dnscrypt", "true")) checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_dns_security_policy_definition.test", "umbrella_dns_default", "true")) - checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_dns_security_policy_definition.test", "cisco_sig_credentials_feature_template_id", "aed8498e-4714-42dc-9425-b17624c7acb4")) + checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_dns_security_policy_definition.test", "cisco_sig_credentials_feature_template_id", "839264db-3eac-441b-8e73-42b60bec9c7f")) resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, ProtoV6ProviderFactories: testAccProtoV6ProviderFactories, @@ -80,7 +80,7 @@ func testAccDataSourceSdwanDNSSecurityPolicyDefinitionConfig() string { config += ` match_all_vpn = true` + "\n" config += ` dnscrypt = true` + "\n" config += ` umbrella_dns_default = true` + "\n" - config += ` cisco_sig_credentials_feature_template_id = "aed8498e-4714-42dc-9425-b17624c7acb4"` + "\n" + config += ` cisco_sig_credentials_feature_template_id = "839264db-3eac-441b-8e73-42b60bec9c7f"` + "\n" config += `}` + "\n" config += ` diff --git a/internal/provider/data_source_sdwan_vedge_inventory_test.go b/internal/provider/data_source_sdwan_vedge_inventory_test.go index 3c655180..ba41c6b4 100644 --- a/internal/provider/data_source_sdwan_vedge_inventory_test.go +++ b/internal/provider/data_source_sdwan_vedge_inventory_test.go @@ -33,8 +33,8 @@ func TestAccDataSourceSdwanVEdgeInventory(t *testing.T) { t.Skip("skipping test, set environment variable SDWAN_209") } var checks []resource.TestCheckFunc - checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_vedge_inventory.test", "devices.0.chassis_number", "C8K-A5032213-D3C7-C452-187E-38CCE4C5AF87")) - checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_vedge_inventory.test", "devices.0.serial_number", "7d81a6b0983e4f99b862fb3a36018912")) + checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_vedge_inventory.test", "devices.0.chassis_number", "C8K-E94D7B88-4B9E-3323-C6C3-F29079FAAC3B")) + checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_vedge_inventory.test", "devices.0.serial_number", "B3E32500")) checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_vedge_inventory.test", "devices.0.device_type", "vedge")) resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, diff --git a/internal/provider/resource_sdwan_dns_security_policy_definition_test.go b/internal/provider/resource_sdwan_dns_security_policy_definition_test.go index 87645748..e9e6d638 100644 --- a/internal/provider/resource_sdwan_dns_security_policy_definition_test.go +++ b/internal/provider/resource_sdwan_dns_security_policy_definition_test.go @@ -39,7 +39,7 @@ func TestAccSdwanDNSSecurityPolicyDefinition(t *testing.T) { checks = append(checks, resource.TestCheckResourceAttr("sdwan_dns_security_policy_definition.test", "match_all_vpn", "true")) checks = append(checks, resource.TestCheckResourceAttr("sdwan_dns_security_policy_definition.test", "dnscrypt", "true")) checks = append(checks, resource.TestCheckResourceAttr("sdwan_dns_security_policy_definition.test", "umbrella_dns_default", "true")) - checks = append(checks, resource.TestCheckResourceAttr("sdwan_dns_security_policy_definition.test", "cisco_sig_credentials_feature_template_id", "aed8498e-4714-42dc-9425-b17624c7acb4")) + checks = append(checks, resource.TestCheckResourceAttr("sdwan_dns_security_policy_definition.test", "cisco_sig_credentials_feature_template_id", "839264db-3eac-441b-8e73-42b60bec9c7f")) resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, ProtoV6ProviderFactories: testAccProtoV6ProviderFactories, @@ -79,7 +79,7 @@ func testAccSdwanDNSSecurityPolicyDefinitionConfig_all() string { config += ` match_all_vpn = true` + "\n" config += ` dnscrypt = true` + "\n" config += ` umbrella_dns_default = true` + "\n" - config += ` cisco_sig_credentials_feature_template_id = "aed8498e-4714-42dc-9425-b17624c7acb4"` + "\n" + config += ` cisco_sig_credentials_feature_template_id = "839264db-3eac-441b-8e73-42b60bec9c7f"` + "\n" config += `}` + "\n" return config } From 47c2ae4e53a2acd649406fc06109060c4f61aacc Mon Sep 17 00:00:00 2001 From: danischm Date: Tue, 16 Jul 2024 21:42:10 +0200 Subject: [PATCH 13/14] Test data update --- docs/data-sources/device.md | 2 +- docs/resources/dns_security_policy_definition.md | 2 +- examples/data-sources/sdwan_device/data-source.tf | 2 +- .../sdwan_dns_security_policy_definition/resource.tf | 2 +- gen/definitions/generic/device.yaml | 6 +++--- .../generic/dns_security_policy_definition.yaml | 2 +- gen/definitions/generic/vedge_inventory.yaml | 8 ++++---- internal/provider/data_source_sdwan_device_test.go | 6 +++--- ...ta_source_sdwan_dns_security_policy_definition_test.go | 4 ++-- .../provider/data_source_sdwan_vedge_inventory_test.go | 4 ++-- .../resource_sdwan_dns_security_policy_definition_test.go | 4 ++-- 11 files changed, 21 insertions(+), 21 deletions(-) diff --git a/docs/data-sources/device.md b/docs/data-sources/device.md index 5f51d1ba..bcb1e5fd 100644 --- a/docs/data-sources/device.md +++ b/docs/data-sources/device.md @@ -14,7 +14,7 @@ This data source can read the Device . ```terraform data "sdwan_device" "example" { - serial_number = "B668B2628BE74ED4A25BE4046E162330" + serial_number = "12B53B6E42654E01B98C77C347CE216E" name = "Controller01" } ``` diff --git a/docs/resources/dns_security_policy_definition.md b/docs/resources/dns_security_policy_definition.md index c15b25e9..aa21cbd4 100644 --- a/docs/resources/dns_security_policy_definition.md +++ b/docs/resources/dns_security_policy_definition.md @@ -21,7 +21,7 @@ resource "sdwan_dns_security_policy_definition" "example" { match_all_vpn = true dnscrypt = true umbrella_dns_default = true - cisco_sig_credentials_feature_template_id = "839264db-3eac-441b-8e73-42b60bec9c7f" + cisco_sig_credentials_feature_template_id = "3ac6eef9-bd8f-458d-96a7-a932c90b1e75" } ``` diff --git a/examples/data-sources/sdwan_device/data-source.tf b/examples/data-sources/sdwan_device/data-source.tf index bb701317..367a8ce3 100644 --- a/examples/data-sources/sdwan_device/data-source.tf +++ b/examples/data-sources/sdwan_device/data-source.tf @@ -1,4 +1,4 @@ data "sdwan_device" "example" { - serial_number = "B668B2628BE74ED4A25BE4046E162330" + serial_number = "12B53B6E42654E01B98C77C347CE216E" name = "Controller01" } diff --git a/examples/resources/sdwan_dns_security_policy_definition/resource.tf b/examples/resources/sdwan_dns_security_policy_definition/resource.tf index ebd741af..b90a3f5d 100644 --- a/examples/resources/sdwan_dns_security_policy_definition/resource.tf +++ b/examples/resources/sdwan_dns_security_policy_definition/resource.tf @@ -6,5 +6,5 @@ resource "sdwan_dns_security_policy_definition" "example" { match_all_vpn = true dnscrypt = true umbrella_dns_default = true - cisco_sig_credentials_feature_template_id = "839264db-3eac-441b-8e73-42b60bec9c7f" + cisco_sig_credentials_feature_template_id = "3ac6eef9-bd8f-458d-96a7-a932c90b1e75" } diff --git a/gen/definitions/generic/device.yaml b/gen/definitions/generic/device.yaml index 3e8db616..102b4860 100644 --- a/gen/definitions/generic/device.yaml +++ b/gen/definitions/generic/device.yaml @@ -10,7 +10,7 @@ attributes: tf_name: serial_number type: String description: Serial number for device. Could be board or virtual identifier - example: B668B2628BE74ED4A25BE4046E162330 + example: 12B53B6E42654E01B98C77C347CE216E query_param: true - model_name: host-name tf_name: name @@ -32,7 +32,7 @@ attributes: type: String description: Unique identifier for device id: true - example: 39dde6c7-3cc0-41ef-a591-5a40a92846a5 + example: cfbf9a9f-801a-4ba9-9d72-9f4e4e7ccdb9 - model_name: site-id tf_name: site_id type: String @@ -42,7 +42,7 @@ attributes: tf_name: serial_number type: String description: Serial number for device. Could be board or virtual identifier - example: B668B2628BE74ED4A25BE4046E162330 + example: 12B53B6E42654E01B98C77C347CE216E - model_name: host-name tf_name: hostname type: String diff --git a/gen/definitions/generic/dns_security_policy_definition.yaml b/gen/definitions/generic/dns_security_policy_definition.yaml index 99389e1d..e3d9ea17 100644 --- a/gen/definitions/generic/dns_security_policy_definition.yaml +++ b/gen/definitions/generic/dns_security_policy_definition.yaml @@ -103,7 +103,7 @@ attributes: id: true mandatory: true description: Credentials feature template ID - example: "839264db-3eac-441b-8e73-42b60bec9c7f" + example: "3ac6eef9-bd8f-458d-96a7-a932c90b1e75" - tf_name: cisco_sig_credentials_feature_template_version tf_only: true type: Version diff --git a/gen/definitions/generic/vedge_inventory.yaml b/gen/definitions/generic/vedge_inventory.yaml index 8b4971c3..938faa6f 100644 --- a/gen/definitions/generic/vedge_inventory.yaml +++ b/gen/definitions/generic/vedge_inventory.yaml @@ -16,23 +16,23 @@ attributes: type: String description: Chassis Number id: true - example: C8K-E94D7B88-4B9E-3323-C6C3-F29079FAAC3B + example: C8K-40C0CCFD-9EA8-2B2E-E73B-32C5924EC79B - model_name: site-id tf_name: site_id type: String description: Site id for respective device - example: 2102 + example: 1 exclude_test: true - model_name: serialNumber tf_name: serial_number type: String description: Serial number for device. Could be board or virtual identifier - example: B3E32500 + example: 52FD47D8 - model_name: host-name tf_name: hostname type: String description: Hostname for respective device - example: SITE2102-C8KV-01 + example: Edge1 exclude_test: true - model_name: validity type: String diff --git a/internal/provider/data_source_sdwan_device_test.go b/internal/provider/data_source_sdwan_device_test.go index cad738ef..8a3d3aca 100644 --- a/internal/provider/data_source_sdwan_device_test.go +++ b/internal/provider/data_source_sdwan_device_test.go @@ -34,9 +34,9 @@ func TestAccDataSourceSdwanDevice(t *testing.T) { } var checks []resource.TestCheckFunc checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_device.test", "devices.0.device_id", "100.0.0.101")) - checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_device.test", "devices.0.uuid", "39dde6c7-3cc0-41ef-a591-5a40a92846a5")) + checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_device.test", "devices.0.uuid", "cfbf9a9f-801a-4ba9-9d72-9f4e4e7ccdb9")) checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_device.test", "devices.0.site_id", "100")) - checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_device.test", "devices.0.serial_number", "B668B2628BE74ED4A25BE4046E162330")) + checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_device.test", "devices.0.serial_number", "12B53B6E42654E01B98C77C347CE216E")) checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_device.test", "devices.0.hostname", "Controller01")) checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_device.test", "devices.0.reachability", "reachable")) checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_device.test", "devices.0.status", "normal")) @@ -64,7 +64,7 @@ func testAccDataSourceSdwanDeviceConfig() string { config += ` data "sdwan_device" "test" { - serial_number = "B668B2628BE74ED4A25BE4046E162330" + serial_number = "12B53B6E42654E01B98C77C347CE216E" name = "Controller01" } ` diff --git a/internal/provider/data_source_sdwan_dns_security_policy_definition_test.go b/internal/provider/data_source_sdwan_dns_security_policy_definition_test.go index 151733c0..19b8ffc5 100644 --- a/internal/provider/data_source_sdwan_dns_security_policy_definition_test.go +++ b/internal/provider/data_source_sdwan_dns_security_policy_definition_test.go @@ -39,7 +39,7 @@ func TestAccDataSourceSdwanDNSSecurityPolicyDefinition(t *testing.T) { checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_dns_security_policy_definition.test", "match_all_vpn", "true")) checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_dns_security_policy_definition.test", "dnscrypt", "true")) checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_dns_security_policy_definition.test", "umbrella_dns_default", "true")) - checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_dns_security_policy_definition.test", "cisco_sig_credentials_feature_template_id", "839264db-3eac-441b-8e73-42b60bec9c7f")) + checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_dns_security_policy_definition.test", "cisco_sig_credentials_feature_template_id", "3ac6eef9-bd8f-458d-96a7-a932c90b1e75")) resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, ProtoV6ProviderFactories: testAccProtoV6ProviderFactories, @@ -80,7 +80,7 @@ func testAccDataSourceSdwanDNSSecurityPolicyDefinitionConfig() string { config += ` match_all_vpn = true` + "\n" config += ` dnscrypt = true` + "\n" config += ` umbrella_dns_default = true` + "\n" - config += ` cisco_sig_credentials_feature_template_id = "839264db-3eac-441b-8e73-42b60bec9c7f"` + "\n" + config += ` cisco_sig_credentials_feature_template_id = "3ac6eef9-bd8f-458d-96a7-a932c90b1e75"` + "\n" config += `}` + "\n" config += ` diff --git a/internal/provider/data_source_sdwan_vedge_inventory_test.go b/internal/provider/data_source_sdwan_vedge_inventory_test.go index ba41c6b4..3f74699e 100644 --- a/internal/provider/data_source_sdwan_vedge_inventory_test.go +++ b/internal/provider/data_source_sdwan_vedge_inventory_test.go @@ -33,8 +33,8 @@ func TestAccDataSourceSdwanVEdgeInventory(t *testing.T) { t.Skip("skipping test, set environment variable SDWAN_209") } var checks []resource.TestCheckFunc - checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_vedge_inventory.test", "devices.0.chassis_number", "C8K-E94D7B88-4B9E-3323-C6C3-F29079FAAC3B")) - checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_vedge_inventory.test", "devices.0.serial_number", "B3E32500")) + checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_vedge_inventory.test", "devices.0.chassis_number", "C8K-40C0CCFD-9EA8-2B2E-E73B-32C5924EC79B")) + checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_vedge_inventory.test", "devices.0.serial_number", "52FD47D8")) checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_vedge_inventory.test", "devices.0.device_type", "vedge")) resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, diff --git a/internal/provider/resource_sdwan_dns_security_policy_definition_test.go b/internal/provider/resource_sdwan_dns_security_policy_definition_test.go index e9e6d638..97ba1f00 100644 --- a/internal/provider/resource_sdwan_dns_security_policy_definition_test.go +++ b/internal/provider/resource_sdwan_dns_security_policy_definition_test.go @@ -39,7 +39,7 @@ func TestAccSdwanDNSSecurityPolicyDefinition(t *testing.T) { checks = append(checks, resource.TestCheckResourceAttr("sdwan_dns_security_policy_definition.test", "match_all_vpn", "true")) checks = append(checks, resource.TestCheckResourceAttr("sdwan_dns_security_policy_definition.test", "dnscrypt", "true")) checks = append(checks, resource.TestCheckResourceAttr("sdwan_dns_security_policy_definition.test", "umbrella_dns_default", "true")) - checks = append(checks, resource.TestCheckResourceAttr("sdwan_dns_security_policy_definition.test", "cisco_sig_credentials_feature_template_id", "839264db-3eac-441b-8e73-42b60bec9c7f")) + checks = append(checks, resource.TestCheckResourceAttr("sdwan_dns_security_policy_definition.test", "cisco_sig_credentials_feature_template_id", "3ac6eef9-bd8f-458d-96a7-a932c90b1e75")) resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, ProtoV6ProviderFactories: testAccProtoV6ProviderFactories, @@ -79,7 +79,7 @@ func testAccSdwanDNSSecurityPolicyDefinitionConfig_all() string { config += ` match_all_vpn = true` + "\n" config += ` dnscrypt = true` + "\n" config += ` umbrella_dns_default = true` + "\n" - config += ` cisco_sig_credentials_feature_template_id = "839264db-3eac-441b-8e73-42b60bec9c7f"` + "\n" + config += ` cisco_sig_credentials_feature_template_id = "3ac6eef9-bd8f-458d-96a7-a932c90b1e75"` + "\n" config += `}` + "\n" return config } From acf71c6a88c7b177d8ea3c3bc52ecb69129a7eac Mon Sep 17 00:00:00 2001 From: danischm Date: Wed, 17 Jul 2024 00:49:09 +0200 Subject: [PATCH 14/14] 0.3.13 version bump --- CHANGELOG.md | 2 +- docs/guides/changelog.md | 2 +- templates/guides/changelog.md.tmpl | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 851d435e..06ddc186 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -## 0.3.13 (unreleased) +## 0.3.13 - Add workaround for issue when concurrently deleting security policy objects where the reference count is not updated - BREAKING CHANGE: Remove default value of `failure_mode` attribute of `sdwan_security_policy` resource diff --git a/docs/guides/changelog.md b/docs/guides/changelog.md index 7f3b00bf..776fbd5a 100644 --- a/docs/guides/changelog.md +++ b/docs/guides/changelog.md @@ -7,7 +7,7 @@ description: |- # Changelog -## 0.3.13 (unreleased) +## 0.3.13 - Add workaround for issue when concurrently deleting security policy objects where the reference count is not updated - BREAKING CHANGE: Remove default value of `failure_mode` attribute of `sdwan_security_policy` resource diff --git a/templates/guides/changelog.md.tmpl b/templates/guides/changelog.md.tmpl index 7f3b00bf..776fbd5a 100644 --- a/templates/guides/changelog.md.tmpl +++ b/templates/guides/changelog.md.tmpl @@ -7,7 +7,7 @@ description: |- # Changelog -## 0.3.13 (unreleased) +## 0.3.13 - Add workaround for issue when concurrently deleting security policy objects where the reference count is not updated - BREAKING CHANGE: Remove default value of `failure_mode` attribute of `sdwan_security_policy` resource