Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

eun aup import issue #254

Closed
2 tasks done
snowman386 opened this issue Jan 31, 2025 · 1 comment · Fixed by #257
Closed
2 tasks done

eun aup import issue #254

snowman386 opened this issue Jan 31, 2025 · 1 comment · Fixed by #257
Assignees
Labels
bug Something isn't working

Comments

@snowman386
Copy link

Confirmation

  • My issue isn't already found on the issue tracker.
  • I have replicated my issue using the latest version of the library and it is still present.

zscaler-terraformer version

time="2025-01-31T10:09:53-05:00" level=error msg="failed to exec to git" time="2025-01-31T10:09:53-05:00" level=error msg="failed to exec to git" zscaler-terraformer -dev+ Terraform version: Terraform v1.10.5 on (windows_amd64) Your version of Zscaler-Terraformer is out of date! The latest version is v2.0.0. You can update by running the command "choco upgrade zscaler-terraformer" or download the new version from https://github.com/zscaler/zscaler-terraformer/releases

Expected outcome

Expect to be able to apply imported EUN config without modification. There appears to be an issue with the terraform module not supporting 0 values which the api clearly supports. However, the terraformer tool is setting aup_custom_frequency = 0 when aupCustomFrequency is not returned in the REST. Feel free to close if you want to handle it entirely in the ZIA terraform module.

Actual outcome

Getting the following error when running terraform plan:

│ Error: expected aup_custom_frequency to be in the range (1 - 180), got 0
│
│   with zia_end_user_notification.resource_zia_end_user_notification_enduser_notification,
│   on zia_end_user_notification.tf line 3, in resource "zia_end_user_notification" "resource_zia_end_user_notification_enduser_notification":
│    3:   aup_custom_frequency                     = 0
│
╵
╷
│ Error: expected aup_day_offset to be in the range (1 - 31), got 0
│
│   with zia_end_user_notification.resource_zia_end_user_notification_enduser_notification,
│   on zia_end_user_notification.tf line 4, in resource "zia_end_user_notification" "resource_zia_end_user_notification_enduser_notification":
│    4:   aup_day_offset                           = 0
│

This is the imported aup settings:

  aup_custom_frequency                     = 0
  aup_day_offset                           = 0
  aup_frequency                            = "NEVER"
  aup_message                              = ""

This is the REST:
"aupFrequency": "NEVER", "aupDayOffset": 0, "aupMessage": "",

Steps to reproduce

  1. zscaler-terraformer import --resources="zia"
  2. terraform plan

References

zscaler/terraform-provider-zia#387

@willguibr willguibr self-assigned this Jan 31, 2025
@willguibr willguibr added the bug Something isn't working label Jan 31, 2025
@willguibr willguibr linked a pull request Jan 31, 2025 that will close this issue
9 tasks
@willguibr
Copy link
Member

@snowman386 Issue is now fixed in the minor release v2.0.1

Zscaler DevRel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: 🚀 Shipped
Development

Successfully merging a pull request may close this issue.

2 participants