Open Cyb3r-Jak3 opened 1 year ago
Voting for Prioritization
Volunteering to Work on This Issue
what you're seeing here is a consequence of the service using a HTTP PATCH. as HTTP schemantics for PATCH are (generally) "only modify what changes in the payload" you can't really know what to remove. that is where a PUT request is usually a better choice which gives you the entirety of the resource picture.
@WalshyDev is this something you can address in the service itself when parameters are removed from the env var payloads?
Yeah as mentioned, this is a PATCH not PUT so expected from an API perspective.
imo the service should not change here. { env_vars: { ENV: {} } }
is a lot less explicit than { env_vars: { ENV: null } }
for removal
I'd say that an empty env object is expected to not change (just like an empty root project does not change).
Confirmation
Terraform and Cloudflare provider version
Terraform v1.5.0 on windows_amd64
Affected resource(s)
pages_project
Terraform configuration files
Link to debug output
https://gist.github.com/Cyb3r-Jak3/57af688997416a9027b10f9141076b76
Panic output
No response
Expected output
That deleting the environment variable of
PYTHON_VERSION
removes it from the projectActual output
The variable still set.
Steps to reproduce
Additional factoids
It appears to be an issue with the backend API, as the PATCH request has the variable removed, but the response still has it. Looking at how the dashboard handles it, it sets the variable as a
null
value.References
No response