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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

azurerm_api_management_api soap_pass_through does not work when importing WSDL #5080

Closed
tnicolaysen opened this issue Dec 5, 2019 · 1 comment · Fixed by #5081
Closed

Comments

@tnicolaysen
Copy link
Contributor

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 "+1" or "me too" comments, 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

Terraform (and AzureRM Provider) Version

Terraform v0.12.16
azurerm v1.37.0 (and older)

Affected Resource(s)

  • azurerm_api_management_api

Terraform Configuration Files

resource "azurerm_api_management_api" "submitter" {  
  api_management_name = "..."
  resource_group_name = "..."
  
  display_name = "Some display name"  
  name = "some-name"  
  path = "some-path"  
  protocols = ["https"]  
  revision = "1"  
  service_url = "https://example.org"  
  soap_pass_through = true  
  
 import {  
  content_format = "wsdl"  
  content_value = <<XML 
        [WSDL goes here]
     XML
  }
}

Debug Output

Omitted, but I have a trace log of the bug and a working version - if needed.

Panic Output

No panic.

Expected Behavior

Expect a new Azure API Management API to be created with SOAP pass-through.
The property soap_pass_through is set to true in the state file, but that does not mean that the end-result is correct.
The correct property is not sent to the Azure REST API when the WSDL is sent in (during the import phase), meaning that the generated API operations are the same as having soap_pass_through=false.

Actual Behavior

The API operations are not created as expected with soap_pass_through=true. If you try to create a API in API Management and choose "Import WSDL" and "SOAP pass-through", none of the operations will not have any policies.
Instead, all endpoints are generated with policies that transform from JSON to XML and vice verca - the behavior that is expected if you do not choose SOAP pass-through.

Steps to Reproduce

Use the configuration above and create a API in an existing API Management instance.

Important Factoids

I have found the bug and fixed it. I have verified it by building my own version of the provider and testing it.
PR is coming.

References

None. I will submit a PR later.

tnicolaysen added a commit to tnicolaysen/terraform-provider-azurerm that referenced this issue Dec 5, 2019
I am not completely sure if the modified block (line 222-229) is 100 % correct.
Not sure if there can be other combinations of those properties.

The change has been tested and verified locally for both soap_pass_through = true and false

Fixes hashicorp#5080
Details in PR
katbyte pushed a commit that referenced this issue Dec 19, 2019
I am not completely sure if the modified block (line 222-229) is 100 % correct.
Not sure if there can be other combinations of those properties.

The change has been tested and verified locally for both soap_pass_through = true and false

Fixes #5080
Details in PR
@ghost
Copy link

ghost commented Mar 29, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks!

@ghost ghost locked and limited conversation to collaborators Mar 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
2 participants