Skip to content

Commit

Permalink
(fix): Implemented fix to zia_url_filtering_rules resource and accept…
Browse files Browse the repository at this point in the history
…ance tests (#322)

* (fix): Implemented fix to zia_url_filtering_rules resource and acceptance tests
  • Loading branch information
willguibr authored Feb 29, 2024
1 parent e857bab commit 276dded
Show file tree
Hide file tree
Showing 22 changed files with 165 additions and 406 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## 2.7.32 (February, 28 2024)

### Notes

- Release date: **(February, 28 2024)**
- Supported Terraform version: **v1.x**

### Fixes

- [PR #322](https://github.com/zscaler/terraform-provider-zia/pull/322) - Fixed validation `zia_url_filtering_rules` resource to validate `protocols` attribute to accept `HTTP_RULE` and `HTTPS_RULE`.
- [PR #322](https://github.com/zscaler/terraform-provider-zia/pull/322) - Fixed validation `zia_url_filtering_rules` validations for rules with `action` configured as `ISOLATE`.
- [PR #322](https://github.com/zscaler/terraform-provider-zia/pull/322) - Fixed linter issues across several acceptance tests resources and data sources.

## 2.7.31 (February, 28 2024)

### Notes
Expand Down
6 changes: 3 additions & 3 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -189,14 +189,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)/2.7.4/$(GOOS)_$(GOARCH)
build13: DESTINATION=$(APPDATA)/terraform.d/plugins/$(ZIA_PROVIDER_NAMESPACE)/2.7.32/$(GOOS)_$(GOARCH)
else
build13: DESTINATION=$(HOME)/.terraform.d/plugins/$(ZIA_PROVIDER_NAMESPACE)/2.7.4/$(GOOS)_$(GOARCH)
build13: DESTINATION=$(HOME)/.terraform.d/plugins/$(ZIA_PROVIDER_NAMESPACE)/2.7.32/$(GOOS)_$(GOARCH)
endif
build13: fmtcheck
@echo "==> Installing plugin to $(DESTINATION)"
@mkdir -p $(DESTINATION)
go build -o $(DESTINATION)/terraform-provider-zia_v2.7.4
go build -o $(DESTINATION)/terraform-provider-zia_v2.7.32

coverage: test
@echo "✓ Opening coverage for unit tests ..."
Expand Down
16 changes: 15 additions & 1 deletion docs/guides/release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,24 @@ description: |-
Track all ZIA Terraform provider's releases. New resources, features, and bug fixes will be tracked here.

---
``Last updated: v2.7.31``
``Last updated: v2.7.32``

---

## 2.7.32 (February, 28 2024)

### Notes

- Release date: **(February, 28 2024)**
- Supported Terraform version: **v1.x**

### Fixes

- [PR #322](https://github.com/zscaler/terraform-provider-zia/pull/322) - Fixed validation `zia_url_filtering_rules` resource to validate `protocols` attribute to accept `HTTP_RULE` and `HTTPS_RULE`.
- [PR #322](https://github.com/zscaler/terraform-provider-zia/pull/322) - Fixed validation `zia_url_filtering_rules` validations for rules with `action` configured as `ISOLATE`.
- [PR #322](https://github.com/zscaler/terraform-provider-zia/pull/322) - Fixed linter issues across several acceptance tests resources and data sources.


## 2.7.31 (February, 28 2024)

### Notes
Expand Down
304 changes: 0 additions & 304 deletions zia/GNUmakefile

This file was deleted.

2 changes: 1 addition & 1 deletion zia/common/version.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package common

var version = "2.7.2"
var version = "2.7.32"

// Version returns version of provider
func Version() string {
Expand Down
4 changes: 3 additions & 1 deletion zia/data_source_zia_auth_settings_urls_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ func TestAccDataSourceAuthSettingsUrls_Basic(t *testing.T) {
}

func testAccDataSourceAuthSettingsUrlsCheck(name string) resource.TestCheckFunc {
return resource.ComposeTestCheckFunc()
return resource.ComposeTestCheckFunc(
resource.TestCheckResourceAttrSet(name, "urls.#"),
)
}

var testAccCheckDataSourceAuthSettingsUrlsConfig_basic = `
Expand Down
2 changes: 1 addition & 1 deletion zia/data_source_zia_dlp_web_rules_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func TestAccDataSourceDlpWebRules_Basic(t *testing.T) {
CheckDestroy: testAccCheckDlpWebRulesDestroy,
Steps: []resource.TestStep{
{
Config: testAccCheckDlpWebRulesConfigure(resourceTypeAndName, generatedName, generatedName, variable.DLPWebRuleDesc, variable.DLPRuleResourceAction, variable.DLPRuleResourceState),
Config: testAccCheckDlpWebRulesConfigure(resourceTypeAndName, generatedName, variable.DLPWebRuleDesc, variable.DLPRuleResourceAction, variable.DLPRuleResourceState),
Check: resource.ComposeTestCheckFunc(
resource.TestCheckResourceAttrPair(dataSourceTypeAndName, "id", resourceTypeAndName, "id"),
resource.TestCheckResourceAttrPair(dataSourceTypeAndName, "name", resourceTypeAndName, "name"),
Expand Down
Loading

0 comments on commit 276dded

Please sign in to comment.