Removing custom attributes from empty list on Access apps doesn't work #3986
Labels
kind/bug
Categorizes issue or PR as related to a bug.
needs-triage
Indicates an issue or PR lacks a `triage/foo` label and requires one.
triage/debug-log-attached
Indicates an issue or PR has a complete Terraform debug log.
Milestone
Confirmation
Terraform and Cloudflare provider version
Affected resource(s)
cloudflare_access_application
Terraform configuration files
Link to debug output
https://gist.github.com/BSFishy/ee9a8dd363f2d7c84ec0d7aab1c5415c
Panic output
No response
Expected output
When there are no custom attributes (or custom claims for OIDC apps), the attributes or claims should be removed.
Actual output
The attributes/claims are not removed.
Steps to reproduce
Additional factoids
The offending logic is found here:
terraform-provider-cloudflare/internal/sdkv2provider/schema_cloudflare_access_application.go
Lines 900 to 904 in 6f7d8d0
This logic was introduced in a PR (#3713) that updated cloudflare-go to a version where this issue may be resolved (providing nil doesn't touch the data, providing a slice sets the data to the slice), however this logic was originally misimplemented.
References
No response
The text was updated successfully, but these errors were encountered: