Skip to content

Commit

Permalink
feat:re-enroll user on password update (#244)
Browse files Browse the repository at this point in the history
* feat:re-enroll user on password update

* (Fix) Update changelog and release-notes

---------

Co-authored-by: William Guilherme <[email protected]>
  • Loading branch information
amazzalel-habib and willguibr authored May 30, 2023
1 parent 0894413 commit a800338
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 5 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Changelog

## 2.5.5 (May, 29 2023)

### Notes

- Release date: **(May, 29 2023)**
- Supported Terraform version: **v1.x**

### Fixes

- [PR #244](https://github.com/zscaler/terraform-provider-zia/pull/244) Fix ``zia_user_management`` to ensure when the ``auth_methods``attribute is set, and user password is changed, the provide will re-enroll the user to update the password.

## 2.5.4 (May, 25 2023)

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

test: fmtcheck
go test $(TEST) || exit 1
Expand Down
13 changes: 12 additions & 1 deletion docs/guides/release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,21 @@ description: |-
Track all ZIA Terraform provider's releases. New resources, features, and bug fixes will be tracked here.

---
``Last updated: v2.5.4``
``Last updated: v2.5.5``

---

## 2.5.5 (May, 29 2023)

### Notes

- Release date: **(May, 29 2023)**
- Supported Terraform version: **v1.x**

### Fixes

- [PR #244](https://github.com/zscaler/terraform-provider-zia/pull/244) Fix ``zia_user_management`` to ensure when the ``auth_methods``attribute is set, and user password is changed, the provide will re-enroll the user to update the password.

## 2.5.4 (May, 25 2023)

### Notes
Expand Down
2 changes: 1 addition & 1 deletion zia/resource_zia_user_management_users.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ func resourceUserManagementUpdate(d *schema.ResourceData, m interface{}) error {
return err
}
authMethods := SetToStringList(d, "auth_methods")
if d.HasChange("auth_methods") && len(authMethods) > 0 {
if (d.HasChange("password") || d.HasChange("auth_methods")) && len(authMethods) > 0 {
_, err := zClient.usermanagement.EnrollUser(id, usermanagement.EnrollUserRequest{
AuthMethods: authMethods,
Password: req.Password,
Expand Down

0 comments on commit a800338

Please sign in to comment.