Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

azurerm_api_management_api_schema adding double quotes to already json formatted value #26515

Open
1 task done
manuel9nunez opened this issue Jul 1, 2024 · 2 comments 路 May be fixed by #26531
Open
1 task done

azurerm_api_management_api_schema adding double quotes to already json formatted value #26515

manuel9nunez opened this issue Jul 1, 2024 · 2 comments 路 May be fixed by #26531

Comments

@manuel9nunez
Copy link

manuel9nunez commented Jul 1, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Community Note

  • Please vote on this issue by adding a 馃憤 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave comments along the lines of "+1", "me too" or "any updates", they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment and review the contribution guide to help.

Terraform Version

1.9.0

AzureRM Provider Version

3.109.0

Affected Resource(s)/Data Source(s)

azurerm_api_management_api_schema

Terraform Configuration Files

resource "azurerm_api_management_api_schema" "my_schema" {
  api_name            = azurerm_api_management_api.api.name
  api_management_name = azurerm_api_management_api.api.api_management_name
  resource_group_name = azurerm_api_management_api.api.resource_group_name
  schema_id           = "my_schema"
  content_type        = "application/vnd.oai.openapi.components+json"
  components             =  file("${path.module}/contracts/Request.json")
}

Debug Output/Panic Output

No errors

Expected Behaviour

Looking at another schema created by the UI
image

Actual Behaviour

This is the result wiht the one created in terraform
image

Steps to Reproduce

1.terraform apply

Important Factoids

Running in Azure Pipeline/local pointing to Azure US same result

References

#3980

@teowa
Copy link
Contributor

teowa commented Jul 5, 2024

Hi @manuel9nunez , thanks for submitting this issue!
I am working on a PR to fix this. I can make API schema created by Terraform looks like in the first provided screenshot, but I am unable to find any documents on how to create the API schema on Azure Portal, so I am unable to validate my PR really work in real scenario. Do you know how I can play with some demo of API schema, so that I can validate my PR really fix the issue?

@manuel9nunez
Copy link
Author

Sure heres some examples you should be able to spin up a free tiered one

https://learn.microsoft.com/en-us/azure/api-management/add-api-manually

Here they show how to create the representation in the UI

https://learn.microsoft.com/en-us/azure/api-management/mock-api-responses?tabs=azure-portal

@rcskosir rcskosir added the bug label Jul 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants