Skip to content

Commit

Permalink
Fix acceptance tests
Browse files Browse the repository at this point in the history
  • Loading branch information
timja committed Jan 17, 2020
1 parent 560b7fa commit d67145b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
11 changes: 10 additions & 1 deletion azurerm/internal/services/frontdoor/resource_arm_front_door.go
Original file line number Diff line number Diff line change
Expand Up @@ -832,7 +832,11 @@ func expandArmFrontDoorFrontendEndpoint(input []interface{}, frontDoorPath strin

func expandArmFrontDoorCustomHTTPSConfiguration(input []interface{}) *frontdoor.CustomHTTPSConfiguration {
if len(input) == 0 {
// https://github.com/Azure/azure-sdk-for-go/issues/6882
defaultProtocolType := "ServerNameIndication"

defaultHttpsConfiguration := frontdoor.CustomHTTPSConfiguration{
ProtocolType: &defaultProtocolType,
CertificateSource: frontdoor.CertificateSourceFrontDoor,
CertificateSourceParameters: &frontdoor.CertificateSourceParameters{
CertificateType: frontdoor.Dedicated,
Expand Down Expand Up @@ -1434,7 +1438,12 @@ func flattenArmFrontDoorFrontendEndpointsSubResources(input *[]frontdoor.SubReso
}

func makeCustomHttpsConfiguration(customHttpsConfiguration map[string]interface{}) frontdoor.CustomHTTPSConfiguration {
customHTTPSConfigurationUpdate := frontdoor.CustomHTTPSConfiguration{}
// https://github.com/Azure/azure-sdk-for-go/issues/6882
defaultProtocolType := "ServerNameIndication"

customHTTPSConfigurationUpdate := frontdoor.CustomHTTPSConfiguration{
ProtocolType: &defaultProtocolType,
}

if customHttpsConfiguration["certificate_source"].(string) == "AzureKeyVault" {
vaultSecret := customHttpsConfiguration["azure_key_vault_certificate_secret_name"].(string)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ custom_rule {
return fmt.Sprintf(`
resource "azurerm_resource_group" "test" {
name = "testAccRG-%d"
location = "%s"
location = "%[2]s"
}
resource "azurerm_frontdoor_firewall_policy" "test" {
Expand Down Expand Up @@ -272,7 +272,7 @@ resource "azurerm_frontdoor_firewall_policy" "test" {
}
}
%s
%[3]s
managed_rule {
type = "DefaultRuleSet"
Expand Down

0 comments on commit d67145b

Please sign in to comment.