Skip to content

Commit d2326fa

Browse files
authored
fix: Added New Workload Group Resource and Implemented Fixes to addres Drifts (#482)
1 parent b4ff3c7 commit d2326fa

38 files changed

+844
-139
lines changed

CHANGELOG.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,23 @@
11
# Changelog
22

3-
## 4.5.0 (September, xx 2025)
3+
## 4.5.1 (September, 22 2025)
44

55
### Notes
66

7-
- Release date: **(September, xx 2025)**
7+
- Release date: **(September, 22 2025)**
8+
- Supported Terraform version: **v1.x**
9+
10+
### Enhancements
11+
12+
- [PR #482](https://github.com/zscaler/terraform-provider-zia/pull/482) - Added new resource `zia_workload_groups`.
13+
- [PR #482](https://github.com/zscaler/terraform-provider-zia/pull/482) - Added new attribute `source_countries` to resource `zia_url_filtering_rules`. The attribute identifies destinations based on the location of a server. Provide a 2 letter [ISO3166 Alpha2 Country code](https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes). i.e ``"US"``, ``"CA"``
14+
- [PR #482](https://github.com/zscaler/terraform-provider-zia/pull/482) - Fixed and updated several documentation fields across multiple resources and data sources.
15+
16+
## 4.5.0 (September, 17 2025)
17+
18+
### Notes
19+
20+
- Release date: **(September, 17 2025)**
821
- Supported Terraform version: **v1.x**
922

1023
### NEW - DATA SOURCE AND RESOURCES

GNUmakefile

Lines changed: 3 additions & 3 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.5.0/$(GOOS)_$(GOARCH)
199+
build13: DESTINATION=$(APPDATA)/terraform.d/plugins/$(ZIA_PROVIDER_NAMESPACE)/4.5.1/$(GOOS)_$(GOARCH)
200200
else
201-
build13: DESTINATION=$(HOME)/.terraform.d/plugins/$(ZIA_PROVIDER_NAMESPACE)/4.5.0/$(GOOS)_$(GOARCH)
201+
build13: DESTINATION=$(HOME)/.terraform.d/plugins/$(ZIA_PROVIDER_NAMESPACE)/4.5.1/$(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.5.0
206+
go build -o $(DESTINATION)/terraform-provider-zia_v4.5.1
207207

208208
coverage: test
209209
@echo "✓ Opening coverage for unit tests ..."

docs/data-sources/zia_firewall_filtering_rule.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,11 @@ In addition to all arguments above, the following attributes are exported:
8989

9090
`destinations` supports the following attributes:
9191

92-
* `dest_addresses`** - (Optional) - IP addresses and fully qualified domain names (FQDNs), if the domain has multiple destination IP addresses or if its IP addresses may change. For IP addresses, you can enter individual IP addresses, subnets, or address ranges. If adding multiple items, hit Enter after each entry.
93-
* `dest_countries`** - (Optional) Identify destinations based on the location of a server, select Any to apply the rule to all countries or select the countries to which you want to control traffic.
92+
* `dest_addresses`** - (List of String) - IP addresses and fully qualified domain names (FQDNs), if the domain has multiple destination IP addresses or if its IP addresses may change. For IP addresses, you can enter individual IP addresses, subnets, or address ranges. If adding multiple items, hit Enter after each entry.
93+
* `dest_countries`** - (List of String) Identify destinations based on the location of a server. Provide a 2 letter [ISO3166 Alpha2 Country code](https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes). i.e ``"US"``, ``"CA"``
94+
95+
* `source_countries`** - (List of String) Identify destinations based on the location of a server. Provide a 2 letter [ISO3166 Alpha2 Country code](https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes). i.e ``"US"``, ``"CA"``
96+
9497
* `dest_ip_categories`** - (Optional) identify destinations based on the URL category of the domain, select Any to apply the rule to all categories or select the specific categories you want to control.
9598
- `id` - (String) Identifier that uniquely identifies an entity
9699
- `name` - (String) The configured name of the entity

docs/data-sources/zia_url_filtering_rules.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ In addition to all arguments above, the following attributes are exported:
4949
* `last_modified_time` - (Number) When the rule was last modified
5050
* `enforce_time_validity` - (String) Enforce a set a validity time period for the URL Filtering rule.
5151
* `action` - (String) Action taken when traffic matches rule criteria. Supported values: `ANY`, `NONE`, `BLOCK`, `CAUTION`, `ALLOW`, `ICAP_RESPONSE`
52-
52+
* `source_countries`** - (List of String) Identify destinations based on the location of a server. Provide a 2 letter [ISO3166 Alpha2 Country code](https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes). i.e ``"US"``, ``"CA"``
5353
* `device_trust_levels` - (List) List of device trust levels for which the rule must be applied. This field is applicable for devices that are managed using Zscaler Client Connector. The trust levels are assigned to the devices based on your posture configurations in the Zscaler Client Connector Portal. If no value is set, this field is ignored during the policy evaluation. Supported values: `ANY`, `UNKNOWN_DEVICETRUSTLEVEL`, `LOW_TRUST`, `MEDIUM_TRUST`, `HIGH_TRUST`
5454

5555
* `user_risk_score_levels` (List) - Indicates the user risk score level selectedd for the DLP rule violation: Returned values are: `LOW`, `MEDIUM`, `HIGH`, `CRITICAL`

docs/guides/release-notes.md

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,28 @@ 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.5.0``
15+
``Last updated: v4.5.1``
1616

1717
---
1818

19-
## 4.5.0 (September, xx 2025)
19+
## 4.5.1 (September, 22 2025)
2020

2121
### Notes
2222

23-
- Release date: **(September, xx 2025)**
23+
- Release date: **(September, 22 2025)**
24+
- Supported Terraform version: **v1.x**
25+
26+
### Enhancements
27+
28+
- [PR #482](https://github.com/zscaler/terraform-provider-zia/pull/482) - Added new resource `zia_workload_groups`.
29+
- [PR #482](https://github.com/zscaler/terraform-provider-zia/pull/482) - Added new attribute `source_countries` to resource `zia_url_filtering_rules`. The attribute identifies destinations based on the location of a server. Provide a 2 letter [ISO3166 Alpha2 Country code](https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes). i.e ``"US"``, ``"CA"``
30+
- [PR #482](https://github.com/zscaler/terraform-provider-zia/pull/482) - Fixed and updated several documentation fields across multiple resources and data sources.
31+
32+
## 4.5.0 (September, 17 2025)
33+
34+
### Notes
35+
36+
- Release date: **(September, 17 2025)**
2437
- Supported Terraform version: **v1.x**
2538

2639
### NEW - DATA SOURCE AND RESOURCES

docs/resources/zia_bandwidth_control_rule.md

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,31 @@ Use the **zia_bandwidth_control_rule** resource allows the creation and manageme
2020
## Example Usage - By Name
2121

2222
```hcl
23-
24-
data "zia_bandwidth_control_rule" "this" {
25-
name = "Streaming Media Bandwidth"
23+
data "zia_bandwidth_classes_web_conferencing" "this" {
24+
name = "BANDWIDTH_CAT_WEBCONF"
2625
}
27-
```
28-
29-
## Example Usage - By ID
3026
31-
```hcl
32-
33-
data "zia_bandwidth_control_rule" "this" {
34-
id = 154658
27+
resource "zia_bandwidth_control_rule" "this" {
28+
name = "Streaming Media Bandwidth"
29+
description = "Streaming Media Bandwidth"
30+
state = "ENABLED"
31+
order = 1
32+
rank = 7
33+
min_bandwidth = 5
34+
max_bandwidth = 100
35+
protocols = ["ANY_RULE"]
36+
bandwidth_classes {
37+
id = [data.zia_bandwidth_classes_web_conferencing.this.id]
38+
}
39+
labels {
40+
id = [1503197]
41+
}
42+
location_groups {
43+
id = [8061255]
44+
}
45+
time_windows {
46+
id = [483]
47+
}
3548
}
3649
```
3750

docs/resources/zia_location_management.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ The following arguments are supported:
197197
* `aup_timeout_in_days` - (Number) Custom AUP Frequency. Refresh time (in days) to re-validate the AUP.
198198
* `cookies_and_proxy` - (Boolean) Enable Cookies and proxy feature
199199
* `digest_auth_enabled` - (Boolean) Enable Digest Auth feature
200-
* `kerberos_auth_enabled` - (Boolean) Enable Kerberos Auth feature
200+
* `kerberos_auth` - (Boolean) Enable Kerberos Auth feature
201201
* `auth_required` - (Boolean) Enforce Authentication. Required when ports are enabled, IP Surrogate is enabled, or Kerberos Authentication is enabled.
202202
* `caution_enabled` - (Boolean) Enable Caution. When set to true, a caution notifcation is enabled for the location.
203203
* `display_time_unit` - (String) Display Time Unit. The time unit to display for IP Surrogate idle time to disassociation.

docs/resources/zia_risk_profiles.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ See [About Cloud Application Risk Profile](https://help.zscaler.com/zia/about-cl
2020

2121
```hcl
2222
resource "zia_risk_profiles" "this" {
23-
name = "RiskProfile_12346"
23+
profile_name = "RiskProfile_12346"
2424
status="SANCTIONED"
2525
risk_index=[1, 2, 3, 4, 5]
2626
certifications=["AICPA", "CCPA", "CISP"]
@@ -63,7 +63,7 @@ resource "zia_risk_profiles" "this" {
6363

6464
The following arguments are supported:
6565

66-
* `name` - (Required, String) Cloud application risk profile name.
66+
* `profile_name` - (Required, String) Cloud application risk profile name.
6767

6868
## Attribute Reference
6969

docs/resources/zia_url_filtering_rules.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,8 @@ Supported values: `OPTIONS`, `GET`, `HEAD`, `POST`, `PUT`, `DELETE`, `TRACE`, `C
175175

176176
* `url_categories` - (List of Strings) The list of URL categories to which the URL Filtering rule must be applied. See the [URL Categories API](https://help.zscaler.com/zia/url-categories#/urlCategories-get) for the list of available categories or use the data source `zia_url_categories` to retrieve the list of URL categories.
177177

178+
* `source_countries`** - (List of String) Identify destinations based on the location of a server. Provide a 2 letter [ISO3166 Alpha2 Country code](https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes). i.e ``"US"``, ``"CA"``
179+
178180
* `locations` - (List of Object) The locations to which the Firewall Filtering policy rule applies
179181
* `id` - (Optional) Identifier that uniquely identifies an entity
180182

Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
---
2+
subcategory: "Workload Groups"
3+
layout: "zscaler"
4+
page_title: "ZIA: workload_groups"
5+
description: |-
6+
Official documentation https://help.zscaler.com/zia/about-workload-groups
7+
API documentation https://help.zscaler.com/zia/workload-groups#/workloadGroups-get
8+
Get information about Workload Groups.
9+
---
10+
11+
# zia_workload_groups (Resource)
12+
13+
* [Official documentation](https://help.zscaler.com/zia/about-workload-groups)
14+
* [API documentation](https://help.zscaler.com/zia/workload-groups#/workloadGroups-get)
15+
16+
Use the **zia_workload_groups** resource allows the creation and management of Workload Group objects in the Zscaler Internet Access. This resource can then be used as a criterion in ZIA policies such as, Firewall Filtering, URL Filtering, and Data Loss Prevention (DLP) to apply security policies to the workload traffic.
17+
18+
## Example Usage
19+
20+
```hcl
21+
resource "zia_workload_groups" "example" {
22+
name = "Test Group"
23+
description = "Test Group"
24+
25+
expression_json {
26+
expression_containers {
27+
tag_type = "ATTR"
28+
operator = "AND"
29+
30+
tag_container {
31+
operator = "AND"
32+
33+
tags {
34+
key = "GroupName"
35+
value = "example"
36+
}
37+
}
38+
}
39+
40+
expression_containers {
41+
tag_type = "ENI"
42+
operator = "AND"
43+
44+
tag_container {
45+
operator = "AND"
46+
47+
tags {
48+
key = "GroupId"
49+
value = "123456789"
50+
}
51+
}
52+
}
53+
54+
expression_containers {
55+
tag_type = "VPC"
56+
operator = "AND"
57+
58+
tag_container {
59+
operator = "AND"
60+
61+
tags {
62+
key = "Vpc-id"
63+
value = "vpcid12344"
64+
}
65+
}
66+
}
67+
68+
expression_containers {
69+
tag_type = "VM"
70+
operator = "AND"
71+
72+
tag_container {
73+
operator = "AND"
74+
75+
tags {
76+
key = "IamInstanceProfile-Arn"
77+
value = "test01"
78+
}
79+
}
80+
}
81+
}
82+
}
83+
```
84+
85+
## Argument Reference
86+
87+
The following arguments are supported:
88+
89+
### Required
90+
91+
* `name` - (Required) The name of the workload group.
92+
93+
### Optional
94+
95+
* `description` - (Optional) The description of the workload group.
96+
* `expression_json` - (Optional) The workload group expression containing tag types, tags, and their relationships represented in a JSON format.
97+
* `expression_containers` - (Optional) Contains one or more tag types (and associated tags) combined using logical operators within a workload group.
98+
* `tag_type` - (Optional) The tag type selected from a predefined list. Supported values are: `ANY`, `VPC`, `SUBNET`, `VM`, `ENI`, `ATTR`.
99+
* `operator` - (Optional) The operator (either AND or OR) used to create logical relationships among tag types. Supported values are: `AND`, `OR`, `OPEN_PARENTHESES`, `CLOSE_PARENTHESES`.
100+
* `tag_container` - (Optional) Contains one or more tags and the logical operator used to combine the tags within a tag type.
101+
* `operator` - (Optional) The logical operator (either AND or OR) used to combine the tags within a tag type. Supported values are: `AND`, `OR`.
102+
* `tags` - (Optional) One or more tags, each consisting of a key-value pair, selected within a tag type. If multiple tags are present within a tag type, they are combined using a logical operator. Note: A maximum of 8 tags can be added to a workload group, irrespective of the number of tag types present.
103+
* `key` - (Optional) The key component present in the key-value pair contained in a tag.
104+
* `value` - (Optional) The value component present in the key-value pair contained in a tag.
105+
106+
## Attribute Reference
107+
108+
In addition to all arguments above, the following attributes are exported:
109+
110+
* `id` - (String) A unique identifier assigned to the workload group.
111+
* `group_id` - (Number) A unique identifier assigned to the workload group.
112+
* `name` - (String) The name of the workload group.
113+
* `description` - (String) The description of the workload group.
114+
* `expression_json` - (List) The workload group expression containing tag types, tags, and their relationships represented in a JSON format.
115+
* `expression_containers` - (List) Contains one or more tag types (and associated tags) combined using logical operators within a workload group.
116+
* `tag_type` - (String) The tag type selected from a predefined list. Returned values are: `ANY`, `VPC`, `SUBNET`, `VM`, `ENI`, `ATTR`.
117+
* `operator` - (String) The operator (either AND or OR) used to create logical relationships among tag types. Returned values are: `AND`, `OR`, `OPEN_PARENTHESES`, `CLOSE_PARENTHESES`.
118+
* `tag_container` - (List) Contains one or more tags and the logical operator used to combine the tags within a tag type.
119+
* `operator` - (String) The logical operator (either AND or OR) used to combine the tags within a tag type. Returned values are: `AND`, `OR`.
120+
* `tags` - (List) One or more tags, each consisting of a key-value pair, selected within a tag type. If multiple tags are present within a tag type, they are combined using a logical operator. Note: A maximum of 8 tags can be added to a workload group, irrespective of the number of tag types present.
121+
* `key` - (String) The key component present in the key-value pair contained in a tag.
122+
* `value` - (String) The value component present in the key-value pair contained in a tag.
123+
124+
## Import
125+
126+
Zscaler offers a dedicated tool called Zscaler-Terraformer to allow the automated import of ZIA configurations into Terraform-compliant HashiCorp Configuration Language.
127+
[Visit](https://github.com/zscaler/zscaler-terraformer)
128+
129+
**zia_workload_groups** can be imported by using `<GROUP_ID>` or `<GROUP_NAME>` as the import ID.
130+
131+
For example:
132+
133+
```shell
134+
terraform import zia_workload_groups.example <group_id>
135+
```
136+
137+
or
138+
139+
```shell
140+
terraform import zia_workload_groups.example <group_name>
141+
```

0 commit comments

Comments
 (0)