From 5df1da59f75e4e1054d3dcabe3f34f6f701d94bd Mon Sep 17 00:00:00 2001 From: William Guilherme Date: Mon, 18 Nov 2024 08:43:28 -0800 Subject: [PATCH] fix: Added new DLP Web Rule FileTypes (#380) * fix: Added new DLP Web Rule FileTypes * fix: Upgraded codecov from v4 to v5 --- .github/workflows/zia-test.yml | 4 +- CHANGELOG.md | 11 +++ GNUmakefile | 6 +- docs/guides/release-notes.md | 13 ++- docs/resources/zia_dlp_web_rules.md | 56 ++++++++++++ go.mod | 38 ++++---- go.sum | 79 ++++++++-------- zia/config.go | 2 + zia/data_source_zia_url_categories.go | 2 +- zia/provider.go | 90 ++++++++++--------- zia/provider_sweeper_test.go | 2 +- zia/resource_zia_admin_users_test.go | 12 +-- zia/resource_zia_auth_settings_urls.go | 8 +- ...x_behavioral_analysis_advanced_settings.go | 8 +- zia/resource_zia_security_policy_settings.go | 8 +- zia/resource_zia_url_categories.go | 2 +- ...resource_zia_user_management_users_test.go | 8 +- zia/validator.go | 21 ++++- 18 files changed, 235 insertions(+), 135 deletions(-) diff --git a/.github/workflows/zia-test.yml b/.github/workflows/zia-test.yml index eee5159f..81fa99cf 100644 --- a/.github/workflows/zia-test.yml +++ b/.github/workflows/zia-test.yml @@ -291,8 +291,8 @@ jobs: ZIA_ACC_TEST_FORCE_SWEEPERS: ${{ secrets.ZIA_ACC_TEST_FORCE_SWEEPERS }} - name: Publish test coverage - uses: codecov/codecov-action@v4 + uses: codecov/codecov-action@v5 with: token: ${{ secrets.CODECOV_TOKEN }} - file: ./coverage.out + files: ./coverage.out fail_ci_if_error: true diff --git a/CHANGELOG.md b/CHANGELOG.md index e11a83b3..fd53f08f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,16 @@ # Changelog +## 3.0.7 (November, 17 2024) + +### Notes + +- Release date: **(November, 17 2024)** +- Supported Terraform version: **v1.x** + +### Internal Fixes + +- [PR #374](https://github.com/zscaler/terraform-provider-zia/pull/374) - Added new `file_types` supported values in the `zia_dlp_web_rules` resource. See the [zia_dlp_web_rules](https://registry.terraform.io/providers/zscaler/zia/latest/docs/resources/zia_dlp_web_rules) documentation. + ## 3.0.6 (October, 8 2024) ### Notes diff --git a/GNUmakefile b/GNUmakefile index 3e2d5100..fa49a11b 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -196,14 +196,14 @@ test\:integration\:zscalertwo: build13: GOOS=$(shell go env GOOS) build13: GOARCH=$(shell go env GOARCH) ifeq ($(OS),Windows_NT) # is Windows_NT on XP, 2000, 7, Vista, 10... -build13: DESTINATION=$(APPDATA)/terraform.d/plugins/$(ZIA_PROVIDER_NAMESPACE)/3.0.6/$(GOOS)_$(GOARCH) +build13: DESTINATION=$(APPDATA)/terraform.d/plugins/$(ZIA_PROVIDER_NAMESPACE)/3.0.7/$(GOOS)_$(GOARCH) else -build13: DESTINATION=$(HOME)/.terraform.d/plugins/$(ZIA_PROVIDER_NAMESPACE)/3.0.6/$(GOOS)_$(GOARCH) +build13: DESTINATION=$(HOME)/.terraform.d/plugins/$(ZIA_PROVIDER_NAMESPACE)/3.0.7/$(GOOS)_$(GOARCH) endif build13: fmtcheck @echo "==> Installing plugin to $(DESTINATION)" @mkdir -p $(DESTINATION) - go build -o $(DESTINATION)/terraform-provider-zia_v3.0.6 + go build -o $(DESTINATION)/terraform-provider-zia_v3.0.7 coverage: test @echo "✓ Opening coverage for unit tests ..." diff --git a/docs/guides/release-notes.md b/docs/guides/release-notes.md index f9c2c778..7ed71e19 100644 --- a/docs/guides/release-notes.md +++ b/docs/guides/release-notes.md @@ -12,10 +12,21 @@ description: |- Track all ZIA Terraform provider's releases. New resources, features, and bug fixes will be tracked here. --- -``Last updated: v3.0.6`` +``Last updated: v3.0.7`` --- +## 3.0.7 (November, 17 2024) + +### Notes + +- Release date: **(November, 17 2024)** +- Supported Terraform version: **v1.x** + +### Internal Fixes + +- [PR #374](https://github.com/zscaler/terraform-provider-zia/pull/374) - Added new `file_types` supported values in the `zia_dlp_web_rules` resource. See the [zia_dlp_web_rules](https://registry.terraform.io/providers/zscaler/zia/latest/docs/resources/zia_dlp_web_rules) documentation. + ## 3.0.6 (October, 8 2024) ### Notes diff --git a/docs/resources/zia_dlp_web_rules.md b/docs/resources/zia_dlp_web_rules.md index 7c1f1ec1..5887c74c 100644 --- a/docs/resources/zia_dlp_web_rules.md +++ b/docs/resources/zia_dlp_web_rules.md @@ -250,6 +250,62 @@ The following arguments are supported: * `id` - (Optional) A unique identifier assigned to the workload group * `name` - (Optional) The name of the workload group +| Inspection Type | File Types | +|:------------------------------------------|:--------------------------------------------------------------| +|--------------------------------|-------------------------------------------------------| +| | `FTCATEGORY_ENCRYPT`, `FTCATEGORY_P7Z`, | +| | `FTCATEGORY_BZIP2`, `FTCATEGORY_CAB`, | +| | `FTCATEGORY_FCL`, `FTCATEGORY_GZIP`, | +| `WITHOUT INSPECTION` | `FTCATEGORY_ISO`, `FTCATEGORY_LZH`, | +| | `FTCATEGORY_RAR`,`FTCATEGORY_STUFFIT`, | +| | `FTCATEGORY_TAR`, `FTCATEGORY_XZ`, | +| | `FTCATEGORY_ZIP`, `FTCATEGORY_SCZIP`, | +| | `FTCATEGORY_ZIPX` | +|--------------------------------|--------------------------------------------------------| +|--------------------------------|--------------------------------------------------------| +| | `FTCATEGORY_ACCDB`, `FTCATEGORY_APPLE_DOCUMENTS`, | +| | `FTCATEGORY_ASM`, `FTCATEGORY_AU3`, | +| | `FTCATEGORY_BASH_SCRIPTS`, `FTCATEGORY_BASIC_SOURCE_CODE`, | +| | `FTCATEGORY_BCP`,`FTCATEGORY_BITMAP`, | +| | `FTCATEGORY_BORLAND_CPP_FILES`, `FTCATEGORY_C_FILES`, | +| | `FTCATEGORY_COBOL`,`FTCATEGORY_CSV`, | +| | `FTCATEGORY_CSX`,`FTCATEGORY_DAT`, | +| | `FTCATEGORY_DCM`, `FTCATEGORY_DELPHI`, | +| | `FTCATEGORY_F_FILES`,`FTCATEGORY_FOR`, | +| | `FTCATEGORY_FORM_DATA_POST`, `FTCATEGORY_DSP`, | +| | `FTCATEGORY_EML_FILES`, `FTCATEGORY_GO_FILES`, | +| | `FTCATEGORY_HTTP`,`FTCATEGORY_IFC`, | +| | `FTCATEGORY_INCLUDE_FILES`,`FTCATEGORY_INF`, | +| | `FTCATEGORY_JAVA_FILES`,`FTCATEGORY_JPEG`, | +| | `FTCATEGORY_JSON`,`FTCATEGORY_LOG_FILES`, | +| | `FTCATEGORY_MAKE_FILES`, `FTCATEGORY_MATLAB_FILES`, | +| | `FTCATEGORY_MS_EXCEL`,`FTCATEGORY_MS_MDB`, | +| | `FTCATEGORY_MS_MSG`,`FTCATEGORY_MS_POWERPOINT`, | +| `WITH INSPECTION` | `FTCATEGORY_MS_PUB`,`FTCATEGORY_MS_RTF`, | +| | `FTCATEGORY_MS_WORD`,`FTCATEGORY_MSC`, | +| | `FTCATEGORY_NATVIS`,`FTCATEGORY_OLM`, | +| | `FTCATEGORY_OPEN_OFFICE_PRESENTATIONS`, | +| | `FTCATEGORY_OPEN_OFFICE_SPREADSHEETS`, | +| | `FTCATEGORY_MS_CPP_FILES`, `FTCATEGORY_PDF_DOCUMENT`, | +| | `FTCATEGORY_PERL_FILES`,`FTCATEGORY_PNG`, | +| | `FTCATEGORY_POD`,`FTCATEGORY_POWERSHELL`, | +| | `FTCATEGORY_PYTHON`, `FTCATEGORY_RES_FILES`, | +| | `FTCATEGORY_RPY`,`FTCATEGORY_RSP`, | +| | `FTCATEGORY_RUBY_FILES`,`FTCATEGORY_SAS`, | +| | `FTCATEGORY_SC`,`FTCATEGORY_SCALA`, | +| | `FTCATEGORY_SCT`,`FTCATEGORY_SHELL_SCRAP`, | +| | `FTCATEGORY_SQL`,`FTCATEGORY_TABLEAU_FILES`, | +| | `FTCATEGORY_TIFF`, `FTCATEGORY_TLH` | +| | `FTCATEGORY_TLI`,`FTCATEGORY_TXT`, | +| | `FTCATEGORY_UNK_TXT`,`FTCATEGORY_XAML` | +| | `FTCATEGORY_VISUAL_BASIC_SCRIPT`, | +| | `FTCATEGORY_VISUAL_CPP_FILES`,`FTCATEGORY_VSDX`, | +| | `FTCATEGORY_X1B`,`FTCATEGORY_VISUAL_BASIC_FILES`, | +| | `FTCATEGORY_XML`, `FTCATEGORY_YAML_FILES`, | +| | `FTCATEGORY_JAVA_APPLET`,`FTCATEGORY_JAVASCRIPT` | +| | `FTCATEGORY_WINDOWS_SCRIPT_FILES` | +|------------------------------|----------------------------------------------------------| + ## Import Zscaler offers a dedicated tool called Zscaler-Terraformer to allow the automated import of ZIA configurations into Terraform-compliant HashiCorp Configuration Language. diff --git a/go.mod b/go.mod index 856181af..e05b4a4b 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/zscaler/terraform-provider-zia/v3 -go 1.22 +go 1.22.0 toolchain go1.23.1 @@ -10,8 +10,8 @@ require ( github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 github.com/hashicorp/go-hclog v1.6.3 github.com/hashicorp/terraform-plugin-sdk v1.17.2 - github.com/hashicorp/terraform-plugin-sdk/v2 v2.34.0 - github.com/zscaler/zscaler-sdk-go/v2 v2.72.5 + github.com/hashicorp/terraform-plugin-sdk/v2 v2.35.0 + github.com/zscaler/zscaler-sdk-go/v2 v2.74.0 ) require ( @@ -29,16 +29,16 @@ require ( github.com/hashicorp/go-checkpoint v0.5.0 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect github.com/hashicorp/go-multierror v1.1.1 // indirect - github.com/hashicorp/go-plugin v1.6.0 // indirect + github.com/hashicorp/go-plugin v1.6.2 // indirect github.com/hashicorp/go-retryablehttp v0.7.7 // indirect github.com/hashicorp/go-uuid v1.0.3 // indirect - github.com/hashicorp/go-version v1.6.0 // indirect - github.com/hashicorp/hc-install v0.6.4 // indirect - github.com/hashicorp/hcl/v2 v2.20.1 // indirect + github.com/hashicorp/go-version v1.7.0 // indirect + github.com/hashicorp/hc-install v0.9.0 // indirect + github.com/hashicorp/hcl/v2 v2.22.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-go v0.23.0 // indirect + github.com/hashicorp/terraform-json v0.23.0 // indirect + github.com/hashicorp/terraform-plugin-go v0.25.0 // indirect github.com/hashicorp/terraform-plugin-log v0.9.0 // indirect github.com/hashicorp/terraform-registry-address v0.2.3 // indirect github.com/hashicorp/terraform-svchost v0.1.1 // indirect @@ -54,16 +54,16 @@ require ( github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect - github.com/zclconf/go-cty v1.14.4 // indirect - golang.org/x/crypto v0.24.0 // indirect - golang.org/x/mod v0.18.0 // indirect - golang.org/x/net v0.26.0 // indirect - golang.org/x/sync v0.8.0 // indirect - golang.org/x/sys v0.21.0 // indirect - golang.org/x/text v0.19.0 // indirect + github.com/zclconf/go-cty v1.15.0 // indirect + golang.org/x/crypto v0.28.0 // indirect + golang.org/x/mod v0.21.0 // indirect + golang.org/x/net v0.28.0 // indirect + golang.org/x/sync v0.9.0 // indirect + golang.org/x/sys v0.26.0 // indirect + golang.org/x/text v0.20.0 // indirect golang.org/x/tools v0.22.0 // indirect google.golang.org/appengine v1.6.8 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de // indirect - google.golang.org/grpc v1.63.2 // indirect - google.golang.org/protobuf v1.34.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 // indirect + google.golang.org/grpc v1.67.1 // indirect + google.golang.org/protobuf v1.35.1 // indirect ) diff --git a/go.sum b/go.sum index d6c7794e..135c01f9 100644 --- a/go.sum +++ b/go.sum @@ -202,8 +202,8 @@ github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHh github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= github.com/hashicorp/go-plugin v1.3.0/go.mod h1:F9eH4LrE/ZsRdbwhfjs9k9HoDUwAHnYtXdgmf1AVNs0= -github.com/hashicorp/go-plugin v1.6.0 h1:wgd4KxHJTVGGqWBq4QPB1i5BZNEx9BR8+OFmHDmTk8A= -github.com/hashicorp/go-plugin v1.6.0/go.mod h1:lBS5MtSSBZk0SHc66KACcjjlU6WzEVP/8pwz68aMkCI= +github.com/hashicorp/go-plugin v1.6.2 h1:zdGAEd0V1lCaU0u+MxWQhtSDQmahpkwOun8U8EiRVog= +github.com/hashicorp/go-plugin v1.6.2/go.mod h1:CkgLQ5CZqNmdL9U9JzM532t8ZiYQ35+pj3b1FD37R0Q= github.com/hashicorp/go-retryablehttp v0.7.7 h1:C8hUCYzor8PIfXHa4UrZkU4VvK8o9ISHxT2Q8+VepXU= github.com/hashicorp/go-retryablehttp v0.7.7/go.mod h1:pkQpWZeYWskR+D1tR2O5OcBFOxfA7DoAO6xtkuQnHTk= github.com/hashicorp/go-safetemp v1.0.0/go.mod h1:oaerMy3BhqiTbVye6QuFhFtIceqFoDHxNAB65b+Rj1I= @@ -214,17 +214,17 @@ github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/b github.com/hashicorp/go-version v1.1.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.3.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= -github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/go-version v1.7.0 h1:5tqGy27NaOTB8yJKUZELlFAS/LTKJkrmONwQKeRZfjY= +github.com/hashicorp/go-version v1.7.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/hc-install v0.6.4 h1:QLqlM56/+SIIGvGcfFiwMY3z5WGXT066suo/v9Km8e0= -github.com/hashicorp/hc-install v0.6.4/go.mod h1:05LWLy8TD842OtgcfBbOT0WMoInBMUSHjmDx10zuBIA= +github.com/hashicorp/hc-install v0.9.0 h1:2dIk8LcvANwtv3QZLckxcjyF5w8KVtiMxu6G6eLhghE= +github.com/hashicorp/hc-install v0.9.0/go.mod h1:+6vOP+mf3tuGgMApVYtmsnDoKWMDcFXeTxCACYZ8SFg= github.com/hashicorp/hcl v0.0.0-20170504190234-a4b07c25de5f/go.mod h1:oZtUIOe8dh44I2q6ScRibXws4Ajl+d+nod3AaR9vL5w= github.com/hashicorp/hcl/v2 v2.0.0/go.mod h1:oVVDG71tEinNGYCxinCYadcmKU9bglqW9pV3txagJ90= github.com/hashicorp/hcl/v2 v2.8.2/go.mod h1:bQTN5mpo+jewjJgh8jr0JUguIi7qPHUF6yIfAEN3jqY= -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.22.0 h1:hkZ3nCtqeJsDhPRFz5EA9iwcG1hNWGePOTw6oyul12M= +github.com/hashicorp/hcl/v2 v2.22.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-config-inspect v0.0.0-20191212124732-c6ae6269b9d7/go.mod h1:p+ivJws3dpqbp1iP84+npOyAmTTOLMgCzrXd3GSdn/A= @@ -232,16 +232,16 @@ github.com/hashicorp/terraform-exec v0.13.3/go.mod h1:SSg6lbUsVB3DmFyCPjBPklqf6E github.com/hashicorp/terraform-exec v0.21.0 h1:uNkLAe95ey5Uux6KJdua6+cv8asgILFVWkd/RG0D2XQ= github.com/hashicorp/terraform-exec v0.21.0/go.mod h1:1PPeMYou+KDUSSeRE9szMZ/oHf4fYUmB923Wzbq1ICg= github.com/hashicorp/terraform-json v0.10.0/go.mod h1:3defM4kkMfttwiE7VakJDwCd4R+umhSQnvJwORXbprE= -github.com/hashicorp/terraform-json v0.22.1 h1:xft84GZR0QzjPVWs4lRUwvTcPnegqlyS7orfb5Ltvec= -github.com/hashicorp/terraform-json v0.22.1/go.mod h1:JbWSQCLFSXFFhg42T7l9iJwdGXBYV8fmmD6o/ML4p3A= -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-json v0.23.0 h1:sniCkExU4iKtTADReHzACkk8fnpQXrdD2xoR+lppBkI= +github.com/hashicorp/terraform-json v0.23.0/go.mod h1:MHdXbBAbSg0GvzuWazEGKAn/cyNfIB7mN6y7KJN6y2c= +github.com/hashicorp/terraform-plugin-go v0.25.0 h1:oi13cx7xXA6QciMcpcFi/rwA974rdTxjqEhXJjbAyks= +github.com/hashicorp/terraform-plugin-go v0.25.0/go.mod h1:+SYagMYadJP86Kvn+TGeV+ofr/R3g4/If0O5sO96MVw= 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 v1.17.2 h1:V7DUR3yBWFrVB9z3ddpY7kiYVSsq4NYR67NiTs93NQo= github.com/hashicorp/terraform-plugin-sdk v1.17.2/go.mod h1:wkvldbraEMkz23NxkkAsFS88A1R9eUiooiaUZyS6TLw= -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-sdk/v2 v2.35.0 h1:wyKCCtn6pBBL46c1uIIBNUOWlNfYXfXpVo16iDyLp8Y= +github.com/hashicorp/terraform-plugin-sdk/v2 v2.35.0/go.mod h1:B0Al8NyYVr8Mp/KLwssKXG1RqnTk7FySqSn4fRuLNgw= github.com/hashicorp/terraform-plugin-test/v2 v2.2.1/go.mod h1:eZ9JL3O69Cb71Skn6OhHyj17sLmHRb+H6VrDcJjKrYU= 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= @@ -383,13 +383,14 @@ github.com/zclconf/go-cty v1.1.0/go.mod h1:xnAOWiHeOqg2nWS62VtQ7pbOu17FtxJNW8RLE github.com/zclconf/go-cty v1.2.0/go.mod h1:hOPWgoHbaTUnI5k4D2ld+GRpFJSCe6bCM7m1q/N4PQ8= github.com/zclconf/go-cty v1.2.1/go.mod h1:hOPWgoHbaTUnI5k4D2ld+GRpFJSCe6bCM7m1q/N4PQ8= github.com/zclconf/go-cty v1.8.2/go.mod h1:vVKLxnk3puL4qRAv72AO+W99LUD4da90g3uUAzyuvAk= -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 v1.15.0 h1:tTCRWxsexYUmtt/wVxgDClUe+uQusuI443uL6e+5sXQ= +github.com/zclconf/go-cty v1.15.0/go.mod h1:VvMs5i0vgZdhYawQNq5kePSpLAoz8u1xvZgrPIxfnZE= 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= github.com/zclconf/go-cty-yaml v1.0.2/go.mod h1:IP3Ylp0wQpYm50IHK8OZWKMu6sPJIUgKa8XhiVHura0= -github.com/zscaler/zscaler-sdk-go/v2 v2.72.5 h1:IL9eFbcvDEoS6x17ipy/kThgubdiknIeXtA37hn7SQY= -github.com/zscaler/zscaler-sdk-go/v2 v2.72.5/go.mod h1:ugDudbyESUrANGw74moJypgVnWuOyLm8NyIJgfUzNNo= +github.com/zscaler/zscaler-sdk-go/v2 v2.74.0 h1:MZnjwd9HZAAQKVCleELpLtivg6kv3zYn6aeL7brsIaM= +github.com/zscaler/zscaler-sdk-go/v2 v2.74.0/go.mod h1:cQYqolpWfqlfAj+krvC7St85O7UTlpWW4fVf3V5xKDU= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= @@ -405,8 +406,8 @@ golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -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.28.0 h1:GBDwsMXVQi34v5CCYUm2jkJvu4cbtru2U4TN2PSyQnw= +golang.org/x/crypto v0.28.0/go.mod h1:rmgy+3RHxRZMyY0jjAJShp2zgEdOqj2AO7U0pYmeQ7U= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -438,8 +439,8 @@ golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzB golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= 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.21.0 h1:vvrHzRwRfVKSiLrG+d4FMl/Qi4ukBCE6kZlTUkDYRT0= +golang.org/x/mod v0.21.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= golang.org/x/net v0.0.0-20180530234432-1e491301e022/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180811021610-c39426892332/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -474,8 +475,8 @@ golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwY golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210326060303-6b1517762897/go.mod h1:uSPa2vr4CLtc/ILN5odXGNXS6mhrKVzTaCXzk9m6W3k= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -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.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE= +golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -492,8 +493,8 @@ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= -golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.9.0 h1:fEo0HyrW1GIgZdpbhCRO0PkJajUS5H9IFUztCgEo2jQ= +golang.org/x/sync v0.9.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -537,12 +538,12 @@ golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/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.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo= +golang.org/x/sys v0.26.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.21.0 h1:WVXCp+/EBEHOj53Rvu+7KiT/iElMrO8ACK16SMZ3jaA= -golang.org/x/term v0.21.0/go.mod h1:ooXLefLobQVslOqselCNF4SxFAaoS6KujMbsGzSDmX0= +golang.org/x/term v0.25.0 h1:WtHI/ltw4NvSUig5KARz9h521QvRC8RmF/cuYqifU24= +golang.org/x/term v0.25.0/go.mod h1:RPyXicDX+6vLxogjjRxjgD2TKtmAO6NZBsBRfrOLu7M= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -551,8 +552,8 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= -golang.org/x/text v0.19.0 h1:kTxAhCbGbxhK0IwgSKiMO5awPoDQ0RpfiVYBfK860YM= -golang.org/x/text v0.19.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= +golang.org/x/text v0.20.0 h1:gK/Kv2otX8gz+wn7Rmb3vT96ZwuoxnQlY+HlJVj7Qug= +golang.org/x/text v0.20.0/go.mod h1:D4IsuqiFMhST5bX19pQ9ikHC2GsaKyk/oF+pn3ducp4= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -661,8 +662,8 @@ google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de h1:cZGRis4/ot9uVm639a+rHCUaG0JJHEsdyzSQTMX+suY= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:H4O17MA/PE9BsGx3w+a+W2VOLLD1Qf7oJneAoU6WktY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 h1:e7S5W7MGGLaSu8j3YjdezkZ+m1/Nm0uRVRMEMGk26Xs= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= google.golang.org/grpc v1.8.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= @@ -678,8 +679,8 @@ google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.32.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= -google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= +google.golang.org/grpc v1.67.1 h1:zWnc1Vrcno+lHZCOofnIMvycFcc0QRGIzm9dhnDX68E= +google.golang.org/grpc v1.67.1/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -692,8 +693,8 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.34.0 h1:Qo/qEd2RZPCf2nKuorzksSknv0d3ERwp1vFG38gSmH4= -google.golang.org/protobuf v1.34.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.35.1 h1:m3LfL6/Ca+fqnjnlqQXNpFPABW1UD7mjh8KO2mKFytA= +google.golang.org/protobuf v1.35.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/zia/config.go b/zia/config.go index 4915f31a..7c667ffb 100644 --- a/zia/config.go +++ b/zia/config.go @@ -55,6 +55,7 @@ type Client struct { dlp_incident_receiver_servers *services.Service dlp_notification_templates *services.Service dlp_web_rules *services.Service + pacfiles *services.Service rule_labels *services.Service security_policy_settings *services.Service user_authentication_settings *services.Service @@ -101,6 +102,7 @@ func (c *Config) Client() (*Client, error) { users: users.New(cli), groups: groups.New(cli), departments: departments.New(cli), + pacfiles: services.New(cli), virtualipaddress: services.New(cli), vpncredentials: services.New(cli), gretunnels: services.New(cli), diff --git a/zia/data_source_zia_url_categories.go b/zia/data_source_zia_url_categories.go index 2c1f1d51..e5b86ee8 100644 --- a/zia/data_source_zia_url_categories.go +++ b/zia/data_source_zia_url_categories.go @@ -214,7 +214,7 @@ func dataSourceURLCategoriesRead(d *schema.ResourceData, m interface{}) error { } // Set the data source fields with the response - d.SetId(fmt.Sprintf(resp.ID)) + d.SetId(resp.ID) _ = d.Set("configured_name", resp.ConfiguredName) _ = d.Set("keywords", resp.Keywords) _ = d.Set("keywords_retaining_parent_category", resp.KeywordsRetainingParentCategory) diff --git a/zia/provider.go b/zia/provider.go index 8e49c251..ab9f7ac4 100644 --- a/zia/provider.go +++ b/zia/provider.go @@ -76,16 +76,17 @@ func Provider() *schema.Provider { "zia_traffic_forwarding_static_ip": resourceTrafficForwardingStaticIP(), "zia_traffic_forwarding_vpn_credentials": resourceTrafficForwardingVPNCredentials(), "zia_forwarding_control_zpa_gateway": resourceForwardingControlZPAGateway(), - "zia_location_management": resourceLocationManagement(), - "zia_url_categories": resourceURLCategories(), - "zia_url_filtering_rules": resourceURLFilteringRules(), - "zia_user_management": resourceUserManagement(), - "zia_activation_status": resourceActivationStatus(), - "zia_rule_labels": resourceRuleLabels(), - "zia_auth_settings_urls": resourceAuthSettingsUrls(), - "zia_security_settings": resourceSecurityPolicySettings(), - "zia_sandbox_behavioral_analysis": resourceSandboxSettings(), - "zia_sandbox_file_submission": resourceSandboxSubmission(), + //"zia_pac_files": resourcePacFiles(), + "zia_location_management": resourceLocationManagement(), + "zia_url_categories": resourceURLCategories(), + "zia_url_filtering_rules": resourceURLFilteringRules(), + "zia_user_management": resourceUserManagement(), + "zia_activation_status": resourceActivationStatus(), + "zia_rule_labels": resourceRuleLabels(), + "zia_auth_settings_urls": resourceAuthSettingsUrls(), + "zia_security_settings": resourceSecurityPolicySettings(), + "zia_sandbox_behavioral_analysis": resourceSandboxSettings(), + "zia_sandbox_file_submission": resourceSandboxSubmission(), }, DataSourcesMap: map[string]*schema.Resource{ @@ -106,39 +107,40 @@ func Provider() *schema.Provider { "zia_firewall_filtering_destination_groups": dataSourceFWIPDestinationGroups(), "zia_firewall_filtering_time_window": dataSourceFWTimeWindow(), "zia_forwarding_control_rule": dataSourceForwardingControlRule(), - "zia_url_categories": dataSourceURLCategories(), - "zia_url_filtering_rules": dataSourceURLFilteringRules(), - "zia_traffic_forwarding_public_node_vips": dataSourceTrafficForwardingPublicNodeVIPs(), - "zia_traffic_forwarding_vpn_credentials": dataSourceTrafficForwardingVPNCredentials(), - "zia_traffic_forwarding_gre_vip_recommended_list": dataSourceTrafficForwardingGreVipRecommendedList(), - "zia_traffic_forwarding_static_ip": dataSourceTrafficForwardingStaticIP(), - "zia_traffic_forwarding_gre_tunnel": dataSourceTrafficForwardingGreTunnels(), - "zia_traffic_forwarding_gre_tunnel_info": dataSourceTrafficForwardingIPGreTunnelInfo(), - "zia_gre_internal_ip_range_list": dataSourceTrafficForwardingGreInternalIPRangeList(), - "zia_location_management": dataSourceLocationManagement(), - "zia_location_groups": dataSourceLocationGroup(), - "zia_location_lite": dataSourceLocationLite(), - "zia_dlp_dictionaries": dataSourceDLPDictionaries(), - "zia_dlp_dictionary_predefined_identifiers": dataSourceDLPDictionaryPredefinedIdentifiers(), - "zia_dlp_engines": dataSourceDLPEngines(), - "zia_dlp_icap_servers": dataSourceDLPICAPServers(), - "zia_dlp_edm_schema": dataSourceDLPEDMSchema(), - "zia_dlp_idm_profiles": dataSourceDLPIDMProfiles(), - "zia_dlp_idm_profile_lite": dataSourceDLPIDMProfileLite(), - "zia_dlp_incident_receiver_servers": dataSourceDLPIncidentReceiverServers(), - "zia_dlp_notification_templates": dataSourceDLPNotificationTemplates(), - "zia_dlp_web_rules": dataSourceDlpWebRules(), - "zia_device_groups": dataSourceDeviceGroups(), - "zia_devices": dataSourceDevices(), - "zia_rule_labels": dataSourceRuleLabels(), - "zia_activation_status": dataSourceActivationStatus(), - "zia_auth_settings_urls": dataSourceAuthSettingsUrls(), - "zia_security_settings": dataSourceSecurityPolicySettings(), - "zia_sandbox_behavioral_analysis": dataSourceSandboxSettings(), - "zia_sandbox_report": dataSourceSandboxReport(), - "zia_forwarding_control_zpa_gateway": dataSourceForwardingControlZPAGateway(), - "zia_cloud_browser_isolation_profile": dataSourceCBIProfile(), - "zia_workload_groups": dataSourceWorkloadGroup(), + // "zia_pac_files": dataSourcePacFiles(), + "zia_url_categories": dataSourceURLCategories(), + "zia_url_filtering_rules": dataSourceURLFilteringRules(), + "zia_traffic_forwarding_public_node_vips": dataSourceTrafficForwardingPublicNodeVIPs(), + "zia_traffic_forwarding_vpn_credentials": dataSourceTrafficForwardingVPNCredentials(), + "zia_traffic_forwarding_gre_vip_recommended_list": dataSourceTrafficForwardingGreVipRecommendedList(), + "zia_traffic_forwarding_static_ip": dataSourceTrafficForwardingStaticIP(), + "zia_traffic_forwarding_gre_tunnel": dataSourceTrafficForwardingGreTunnels(), + "zia_traffic_forwarding_gre_tunnel_info": dataSourceTrafficForwardingIPGreTunnelInfo(), + "zia_gre_internal_ip_range_list": dataSourceTrafficForwardingGreInternalIPRangeList(), + "zia_location_management": dataSourceLocationManagement(), + "zia_location_groups": dataSourceLocationGroup(), + "zia_location_lite": dataSourceLocationLite(), + "zia_dlp_dictionaries": dataSourceDLPDictionaries(), + "zia_dlp_dictionary_predefined_identifiers": dataSourceDLPDictionaryPredefinedIdentifiers(), + "zia_dlp_engines": dataSourceDLPEngines(), + "zia_dlp_icap_servers": dataSourceDLPICAPServers(), + "zia_dlp_edm_schema": dataSourceDLPEDMSchema(), + "zia_dlp_idm_profiles": dataSourceDLPIDMProfiles(), + "zia_dlp_idm_profile_lite": dataSourceDLPIDMProfileLite(), + "zia_dlp_incident_receiver_servers": dataSourceDLPIncidentReceiverServers(), + "zia_dlp_notification_templates": dataSourceDLPNotificationTemplates(), + "zia_dlp_web_rules": dataSourceDlpWebRules(), + "zia_device_groups": dataSourceDeviceGroups(), + "zia_devices": dataSourceDevices(), + "zia_rule_labels": dataSourceRuleLabels(), + "zia_activation_status": dataSourceActivationStatus(), + "zia_auth_settings_urls": dataSourceAuthSettingsUrls(), + "zia_security_settings": dataSourceSecurityPolicySettings(), + "zia_sandbox_behavioral_analysis": dataSourceSandboxSettings(), + "zia_sandbox_report": dataSourceSandboxReport(), + "zia_forwarding_control_zpa_gateway": dataSourceForwardingControlZPAGateway(), + "zia_cloud_browser_isolation_profile": dataSourceCBIProfile(), + "zia_workload_groups": dataSourceWorkloadGroup(), }, } p.ConfigureContextFunc = func(_ context.Context, d *schema.ResourceData) (interface{}, diag.Diagnostics) { @@ -188,6 +190,6 @@ func envDefaultFunc(k string) schema.SchemaDefaultFunc { } } -func resourceFuncNoOp(context.Context, *schema.ResourceData, interface{}) diag.Diagnostics { +func resourceFuncNoOp(*schema.ResourceData, interface{}) error { return nil } diff --git a/zia/provider_sweeper_test.go b/zia/provider_sweeper_test.go index 2506aaac..79e67d15 100644 --- a/zia/provider_sweeper_test.go +++ b/zia/provider_sweeper_test.go @@ -644,7 +644,7 @@ func sweepTestURLCategories(client *testClient) error { errorList = append(errorList, err) continue } - logSweptResource(resourcetype.URLCategories, fmt.Sprintf(b.ID), b.ConfiguredName) + logSweptResource(resourcetype.URLCategories, (b.ID), b.ConfiguredName) } } // Log errors encountered during the deletion process diff --git a/zia/resource_zia_admin_users_test.go b/zia/resource_zia_admin_users_test.go index b821766a..e27307c9 100644 --- a/zia/resource_zia_admin_users_test.go +++ b/zia/resource_zia_admin_users_test.go @@ -32,10 +32,10 @@ func TestAccResourceAdminUsersBasic(t *testing.T) { Config: testAccCheckAdminUsersConfigure(resourceTypeAndName, generatedName, rEmail, rPassword), Check: resource.ComposeTestCheckFunc( testAccCheckAdminUsersExists(resourceTypeAndName, &admins), - resource.TestCheckResourceAttr(resourceTypeAndName, "login_name", fmt.Sprintf(generatedName+"@bd-hashicorp.com")), - resource.TestCheckResourceAttr(resourceTypeAndName, "email", fmt.Sprintf(rEmail+"@bd-hashicorp.com")), + resource.TestCheckResourceAttr(resourceTypeAndName, "login_name", (generatedName+"@bd-hashicorp.com")), + resource.TestCheckResourceAttr(resourceTypeAndName, "email", (rEmail+"@bd-hashicorp.com")), resource.TestCheckResourceAttr(resourceTypeAndName, "username", variable.AdminUserName), - resource.TestCheckResourceAttr(resourceTypeAndName, "password", fmt.Sprintf(rPassword+"Super@Secret007")), + resource.TestCheckResourceAttr(resourceTypeAndName, "password", (rPassword+"Super@Secret007")), resource.TestCheckResourceAttr(resourceTypeAndName, "role.#", "1"), resource.TestCheckResourceAttr(resourceTypeAndName, "admin_scope_entities.#", "1"), ), @@ -46,10 +46,10 @@ func TestAccResourceAdminUsersBasic(t *testing.T) { Config: testAccCheckAdminUsersConfigure(resourceTypeAndName, generatedName, rEmail, rPasswordUpdate), Check: resource.ComposeTestCheckFunc( testAccCheckAdminUsersExists(resourceTypeAndName, &admins), - resource.TestCheckResourceAttr(resourceTypeAndName, "login_name", fmt.Sprintf(generatedName+"@bd-hashicorp.com")), - resource.TestCheckResourceAttr(resourceTypeAndName, "email", fmt.Sprintf(rEmail+"@bd-hashicorp.com")), + resource.TestCheckResourceAttr(resourceTypeAndName, "login_name", (generatedName+"@bd-hashicorp.com")), + resource.TestCheckResourceAttr(resourceTypeAndName, "email", (rEmail+"@bd-hashicorp.com")), resource.TestCheckResourceAttr(resourceTypeAndName, "username", variable.AdminUserName), - resource.TestCheckResourceAttr(resourceTypeAndName, "password", fmt.Sprintf(rPasswordUpdate+"Super@Secret007")), + resource.TestCheckResourceAttr(resourceTypeAndName, "password", (rPasswordUpdate+"Super@Secret007")), resource.TestCheckResourceAttr(resourceTypeAndName, "role.#", "1"), resource.TestCheckResourceAttr(resourceTypeAndName, "admin_scope_entities.#", "1"), ), diff --git a/zia/resource_zia_auth_settings_urls.go b/zia/resource_zia_auth_settings_urls.go index 80df55b7..fbb695e8 100644 --- a/zia/resource_zia_auth_settings_urls.go +++ b/zia/resource_zia_auth_settings_urls.go @@ -11,10 +11,10 @@ import ( func resourceAuthSettingsUrls() *schema.Resource { return &schema.Resource{ - Read: resourceAuthSettingsUrlsRead, - Create: resourceAuthSettingsUrlsCreate, - Update: resourceAuthSettingsUrlsUpdate, - DeleteContext: resourceFuncNoOp, + Read: resourceAuthSettingsUrlsRead, + Create: resourceAuthSettingsUrlsCreate, + Update: resourceAuthSettingsUrlsUpdate, + Delete: resourceFuncNoOp, Importer: &schema.ResourceImporter{ State: func(d *schema.ResourceData, m interface{}) ([]*schema.ResourceData, error) { zClient := m.(*Client) diff --git a/zia/resource_zia_sandbox_behavioral_analysis_advanced_settings.go b/zia/resource_zia_sandbox_behavioral_analysis_advanced_settings.go index fa94b1f6..6cb2aab8 100644 --- a/zia/resource_zia_sandbox_behavioral_analysis_advanced_settings.go +++ b/zia/resource_zia_sandbox_behavioral_analysis_advanced_settings.go @@ -13,10 +13,10 @@ import ( func resourceSandboxSettings() *schema.Resource { return &schema.Resource{ - Create: resourceSandboxSettingsCreate, - Read: resourceSandboxSettingsRead, - Update: resourceSandboxSettingsUpdate, - DeleteContext: resourceFuncNoOp, + Create: resourceSandboxSettingsCreate, + Read: resourceSandboxSettingsRead, + Update: resourceSandboxSettingsUpdate, + Delete: resourceFuncNoOp, Importer: &schema.ResourceImporter{ State: func(d *schema.ResourceData, m interface{}) ([]*schema.ResourceData, error) { zClient := m.(*Client) diff --git a/zia/resource_zia_security_policy_settings.go b/zia/resource_zia_security_policy_settings.go index ce989086..91db92f1 100644 --- a/zia/resource_zia_security_policy_settings.go +++ b/zia/resource_zia_security_policy_settings.go @@ -11,10 +11,10 @@ import ( func resourceSecurityPolicySettings() *schema.Resource { return &schema.Resource{ - Read: resourceSecurityPolicySettingsRead, - Create: resourceSecurityPolicySettingsCreate, - Update: resourceSecurityPolicySettingsUpdate, - DeleteContext: resourceFuncNoOp, + Read: resourceSecurityPolicySettingsRead, + Create: resourceSecurityPolicySettingsCreate, + Update: resourceSecurityPolicySettingsUpdate, + Delete: resourceFuncNoOp, Importer: &schema.ResourceImporter{ State: func(d *schema.ResourceData, m interface{}) ([]*schema.ResourceData, error) { zClient := m.(*Client) diff --git a/zia/resource_zia_url_categories.go b/zia/resource_zia_url_categories.go index a9d5a465..294059ed 100644 --- a/zia/resource_zia_url_categories.go +++ b/zia/resource_zia_url_categories.go @@ -254,7 +254,7 @@ func resourceURLCategoriesRead(d *schema.ResourceData, m interface{}) error { log.Printf("[INFO] Getting url category :\n%+v\n", resp) - d.SetId(fmt.Sprintf(resp.ID)) + d.SetId(resp.ID) _ = d.Set("category_id", resp.ID) _ = d.Set("configured_name", resp.ConfiguredName) _ = d.Set("keywords", resp.Keywords) diff --git a/zia/resource_zia_user_management_users_test.go b/zia/resource_zia_user_management_users_test.go index 3ecbcfed..66c56ef2 100644 --- a/zia/resource_zia_user_management_users_test.go +++ b/zia/resource_zia_user_management_users_test.go @@ -34,8 +34,8 @@ func TestAccResourceUserManagementBasic(t *testing.T) { Check: resource.ComposeTestCheckFunc( testAccCheckUserManagementExists(resourceTypeAndName, &users), resource.TestCheckResourceAttr(resourceTypeAndName, "name", name), - resource.TestCheckResourceAttr(resourceTypeAndName, "email", fmt.Sprintf(rEmail+"@bd-hashicorp.com")), - resource.TestCheckResourceAttr(resourceTypeAndName, "password", fmt.Sprintf(rPassword+"Super@Secret007")), + resource.TestCheckResourceAttr(resourceTypeAndName, "email", (rEmail+"@bd-hashicorp.com")), + resource.TestCheckResourceAttr(resourceTypeAndName, "password", (rPassword+"Super@Secret007")), resource.TestCheckResourceAttr(resourceTypeAndName, "comments", rComments), resource.TestCheckResourceAttr(resourceTypeAndName, "groups.#", "1"), resource.TestCheckResourceAttr(resourceTypeAndName, "department.#", "1"), @@ -48,8 +48,8 @@ func TestAccResourceUserManagementBasic(t *testing.T) { Check: resource.ComposeTestCheckFunc( testAccCheckUserManagementExists(resourceTypeAndName, &users), resource.TestCheckResourceAttr(resourceTypeAndName, "name", name), - resource.TestCheckResourceAttr(resourceTypeAndName, "email", fmt.Sprintf(rEmail+"@bd-hashicorp.com")), - resource.TestCheckResourceAttr(resourceTypeAndName, "password", fmt.Sprintf(rPasswordUpdate+"Super@Secret007")), + resource.TestCheckResourceAttr(resourceTypeAndName, "email", (rEmail+"@bd-hashicorp.com")), + resource.TestCheckResourceAttr(resourceTypeAndName, "password", (rPasswordUpdate+"Super@Secret007")), resource.TestCheckResourceAttr(resourceTypeAndName, "comments", rComments), resource.TestCheckResourceAttr(resourceTypeAndName, "groups.#", "1"), resource.TestCheckResourceAttr(resourceTypeAndName, "department.#", "1"), diff --git a/zia/validator.go b/zia/validator.go index df390d96..02efa96a 100644 --- a/zia/validator.go +++ b/zia/validator.go @@ -576,7 +576,7 @@ func validateDLPRuleFileTypes(dlp dlp_web_rules.WebDLPRules) error { "FORM_DATA_POST", "DB", "JAVASCRIPT", "FOR", "MS_POWERPOINT", "TMP", "MATLAB_FILES", "NATVIS", "PNG", "SC", "RUBY_FILES", "CAB", "PERL_FILES", "APPLE_DOCUMENTS", "CSX", "POSTSCRIPT", "ZIP", "CATALOG", "BITMAP", "SCZIP", "BORLAND_CPP_FILES", "RAR", "SQL", "APPX", "NETMON", "MS_RTF", "PARASOLID", "INF", "ACCDB", "IGS", "HIGH_EFFICIENCY_IMAGE_FILES", "RPY", - "OAB", "CER", "ENCRYPT", "MM", "DSP", "YAML_FILES", "CHEMDRAW_FILES", "HBS", "SCT", "PS2", "INI", "CERT", "SLDPRT", + "OAB", "CER", "FTCATEGORY_ENCRYPT", "ENCRYPT", "MM", "DSP", "YAML_FILES", "CHEMDRAW_FILES", "HBS", "SCT", "PS2", "INI", "CERT", "SLDPRT", "ICS", "MS_EXCEL", "MS_MSG", "QLIKVIEW_FILES", "MS_MDB", "VISUAL_BASIC_SCRIPT", "MAKE_FILES", "BCP", "MS_CPP_FILES", "AAC", "COMPILED_HTML_HELP", "DB2", "SDB", "MS_PST", "JAVA_APPLET", "ADE", "COBOL", "AUTOCAD", "VSDX", "MS_WORD", "CP", "BGI", "DAT", "DER", "ASM", "TAR", "BASH_SCRIPTS", "MUI", "PYTHON", "TLB", "HIVE", "KEY", "IMG", "GIF", "STL", "STUFFIT", @@ -585,7 +585,9 @@ func validateDLPRuleFileTypes(dlp dlp_web_rules.WebDLPRules) error { "EXP", "FCL", "BZIP2", "DMD", "P7Z", "PRT", "NCB", "X1B", "DRAWIO", "XAML", "CML", "ASHX", "PGP", "PS3", "ACIS", "VISUAL_BASIC_FILES", "TXT", "DRV", "NLS", "F_FILES", "P7B", "JPEG", "TLH", "CSV", "POD", "SAS", "WINDOWS_META_FORMAT", "RSP", "KDBX", "WINDOWS_SCRIPT_FILES", "SCALA", "ONENOTE", "CGR", "BASIC_SOURCE_CODE", "MSC", "POWERSHELL", "PEM", "INTEGRATED_CIRCUIT_FILES", "GO_FILES", "PDF_DOCUMENT", - "DBF", "JKS", "VDA", "RES_FILES", "A_FILE", "SHELL_SCRAP", "ALL_OUTBOUND", + "DBF", "JKS", "VDA", "RES_FILES", "A_FILE", "SHELL_SCRAP", "ALL_OUTBOUND", "FTCATEGORY_ENCRYPT", "FTCATEGORY_P7Z", "FTCATEGORY_BZIP2", + "FTCATEGORY_CAB", "FTCATEGORY_CPIO", "FTCATEGORY_FCL", "FTCATEGORY_GZIP", "FTCATEGORY_ISO", "FTCATEGORY_LZH", "FTCATEGORY_RAR", "FTCATEGORY_STUFFIT", + "FTCATEGORY_TAR", "FTCATEGORY_XZ", "FTCATEGORY_ZIP", "FTCATEGORY_SCZIP", "FTCATEGORY_ZIPX", } allowedFileTypesWithInspection := []string{ @@ -596,6 +598,21 @@ func validateDLPRuleFileTypes(dlp dlp_web_rules.WebDLPRules) error { "CSV", "POD", "SCT", "SAS", "RSP", "WINDOWS_SCRIPT_FILES", "SCALA", "MS_EXCEL", "MS_MSG", "MS_MDB", "BASIC_SOURCE_CODE", "MSC", "VISUAL_BASIC_SCRIPT", "POWERSHELL", "GO_FILES", "MAKE_FILES", "BCP", "PDF_DOCUMENT", "MS_CPP_FILES", "RES_FILES", "SHELL_SCRAP", "JAVA_APPLET", "COBOL", "VSDX", "MS_WORD", "DAT", "ASM", "ALL_OUTBOUND", + `FTCATEGORY_ACCDB`, `FTCATEGORY_APPLE_DOCUMENTS`, `FTCATEGORY_ASM`, `FTCATEGORY_AU3`, `FTCATEGORY_BASH_SCRIPTS`, + `FTCATEGORY_BASIC_SOURCE_CODE`, `FTCATEGORY_BCP`, `FTCATEGORY_BITMAP`, `FTCATEGORY_BORLAND_CPP_FILES`, `FTCATEGORY_C_FILES`, + `FTCATEGORY_COBOL`, `FTCATEGORY_CSV`, `FTCATEGORY_CSX`, `FTCATEGORY_DAT`, `FTCATEGORY_DCM`, `FTCATEGORY_DELPHI`, + `FTCATEGORY_DSP`, `FTCATEGORY_EML_FILES`, `FTCATEGORY_F_FILES`, `FTCATEGORY_FOR`, `FTCATEGORY_FORM_DATA_POST`, + `FTCATEGORY_GO_FILES`, `FTCATEGORY_HTTP`, `FTCATEGORY_IFC`, `FTCATEGORY_INCLUDE_FILES`, `FTCATEGORY_INF`, + `FTCATEGORY_JAVA_FILES`, `FTCATEGORY_JPEG`, `FTCATEGORY_JSON`, `FTCATEGORY_LOG_FILES`, `FTCATEGORY_MAKE_FILES`, + `FTCATEGORY_MATLAB_FILES`, `FTCATEGORY_MS_CPP_FILES`, `FTCATEGORY_MS_EXCEL`, `FTCATEGORY_MS_MDB`, `FTCATEGORY_MS_MSG`, + `FTCATEGORY_MS_POWERPOINT`, `FTCATEGORY_MS_PUB`, `FTCATEGORY_MS_RTF`, `FTCATEGORY_MS_WORD`, `FTCATEGORY_MSC`, `FTCATEGORY_NATVIS`, + `FTCATEGORY_OLM`, `FTCATEGORY_OPEN_OFFICE_PRESENTATIONS`, `FTCATEGORY_OPEN_OFFICE_SPREADSHEETS`, `FTCATEGORY_PDF_DOCUMENT`, + `FTCATEGORY_PERL_FILES`, `FTCATEGORY_PNG`, `FTCATEGORY_POD`, `FTCATEGORY_POWERSHELL`, `FTCATEGORY_PYTHON`, `FTCATEGORY_RES_FILES`, + `FTCATEGORY_RPY`, `FTCATEGORY_RSP`, `FTCATEGORY_RUBY_FILES`, `FTCATEGORY_SAS`, `FTCATEGORY_SC`, `FTCATEGORY_SCALA`, + `FTCATEGORY_SCT`, `FTCATEGORY_SHELL_SCRAP`, `FTCATEGORY_SQL`, `FTCATEGORY_TABLEAU_FILES`, `FTCATEGORY_TIFF`, `FTCATEGORY_TLH`, + `FTCATEGORY_TLI`, `FTCATEGORY_TXT`, `FTCATEGORY_UNK_TXT`, `FTCATEGORY_VISUAL_BASIC_FILES`, `FTCATEGORY_VISUAL_BASIC_SCRIPT`, + `FTCATEGORY_VISUAL_CPP_FILES`, `FTCATEGORY_VSDX`, `FTCATEGORY_WINDOWS_SCRIPT_FILES`, `FTCATEGORY_X1B`, `FTCATEGORY_XAML`, + `FTCATEGORY_XML`, `FTCATEGORY_YAML_FILES`, `FTCATEGORY_JAVA_APPLET`, `FTCATEGORY_JAVASCRIPT`, } // Check if `ALL_OUTBOUND` is selected and `withoutContentInspection` is false