Skip to content

Multipart/form-data with File upload does not work with Pulumi #611

@frank-bee

Description

@frank-bee

Describe what happened

How to reproduce

  1. single-step API test with multipart/form-data manually with the datadog GUI ( with file upload !)
  2. import it to a pulumi stack
  3. run pulumi up
    --> see error below

Sample program

Log output

Error:

  • error updating synthetics API test from /api/v1/synthetics/tests/api/7z6-tpu-dcr: 400 Bad Request: {"errors":["'request' value '{'allow_insecure': True, 'body': '', 'bodyType': 'multipart/form-data', 'follow_redirects': False, 'headers': {'Authorization': '*** BPC_PROD_API_TETRLB_KEY }}', 'content-type': 'multipart/form-data; boundary="DatadogSyntheticsFiles"'}, 'httpVersion': 'any', 'method': 'POST', 'noSavingResponseBody': False, 'persistCookies': False, 'timeout': 0, 'url': '{{ BASEURL }}/namespaces/{{ NAMESPACE_ID }}/configs/{{ CONFIG_ID }}/files'}' is invalid"]}

Affected Resource(s)

No response

Output of pulumi about

Additional context

Datadog support wrote

However, when testing with Pulumi, both our team and Pulumi's engineers encountered the same issue you described, where request_file was not recognized. This issue requires further investigation.

Contributing

Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

Metadata

Metadata

Assignees

No one assigned

    Labels

    awaiting-feedbackBlocked on input from the authorkind/bugSome behavior is incorrect or out of spec

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions