Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade azure-sdk-for-go to v38.1.0 and frontdoor to 2019-11-01 #5385

Merged
merged 5 commits into from
Jan 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion azurerm/internal/services/frontdoor/client/client.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package client

import (
"github.com/Azure/azure-sdk-for-go/services/frontdoor/mgmt/2019-04-01/frontdoor"
"github.com/Azure/azure-sdk-for-go/services/frontdoor/mgmt/2019-11-01/frontdoor"
"github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/common"
)

Expand Down
2 changes: 1 addition & 1 deletion azurerm/internal/services/frontdoor/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"strings"

"github.com/Azure/azure-sdk-for-go/services/frontdoor/mgmt/2019-04-01/frontdoor"
"github.com/Azure/azure-sdk-for-go/services/frontdoor/mgmt/2019-11-01/frontdoor"
)

func VerifyBackendPoolExists(backendPoolName string, backendPools []interface{}) error {
Expand Down
12 changes: 9 additions & 3 deletions azurerm/internal/services/frontdoor/resource_arm_front_door.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"log"
"time"

"github.com/Azure/azure-sdk-for-go/services/frontdoor/mgmt/2019-04-01/frontdoor"
"github.com/Azure/azure-sdk-for-go/services/frontdoor/mgmt/2019-11-01/frontdoor"
"github.com/hashicorp/go-azure-helpers/response"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/helper/validation"
Expand Down Expand Up @@ -832,8 +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: frontdoor.ServerNameIndication,
ProtocolType: &defaultProtocolType,
CertificateSource: frontdoor.CertificateSourceFrontDoor,
CertificateSourceParameters: &frontdoor.CertificateSourceParameters{
CertificateType: frontdoor.Dedicated,
Expand Down Expand Up @@ -1435,8 +1438,11 @@ func flattenArmFrontDoorFrontendEndpointsSubResources(input *[]frontdoor.SubReso
}

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

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

if customHttpsConfiguration["certificate_source"].(string) == "AzureKeyVault" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"log"
"time"

"github.com/Azure/azure-sdk-for-go/services/frontdoor/mgmt/2019-04-01/frontdoor"
"github.com/Azure/azure-sdk-for-go/services/frontdoor/mgmt/2019-11-01/frontdoor"
"github.com/hashicorp/go-azure-helpers/response"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/helper/validation"
Expand Down Expand Up @@ -180,18 +180,18 @@ func resourceArmFrontDoorFirewallPolicy() *schema.Resource {
Type: schema.TypeString,
Required: true,
ValidateFunc: validation.StringInSlice([]string{
string(frontdoor.Any),
string(frontdoor.BeginsWith),
string(frontdoor.Contains),
string(frontdoor.EndsWith),
string(frontdoor.Equal),
string(frontdoor.GeoMatch),
string(frontdoor.GreaterThan),
string(frontdoor.GreaterThanOrEqual),
string(frontdoor.IPMatch),
string(frontdoor.LessThan),
string(frontdoor.LessThanOrEqual),
string(frontdoor.RegEx),
string(frontdoor.OperatorAny),
string(frontdoor.OperatorBeginsWith),
string(frontdoor.OperatorContains),
string(frontdoor.OperatorEndsWith),
string(frontdoor.OperatorEqual),
string(frontdoor.OperatorGeoMatch),
string(frontdoor.OperatorGreaterThan),
string(frontdoor.OperatorGreaterThanOrEqual),
string(frontdoor.OperatorIPMatch),
string(frontdoor.OperatorLessThan),
string(frontdoor.OperatorLessThanOrEqual),
string(frontdoor.OperatorRegEx),
}, false),
},

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
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test must have been failing before this PR, this was passing in the region text before, in my case "West Europe" was randomly being placed in the resource body


managed_rule {
type = "DefaultRuleSet"
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module github.com/terraform-providers/terraform-provider-azurerm

require (
github.com/Azure/azure-sdk-for-go v38.0.0+incompatible
github.com/Azure/azure-sdk-for-go v38.1.0+incompatible
github.com/Azure/go-autorest/autorest v0.9.3
github.com/Azure/go-autorest/autorest/date v0.2.0
github.com/apparentlymart/go-dump v0.0.0-20190214190832-042adf3cf4a0 // indirect
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ contrib.go.opencensus.io/exporter/ocagent v0.5.0/go.mod h1:ImxhfLRpxoYiSq891pBrL
github.com/Azure/azure-sdk-for-go v21.3.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
github.com/Azure/azure-sdk-for-go v32.5.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
github.com/Azure/azure-sdk-for-go v35.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
github.com/Azure/azure-sdk-for-go v38.0.0+incompatible h1:3D2O4g8AwDwyWkM1HpMFVux/ccQJmGJHXsE004Wsu1Q=
github.com/Azure/azure-sdk-for-go v38.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
github.com/Azure/azure-sdk-for-go v38.1.0+incompatible h1:5AawcyRJqShKENbdf2ZWJsdOnr+dEt6bz91YStCUmT4=
github.com/Azure/azure-sdk-for-go v38.1.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
github.com/Azure/go-autorest v10.15.4+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24=
github.com/Azure/go-autorest v13.0.0+incompatible h1:56c11ykhsFSPNNQuS73Ri8h/ezqVhr2h6t9LJIEKVO0=
github.com/Azure/go-autorest v13.0.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24=
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading