Skip to content

Commit

Permalink
resource_arm_application_gateways: set disabledSSLPolicies primarly w…
Browse files Browse the repository at this point in the history
…ith ssl_policy.disabled_protocols
  • Loading branch information
bs-matil committed May 10, 2019
1 parent 7500bde commit 93dd859
Show file tree
Hide file tree
Showing 2 changed files with 373 additions and 148 deletions.
3 changes: 3 additions & 0 deletions azurerm/resource_arm_application_gateway.go
Original file line number Diff line number Diff line change
Expand Up @@ -1722,6 +1722,9 @@ func expandApplicationGatewaySslPolicy(d *schema.ResourceData) *network.Applicat
v := vs[0].(map[string]interface{})
policyType := network.ApplicationGatewaySslPolicyType(v["policy_type"].(string))

// reset disabledSSLPolicies here to always use the new disabled_protocols block in favor of disabled_ssl_protocols
disabledSSLPolicies = disabledSSLPolicies[:0]

for _, policy := range v["disabled_protocols"].([]interface{}) {
disabledSSLPolicies = append(disabledSSLPolicies, network.ApplicationGatewaySslProtocol(policy.(string)))
}
Expand Down
Loading

0 comments on commit 93dd859

Please sign in to comment.