Skip to content

Commit b4ff3c7

Browse files
authored
feat: Added ZIA VZEN Node resources, Added fixes to Rule based resources (#480)
* feat: Added ZIA VZEN Node resources, Added fixes to Rule based resources * fix: Fixed DLP Dictionary and updated documentations * fix: Fixed Acceptance Tests
1 parent 1512a9f commit b4ff3c7

File tree

58 files changed

+1909
-684
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+1909
-684
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
- name: Set up Go
3333
uses: actions/setup-go@v5
3434
with:
35-
go-version: "1.21"
35+
go-version: "1.24"
3636

3737
- name: Import GPG key
3838
id: import_gpg

.github/workflows/zia-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
strategy:
2929
fail-fast: false
3030
matrix:
31-
goVersion: ["1.21"]
31+
goVersion: ["1.24"]
3232
environment:
3333
- ZIA_ZS3
3434
environment: ${{ matrix.environment }}

CHANGELOG.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,35 @@
11
# Changelog
22

3+
## 4.5.0 (September, xx 2025)
4+
5+
### Notes
6+
7+
- Release date: **(September, xx 2025)**
8+
- Supported Terraform version: **v1.x**
9+
10+
### NEW - DATA SOURCE AND RESOURCES
11+
12+
The following new resources have been introduced:
13+
14+
- [PR #479](https://github.com/zscaler/terraform-provider-zia/pull/479) - Added new datasource resource `zia_virtual_service_edge_node` - Retrieves the Virtual Service Edge Nodes (VZEN) configured in the ZIA Admin Portal. This data source can be used to set the corresponding node when configuring the resource `zia_virtual_service_edge_cluster`.
15+
16+
### Enhancements
17+
18+
- [PR #479](https://github.com/zscaler/terraform-provider-zia/pull/479) - Added new `MATCHON_ATLEAST_1` option for `secondary_field_match_on` attribute in `exact_data_match_details` block for the resource `zia_dlp_dictionaries`.
19+
20+
- [PR #479](https://github.com/zscaler/terraform-provider-zia/pull/479) - Enhanced: Standardized reorder logic across all rule-based resources to use consistent OrderRule struct pattern with proper Order and Rank handling.
21+
- Updated 12 rule-based resources to use reorderWithBeforeReorder function with OrderRule{Order, Rank} struct
22+
- Added optimization checks to avoid unnecessary updates when order is already correct
23+
- Improved error handling in reorder functions across all resources
24+
- Maintained backward compatibility while ensuring consistent reordering behavior
25+
- Special handling for resources without rank support (CASB malware rules) using Rank: 0
26+
27+
Resources updated: `zia_url_filtering_rules`, `zia_nat_control_rules`, `zia_ssl_inspection_rules`, `zia_dlp_web_rules`, `zia_file_type_control_rules`, `zia_firewall_dns_rules`, `zia_firewall_ips_rules`, `zia_bandwidth_control_rules`, `zia_casb_dlp_rules`, `zia_cloud_app_control_rules`, `zia_sandbox_rules`, `zia_casb_malware_rules`.
28+
29+
### Bug Fixes
30+
31+
- [PR #479](https://github.com/zscaler/terraform-provider-zia/pull/479) - Fixed `zia_dlp_dictionary` attribute `primary_fields` flattening function to correctly handle empty lists.
32+
333
## 4.4.12 (September, 9 2025)
434

535
### Notes

GNUmakefile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -196,14 +196,14 @@ test\:integration\:zscalertwo:
196196
build13: GOOS=$(shell go env GOOS)
197197
build13: GOARCH=$(shell go env GOARCH)
198198
ifeq ($(OS),Windows_NT) # is Windows_NT on XP, 2000, 7, Vista, 10...
199-
build13: DESTINATION=$(APPDATA)/terraform.d/plugins/$(ZIA_PROVIDER_NAMESPACE)/4.4.12/$(GOOS)_$(GOARCH)
199+
build13: DESTINATION=$(APPDATA)/terraform.d/plugins/$(ZIA_PROVIDER_NAMESPACE)/4.5.0/$(GOOS)_$(GOARCH)
200200
else
201-
build13: DESTINATION=$(HOME)/.terraform.d/plugins/$(ZIA_PROVIDER_NAMESPACE)/4.4.12/$(GOOS)_$(GOARCH)
201+
build13: DESTINATION=$(HOME)/.terraform.d/plugins/$(ZIA_PROVIDER_NAMESPACE)/4.5.0/$(GOOS)_$(GOARCH)
202202
endif
203203
build13: fmtcheck
204204
@echo "==> Installing plugin to $(DESTINATION)"
205205
@mkdir -p $(DESTINATION)
206-
go build -o $(DESTINATION)/terraform-provider-zia_v4.4.12
206+
go build -o $(DESTINATION)/terraform-provider-zia_v4.5.0
207207

208208
coverage: test
209209
@echo "✓ Opening coverage for unit tests ..."
@@ -269,12 +269,12 @@ lint:
269269

270270
tools:
271271
@which $(GOFMT) || go install mvdan.cc/[email protected]
272-
@which $(TFPROVIDERLINT) || go install github.com/bflad/tfproviderlint/cmd/tfproviderlint@v0.29.0
272+
@which $(TFPROVIDERLINT) || go install github.com/bflad/tfproviderlint/cmd/tfproviderlint@latest
273273
@which $(STATICCHECK) || go install honnef.co/go/tools/cmd/[email protected]
274274

275275
tools-update:
276276
@go install mvdan.cc/[email protected]
277-
@go install github.com/bflad/tfproviderlint/cmd/tfproviderlint@v0.29.0
277+
@go install github.com/bflad/tfproviderlint/cmd/tfproviderlint@latest
278278
@go install honnef.co/go/tools/cmd/[email protected]
279279

280280
ziaActivator: GOOS=$(shell go env GOOS)

docs/data-sources/zia_end_user_notification.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ data "zia_end_user_notification" "example"{}
3131
* `aup_message` (String) - The acceptable use statement that appears in the AUP.
3232
* `notification_type` (String) - The type of EUN, either DEFAULT or CUSTOM.
3333
* `display_reason` (Boolean) - Indicates whether the reason for blocking access is displayed in the EUN.
34-
* `display_comp_name` (Boolean) - Indicates whether the organization's name is displayed in the EUN.
35-
* `display_comp_logo` (Boolean) - Indicates whether the organization's logo is displayed in the EUN.
34+
* `display_company_name` (Boolean) - Indicates whether the organization's name is displayed in the EUN.
35+
* `display_company_logo` (Boolean) - Indicates whether the organization's logo is displayed in the EUN.
3636
* `custom_text` (String) - Custom text displayed in the EUN.
3737
* `url_cat_review_enabled` (Boolean) - Indicates whether URL Categorization notifications are enabled.
3838
* `url_cat_review_submit_to_security_cloud` (Boolean) - Indicates whether review requests are submitted to Zscaler Security Cloud.
Lines changed: 17 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
subcategory: "Service Edge Cluster"
2+
subcategory: "Virtual Service Edges"
33
layout: "zscaler"
44
page_title: "ZIA: virtual_service_edge_cluster"
55
description: |-
@@ -15,6 +15,8 @@ description: |-
1515

1616
Use the **zia_virtual_service_edge_cluster** data source to get information about a Virtual Service Edge Cluster information for the specified `Name` or `ID`
1717

18+
## Example Usage
19+
1820
```hcl
1921
data "zia_virtual_service_edge_cluster" "this"{
2022
name = "VSECluster01"
@@ -25,31 +27,20 @@ data "zia_virtual_service_edge_cluster" "this"{
2527

2628
The following arguments are supported:
2729

28-
* `name` - (String) Name of the Virtual Service Edge cluster
29-
* `id` - (String) USystem-generated Virtual Service Edge cluster ID
30-
31-
## Attribute Reference
32-
33-
In addition to all arguments above, the following attributes are exported:
34-
35-
* `status` - (Number) Specifies the status of the Virtual Service Edge cluster. The status is set to `ENABLED` by default.
30+
* `name` - (Optional) Name of the Virtual Service Edge cluster
31+
* `id` - (Optional) System-generated Virtual Service Edge cluster ID
3632

37-
* `ip_sec_enabled` - (String) A Boolean value that specifies whether to terminate IPSec traffic from the client at selected Virtual Service Edge instances for the Virtual Service Edge cluster
38-
* `ip_address` - (String) The Virtual Service Edge cluster IP address. In a Virtual Service Edge cluster, the cluster IP address provides fault tolerance and is used to listen for user traffic. This interface doesn't explicitly get an IP address. The cluster IP address must be in the same VLAN as the proxy and load balancer IP addresses.
39-
* `subnet_mask` - (String) The Virtual Service Edge cluster subnet mask
40-
* `default_gateway` - (String) The IP address of the default gateway to the internet
41-
* `last_modified_time` - (Number) When the cluster was last modified
33+
## Attributes Reference
4234

43-
* `virtual_zen_nodes` - (List of Object) The Virtual Service Edge instances you want to include in the cluster. A Virtual Service Edge cluster must contain at least two Virtual Service Edge instances.
44-
* `id` - (Number) Identifier that uniquely identifies an entity
45-
* `name` - (String) The configured name of the entity
46-
* `external_id` (String) An external identifier used for an entity that is managed outside of ZIA.
47-
* `extensions` - (Map of String)
35+
In addition to the arguments above, the following attributes are exported:
4836

49-
* `type` - (String) The Virtual Service Edge cluster type
50-
`ANY`, `NONE`, `SME`, `SMSM`, `SMCA`, `SMUI`, `SMCDS`, `SMDNSD`, `SMAA`, `SMTP`,`SMQTN`,`VIP`,
51-
`UIZ`, `UIAE`, `SITEREVIEW`, `PAC`, `S_RELAY`, `M_RELAY`, `H_MON`, `SMIKE`, `NSS`, `SMEZA`, `SMLB`,
52-
`SMFCCLT`, `SMBA`, `SMBAC`, `SMESXI`, `SMBAUI`, `VZEN`, `ZSCMCLT`, `SMDLP`, `ZSQUERY`, `ADP`, `SMCDSDLP`,
53-
`SMSCIM`, `ZSAPI`, `ZSCMCDSSCLT`, `LOCAL_MTS`, `SVPN`, `SMCASB`, `SMFALCONUI`, `MOBILEAPP_REG`, `SMRESTSVR`,
54-
`FALCONCA`, `MOBILEAPP_NF`, `ZIRSVR`, `SMEDGEUI`, `ALERTEVAL`, `ALERTNOTIF`, `SMPARTNERUI`, `CQM`, `DATAKEEPER`,
55-
`SMBAM`, `ZWACLT`
37+
* `id` - System-generated Virtual Service Edge cluster ID
38+
* `cluster_id` - System-generated Virtual Service Edge cluster ID
39+
* `name` - Name of the Virtual Service Edge cluster
40+
* `status` - Specifies the status of the Virtual Service Edge cluster. The status is set to ENABLED by default
41+
* `type` - The Virtual Service Edge cluster type. Supported values: `ANY`, `NONE`, `SME`, `SMSM`, `SMCA`, `SMUI`, `SMCDS`, `SMDNSD`, `SMAA`, `SMTP`, `SMQTN`, `VIP`, `UIZ`, `UIAE`, `SITEREVIEW`, `PAC`, `S_RELAY`, `M_RELAY`, `H_MON`, `SMIKE`, `NSS`, `SMEZA`, `SMLB`, `SMFCCLT`, `SMBA`, `SMBAC`, `SMESXI`, `SMBAUI`, `VZEN`, `ZSCMCLT`, `SMDLP`, `ZSQUERY`, `ADP`, `SMCDSDLP`, `SMSCIM`, `ZSAPI`, `ZSCMCDSSCLT`, `LOCAL_MTS`, `SVPN`, `SMCASB`, `SMFALCONUI`, `MOBILEAPP_REG`, `SMRESTSVR`, `FALCONCA`, `MOBILEAPP_NF`, `ZIRSVR`, `SMEDGEUI`, `ALERTEVAL`, `ALERTNOTIF`, `SMPARTNERUI`, `CQM`, `DATAKEEPER`, `SMBAM`, `ZWACLT`
42+
* `ip_sec_enabled` - A Boolean value that specifies whether to terminate IPSec traffic from the client at selected Virtual Service Edge instances for the Virtual Service Edge cluster
43+
* `ip_address` - The Virtual Service Edge cluster IP address
44+
* `subnet_mask` - The Virtual Service Edge cluster subnet mask
45+
* `default_gateway` - The IP address of the default gateway to the internet
46+
* `virtual_zen_nodes` - List of ZPA Application Segments for which this rule is applicable. This field is applicable only for the ECZPA forwarding method (used for Zscaler Cloud Connector)
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
---
2+
subcategory: "Virtual Service Edges"
3+
layout: "zscaler"
4+
page_title: "ZIA: virtual_service_edge_node"
5+
description: |-
6+
Official documentation https://help.zscaler.com/zia/about-virtual-service-edges
7+
API documentation https://help.zscaler.com/zia/service-edges#/virtualZenNodes-post
8+
Retrieves a list of ZIA Virtual Service Edge nodes.
9+
---
10+
11+
# zia_virtual_service_edge_node (Data Source)
12+
13+
* [Official documentation](https://help.zscaler.com/zia/about-virtual-service-edges)
14+
* [API documentation](https://help.zscaler.com/zia/service-edges#/virtualZenNodes-post)
15+
16+
Use the **zia_virtual_service_edge_node** data source to get information about a Virtual Service Edge Node for the specified `Name` or `ID`
17+
18+
## Example Usage
19+
20+
```hcl
21+
data "zia_virtual_service_edge_node" "this"{
22+
name = "VSENode01"
23+
}
24+
```
25+
26+
## Argument Reference
27+
28+
The following arguments are supported:
29+
30+
* `id` - (Optional) System-generated Virtual Service Edge cluster ID
31+
* `name` - (Optional) Name of the Virtual Service Edge cluster
32+
33+
## Attributes Reference
34+
35+
In addition to the arguments above, the following attributes are exported:
36+
37+
* `id` - System-generated Virtual Service Edge cluster ID
38+
* `name` - Name of the Virtual Service Edge cluster
39+
* `status` - Specifies the status of the Virtual Service Edge cluster. The status is set to ENABLED by default
40+
* `type` - The Virtual Service Edge cluster type
41+
* `ip_sec_enabled` - A Boolean value that specifies whether to terminate IPSec traffic from the client at selected Virtual Service Edge instances for the Virtual Service Edge cluster
42+
* `ip_address` - The Virtual Service Edge cluster IP address
43+
* `subnet_mask` - The Virtual Service Edge cluster subnet mask
44+
* `default_gateway` - The IP address of the default gateway to the internet
45+
* `zgateway_id` - The Zscaler service gateway ID
46+
* `in_production` - Represents the Virtual Service Edge instances deployed for production purposes
47+
* `on_demand_support_tunnel_enabled` - A Boolean value that indicates whether or not the On-Demand Support Tunnel is enabled
48+
* `establish_support_tunnel_enabled` - A Boolean value that indicates whether or not a support tunnel for Zscaler Support is enabled
49+
* `load_balancer_ip_address` - The IP address of the load balancer. This field is applicable only when the 'deploymentMode' field is set to CLUSTER
50+
* `deployment_mode` - Specifies the deployment mode. Select either STANDALONE or CLUSTER if you have the VMware ESXi platform. Otherwise, select only STANDALONE
51+
* `cluster_name` - Virtual Service Edge cluster name
52+
* `vzen_sku_type` - The Virtual Service Edge SKU type. Supported Values: SMALL, MEDIUM, LARGE

docs/guides/release-notes.md

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,36 @@ description: |-
1212
Track all ZIA Terraform provider's releases. New resources, features, and bug fixes will be tracked here.
1313

1414
---
15-
``Last updated: v4.4.12``
15+
``Last updated: v4.5.0``
1616

1717
---
1818

19+
## 4.5.0 (September, xx 2025)
20+
21+
### Notes
22+
23+
- Release date: **(September, xx 2025)**
24+
- Supported Terraform version: **v1.x**
25+
26+
### NEW - DATA SOURCE AND RESOURCES
27+
28+
The following new resources have been introduced:
29+
30+
- [PR #479](https://github.com/zscaler/terraform-provider-zia/pull/479) - Added new datasource resource `zia_virtual_service_edge_node` - Retrieves the Virtual Service Edge Nodes (VZEN) configured in the ZIA Admin Portal. This data source can be used to set the corresponding node when configuring the resource `zia_virtual_service_edge_cluster`.
31+
32+
### Enhancements
33+
34+
- [PR #479](https://github.com/zscaler/terraform-provider-zia/pull/479) - Added new `MATCHON_ATLEAST_1` option for `secondary_field_match_on` attribute in `exact_data_match_details` block for the resource `zia_dlp_dictionaries`.
35+
36+
- [PR #479](https://github.com/zscaler/terraform-provider-zia/pull/479) - Enhanced: Standardized reorder logic across all rule-based resources to use consistent OrderRule struct pattern with proper Order and Rank handling.
37+
- Updated 12 rule-based resources to use reorderWithBeforeReorder function with OrderRule{Order, Rank} struct
38+
- Added optimization checks to avoid unnecessary updates when order is already correct
39+
- Improved error handling in reorder functions across all resources
40+
- Maintained backward compatibility while ensuring consistent reordering behavior
41+
- Special handling for resources without rank support (CASB malware rules) using Rank: 0
42+
43+
Resources updated: `zia_url_filtering_rules`, `zia_nat_control_rules`, `zia_ssl_inspection_rules`, `zia_dlp_web_rules`, `zia_file_type_control_rules`, `zia_firewall_dns_rules`, `zia_firewall_ips_rules`, `zia_bandwidth_control_rules`, `zia_casb_dlp_rules`, `zia_cloud_app_control_rules`, `zia_sandbox_rules`, `zia_casb_malware_rules`.
44+
1945
## 4.4.12 (September, 9 2025)
2046

2147
### Notes

0 commit comments

Comments
 (0)