Skip to content

Commit

Permalink
azurerm_api_management_api`wsdl_selector is required when content_f…
Browse files Browse the repository at this point in the history
…ormat = "wsdl" (#7076)

Fix #6795
  • Loading branch information
yupwei68 committed Jun 11, 2020
1 parent 2a15587 commit 62c16c1
Showing 1 changed file with 6 additions and 0 deletions.
Expand Up @@ -258,6 +258,12 @@ func resourceArmApiManagementApiCreateUpdate(d *schema.ResourceData, meta interf
},
}
wsdlSelectorVs := importV["wsdl_selector"].([]interface{})

//`wsdl_selector` is necessary under format `wsdl`
if len(wsdlSelectorVs) == 0 && contentFormat == string(apimanagement.Wsdl) {
return fmt.Errorf("`wsdl_selector` is required when content format is `wsdl` in API Management API %q", name)
}

if len(wsdlSelectorVs) > 0 {
wsdlSelectorV := wsdlSelectorVs[0].(map[string]interface{})
wSvcName := wsdlSelectorV["service_name"].(string)
Expand Down

0 comments on commit 62c16c1

Please sign in to comment.