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 626783f commit 88a98dd
Show file tree
Hide file tree
Showing 2 changed files with 195 additions and 247 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 @@ -1755,6 +1755,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 88a98dd

Please sign in to comment.