Bad request with when creating cloudflare_api_shield_schema
resource
#5179
Labels
kind/bug
Categorizes issue or PR as related to a bug.
service/api-shield
Categorizes issue or PR as related to the API shield service.
version/5
Categorizes issue or PR as related to version 5 of the provider.
Confirmation
Terraform and Cloudflare provider version
Terraform v1.10.5
on darwin_arm64
Affected resource(s)
Terraform configuration files
Link to debug output
https://gist.github.com/harrydowe/fb2a163ce6a1cb33a2ca90342b275a83
Panic output
No response
Expected output
I expected the
cloudflare_api_shield_schema
resource to be created successfully.Actual output
The resource was not created and produced a
400: Bad Request
error.Steps to reproduce
main.tf
with the provided configurationterraform apply -auto-approve
Additional factoids
Looking at the logs, I belive the issue is due to the
Content-Disposition
header missing thefilename
directive:I think it should include the
filename
directive:I'm able to successfully perform the request when using Postman and correctly selecting the
file
form param to be File instead of Text. I can also perform the request in my PHP application using curl (Guzzle) and specifying thefilename
for thefile
multipart form param. Omitting this causes a 400 error.Related guzzle code
https://github.com/guzzle/psr7/blob/2.7/src/MultipartStream.php#L127
References
No response
The text was updated successfully, but these errors were encountered: