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

Error in mist_org_alarmtemplate resource nested schema for rules.delivery #63

Closed
nunopp opened this issue Dec 5, 2024 · 19 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@nunopp
Copy link

nunopp commented Dec 5, 2024

Describe the bug

rules.delivery attribute seems not working

To Reproduce

Steps to reproduce the behavior:

  1. Create, update or refresh '.....' resource or datasource
  2. Configure the resource/datasource with the following HCL configuration (paste the HCL configuration, remove any sensitive information)
    resource "mist_org_alarmtemplate" "alarmtemplate_one" {
    org_id = var.xxx_org
    name = "Alarm_Template_1"
    delivery = {
    enabled = true
    to_org_admins = false
    additional_emails = [ omitted emails ]
    }
    rules = {
    dhcp_failure : {
    enabled : true
    delivery : {
    enabled : true
    }

    }
    }
  3. Use Terraform Apply / Refresh / ... command
  4. See error

Expected behavior

Should enable the alarm delivery via email (alarm notification via email)

Error Message

When applying changes to mist_org_alarmtemplate.alarmtemplate_one, provider "provider["registry.terraform.io/juniper/mist"]" produced an unexpected new value:
.rules["dhcp_failure"].delivery.additional_emails: was null, but now cty.ListValEmpty(cty.String).

Software

  • OS: [ Windows]
  • Terraform Version [ v1.9.7]
  • Provider Version [ v0.2.11]

Additional context

Add any other context about the problem here.

@nunopp nunopp added the bug Something isn't working label Dec 5, 2024
tmunzer added a commit that referenced this issue Dec 6, 2024
@nunopp
Copy link
Author

nunopp commented Dec 11, 2024

Hi Thomas @tmunzer , when this can be added to a new release?
Thank you

@tmunzer
Copy link
Collaborator

tmunzer commented Dec 11, 2024

Hi @nunopp ,
Sorry, there is some changes I would like to include into the next version. I'll make sure to release a new version end of this week with the fix for this issue.

Best regards

@tmunzer
Copy link
Collaborator

tmunzer commented Dec 13, 2024

Hi @nunopp,

Version v0.2.12 has been published with the fix.

Best regards

@nunopp
Copy link
Author

nunopp commented Dec 13, 2024

Hi @tmunzer , after the upgrade when doing the apply I've got errors (mainly for attributes = null) on the resource mist_org_wlan, some examples:
...produced an unexpected new value: .dns_server_rewrite.radius_groups: was cty.MapValEmpty(cty.String), but now null
...produced an unexpected new value: .ap_ids: was null, but now cty.ListValEmpty(cty.String).
...produced an unexpected new value: .app_limit.apps: was cty.MapValEmpty(cty.Number), but now null.
any thoughts?

@tmunzer
Copy link
Collaborator

tmunzer commented Dec 13, 2024

Yes, this should occur only during the first config sync because some default values have been updated.
Let me know if you are seeing it afterward.

@tmunzer
Copy link
Collaborator

tmunzer commented Dec 13, 2024

For information, I added a release note page in the Provider documentation.
It is listing all the default value changes that have been added to this release (none will impact the configuration deployed on the APs)

@nunopp
Copy link
Author

nunopp commented Dec 13, 2024

image
it is still stating these changes but I'm unable to apply cause it gives error results ("Error: Provider produced inconsistent result after apply") examples of the ones provided above. What do you suggest to do?

@tmunzer
Copy link
Collaborator

tmunzer commented Dec 18, 2024

Sorry for the late reply @nunopp, I'll work on it

@tmunzer
Copy link
Collaborator

tmunzer commented Dec 20, 2024

Hi @nunopp,

I just released v0.2.13. Can you test it?

Thanks

@nunopp
Copy link
Author

nunopp commented Dec 20, 2024

Hi @tmunzer , plugin crashed
image

Thanks

@tmunzer
Copy link
Collaborator

tmunzer commented Dec 20, 2024

Sorry for that, I just released v0.2.14 which should fix this issue

@nunopp
Copy link
Author

nunopp commented Jan 2, 2025

Hi @tmunzer, sorry to not come back earlier, I'm back now. So in applying the last version (0.2.15) I'm getting Errors in the following resources:

mist_org_wlan for dynamic_vlan.default_vlan_ids: "produced an unexpected new value: .dynamic_vlan.default_vlan_ids[0]: was cty.StringVal("555"), but now cty.StringVal("0x630b030") "
mist_org_psk for vlan_id: "produced an unexpected new value: .vlan_id: was cty.StringVal("555"), but now cty.StringVal("0x6430088").

can you please help?
Thanks

@tmunzer
Copy link
Collaborator

tmunzer commented Jan 2, 2025

Hi @nunopp , no problem.
I just fixed the issue (there was a change in the Go SDK and I missed some places where to update the code).
The new version should be better.

Can you check?
Thanks.

@nunopp
Copy link
Author

nunopp commented Jan 2, 2025

@tmunzer however I've noticed that it works with vs 0.2.14, only when moving to 0.2.15 the above errors are triggered

@tmunzer
Copy link
Collaborator

tmunzer commented Jan 2, 2025

yes, I updated the Go SDK in-between (mostly because of fixes in the OpenAPI Spec used to generate the SDK, but it also bring some other changes in the SDK), which introduced this change.
I updated the required code in 0.2.15, but it seems I missed this part.

@nunopp
Copy link
Author

nunopp commented Jan 2, 2025

@tmunzer with version 0.2.16 I'm still getting the errors for mist_org_psk for vlan_id, however seems fixed for mist_org_wlan> dynamic_vlan.default_vlan_ids

@tmunzer
Copy link
Collaborator

tmunzer commented Jan 2, 2025

sorry for that. I just released a new version fixing this issue.

@nunopp
Copy link
Author

nunopp commented Jan 2, 2025

@tmunzer the new version 0.2.17 apparently fixed all the errors, thank you!
Also I confirm the initial issue is also working (Error in mist_org_alarmtemplate resource nested schema for rules.delivery)
Thanks a lot for this!
Regards

@tmunzer
Copy link
Collaborator

tmunzer commented Jan 2, 2025

Thanks for the confirmation. I'm closing this issue.

@tmunzer tmunzer closed this as completed Jan 2, 2025
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
None yet
Development

No branches or pull requests

2 participants