Skip to content

Commit

Permalink
Merge pull request #9296 from knutwannheden/master
Browse files Browse the repository at this point in the history
Use Rawxml format for global API policies string
  • Loading branch information
tombuildsstuff authored Nov 19, 2020
2 parents 6d26eb5 + 2722989 commit 3ae4f83
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import (
"github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/clients"
"github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/apimanagement/parse"
"github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/tags"
"github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/tf/suppress"
"github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/timeouts"
"github.com/terraform-providers/terraform-provider-azurerm/azurerm/utils"
)
Expand Down Expand Up @@ -359,7 +358,7 @@ func resourceArmApiManagementService() *schema.Resource {
Optional: true,
Computed: true,
ConflictsWith: []string{"policy.0.xml_link"},
DiffSuppressFunc: suppress.XmlDiff,
DiffSuppressFunc: XmlWithDotNetInterpolationsDiffSuppress,
},

"xml_link": {
Expand Down Expand Up @@ -1345,7 +1344,7 @@ func expandApiManagementPolicies(input []interface{}) (*apimanagement.PolicyCont
if xmlContent != "" {
return &apimanagement.PolicyContract{
PolicyContractProperties: &apimanagement.PolicyContractProperties{
Format: apimanagement.XML,
Format: apimanagement.Rawxml,
Value: utils.String(xmlContent),
},
}, nil
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -625,6 +625,7 @@ resource "azurerm_api_management" "test" {
xml_content = <<XML
<policies>
<inbound>
<set-variable name="abc" value="@(context.Request.Headers.GetValueOrDefault("X-Header-Name", ""))" />
<find-and-replace from="xyz" to="abc" />
</inbound>
</policies>
Expand Down

0 comments on commit 3ae4f83

Please sign in to comment.