terraform-provider-azapi icon indicating copy to clipboard operation
terraform-provider-azapi copied to clipboard

Support raw string for the Body on azapi_resource_action

Open mathieu-brousseau opened this issue 1 year ago • 2 comments

Hello,

Now that the body is in HCL, can we remove the validation of the string as a json?

I want to call this action on the runbook: https://learn.microsoft.com/en-us/rest/api/automation/runbook-draft/replace-content?view=rest-automation-2023-11-01&tabs=HTTP

The body required to be a simple file content like : body = file("myFile.ps1")

I would have removed this line but not sure about the impacts. https://github.com/Azure/terraform-provider-azapi/blob/66650c8495d270697379ef3abb4f02d4a15b43f7/internal/services/myvalidator/body_validator.go#L28

Thanks for your help.

mathieu-brousseau avatar May 14 '24 16:05 mathieu-brousseau

Hi @mbrousseaufx ,

Thank you for taking time to report this issue!

We'll work on supporting other content-type. Thanks!

ms-henglu avatar May 17 '24 03:05 ms-henglu

Hi,

It would be great if a content file is supported for body. Currently dealing with the same blocker.

Thank you!

peyman-taj avatar Jun 04 '24 19:06 peyman-taj