Skip to content

Commit

Permalink
Merge branch 'main' into ticket-13229868-servicebus-namespace-support…
Browse files Browse the repository at this point in the history
…s-cmk
  • Loading branch information
ms-henglu committed Feb 28, 2022
2 parents 4182082 + f232d0a commit 4f0cd66
Show file tree
Hide file tree
Showing 432 changed files with 919 additions and 898 deletions.
25 changes: 16 additions & 9 deletions CHANGELOG.md
@@ -1,21 +1,28 @@
## 2.98.0 (Unreleased)
## 2.99.0 (Unreleased)

ENHANCEMENTS:

* dependencies: upgrading to `v61.6.0` of `github.com/Azure/azure-sdk-for-go` [GH-15604]

## 2.98.0 (February 25, 2022)

FEATURES:

* New Beta Resource: `azurerm_function_app_active_slot` [GH-15246]
* New Beta Resource: `azurerm_web_app_active_slot` [GH-15246]
* New Beta Resource: `azurerm_function_app_active_slot` ([#15246](https://github.com/hashicorp/terraform-provider-azurerm/issues/15246))
* New Beta Resource: `azurerm_web_app_active_slot` ([#15246](https://github.com/hashicorp/terraform-provider-azurerm/issues/15246))

ENHANCEMENTS:

* dependencies: upgrading to `v0.18.0` of `github.com/tombuildsstuff/giovanni` [GH-15507]
* `azurerm_linux_function_app` - adds `key_vault_reference_identity_id` support [GH-15553]
* `azurerm_linux_function_app_slot` - adds `key_vault_reference_identity_id` support [GH-15553]
* `azurerm_windows_function_app` - adds `key_vault_reference_identity_id` support [GH-15553]
* `azurerm_windows_function_app_slot` - adds `key_vault_reference_identity_id` support [GH-15553]
* dependencies: upgrading to `v0.18.0` of `github.com/tombuildsstuff/giovanni` ([#15507](https://github.com/hashicorp/terraform-provider-azurerm/issues/15507))
* `azurerm_linux_function_app` - adds `key_vault_reference_identity_id` support ([#15553](https://github.com/hashicorp/terraform-provider-azurerm/issues/15553))
* `azurerm_linux_function_app_slot` - adds `key_vault_reference_identity_id` support ([#15553](https://github.com/hashicorp/terraform-provider-azurerm/issues/15553))
* `azurerm_windows_function_app` - adds `key_vault_reference_identity_id` support ([#15553](https://github.com/hashicorp/terraform-provider-azurerm/issues/15553))
* `azurerm_windows_function_app_slot` - adds `key_vault_reference_identity_id` support ([#15553](https://github.com/hashicorp/terraform-provider-azurerm/issues/15553))

BUG FIXES:

* `azurerm_firewall_policy` - wait for completion after calling create [GH-15561]
* `azurerm_cosmosdb_mongo_collection` - can now set the `autoscale_settings` property without setting a `shard_key` when creating a cosmos DB mongo collection ([#15529](https://github.com/hashicorp/terraform-provider-azurerm/issues/15529))
* `azurerm_firewall_policy` - will not wait for resource to finish provisioning after creation ([#15561](https://github.com/hashicorp/terraform-provider-azurerm/issues/15561))

## 2.97.0 (February 18, 2022)

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Expand Up @@ -2,7 +2,7 @@ module github.com/hashicorp/terraform-provider-azurerm

require (
cloud.google.com/go/storage v1.16.0 // indirect
github.com/Azure/azure-sdk-for-go v61.4.0+incompatible
github.com/Azure/azure-sdk-for-go v61.6.0+incompatible
github.com/Azure/go-autorest/autorest v0.11.22
github.com/Azure/go-autorest/autorest/date v0.3.0
github.com/Azure/go-autorest/autorest/to v0.4.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Expand Up @@ -45,8 +45,8 @@ dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7
github.com/Azure/azure-sdk-for-go v45.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
github.com/Azure/azure-sdk-for-go v56.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
github.com/Azure/azure-sdk-for-go v59.2.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
github.com/Azure/azure-sdk-for-go v61.4.0+incompatible h1:BF2Pm3aQWIa6q9KmxyF1JYKYXtVw67vtvu2Wd54NGuY=
github.com/Azure/azure-sdk-for-go v61.4.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
github.com/Azure/azure-sdk-for-go v61.6.0+incompatible h1:jdHWEqRK9boUrdUPIWDE9dKLmxbHmz+PFk3jRQ9s1C0=
github.com/Azure/azure-sdk-for-go v61.6.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
github.com/Azure/go-autorest v14.2.0+incompatible h1:V5VMDjClD3GiElqLWO7mz2MxNAK/vTfRHdAubSIPRgs=
github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24=
github.com/Azure/go-autorest/autorest v0.11.3/go.mod h1:JFgpikqFJ/MleTTxwepExTKnFUKKszPS8UavbQYUMuw=
Expand Down
1 change: 1 addition & 0 deletions helpers/azure/resource_group.go
Expand Up @@ -28,6 +28,7 @@ func SchemaResourceGroupNameDiffSuppress() *pluginsdk.Schema {
}
}

// Deprecated: use `commonschema.ResourceGroupNameForDataSource()` instead
func SchemaResourceGroupNameForDataSource() *pluginsdk.Schema {
return &pluginsdk.Schema{
Type: pluginsdk.TypeString,
Expand Down
6 changes: 0 additions & 6 deletions helpers/validate/uuid.go

This file was deleted.

7 changes: 7 additions & 0 deletions internal/acceptance/check/that.go
Expand Up @@ -123,6 +123,13 @@ func (t thatWithKeyType) IsSet() pluginsdk.TestCheckFunc {
return resource.TestCheckResourceAttrSet(t.resourceName, t.key)
}

// IsUUID returns a TestCheckFunc which validates that the value for the specified key
// is a UUID.
func (t thatWithKeyType) IsUUID() pluginsdk.TestCheckFunc {
var uuidRegex = regexp.MustCompile("^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4[a-fA-F0-9]{3}-[8|9|aA|bB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$")
return resource.TestMatchResourceAttr(t.resourceName, t.key, uuidRegex)
}

// HasValue returns a TestCheckFunc which validates that the specific key has the
// specified value on the resource
func (t thatWithKeyType) HasValue(value string) pluginsdk.TestCheckFunc {
Expand Down
3 changes: 3 additions & 0 deletions internal/common/client_options.go
Expand Up @@ -63,6 +63,9 @@ func setUserAgent(client *autorest.Client, tfVersion, partnerID string, disableT
tfUserAgent := fmt.Sprintf("HashiCorp Terraform/%s (+https://www.terraform.io) Terraform Plugin SDK/%s", tfVersion, meta.SDKVersionString())

providerUserAgent := fmt.Sprintf("%s terraform-provider-azurerm/%s", tfUserAgent, version.ProviderVersion)
if features.ThreePointOhBeta() { // TODO: remove in 3.0
providerUserAgent = fmt.Sprintf("%s terraform-provider-azurerm/%s+3.0-beta", tfUserAgent, version.ProviderVersion)
}
client.UserAgent = strings.TrimSpace(fmt.Sprintf("%s %s", client.UserAgent, providerUserAgent))

// append the CloudShell version to the user agent if it exists
Expand Down
17 changes: 0 additions & 17 deletions internal/location/normalize.go

This file was deleted.

65 changes: 0 additions & 65 deletions internal/location/normalize_test.go

This file was deleted.

30 changes: 0 additions & 30 deletions internal/location/schema.go

This file was deleted.

4 changes: 2 additions & 2 deletions internal/sdk/README.md
Expand Up @@ -30,7 +30,7 @@ import (
"github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2020-06-01/resources"
"github.com/hashicorp/go-azure-helpers/lang/response"
"github.com/hashicorp/terraform-provider-azurerm/internal/location"
"github.com/hashicorp/go-azure-helpers/resourcemanager/location"
"github.com/hashicorp/terraform-provider-azurerm/internal/sdk"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/resource/parse"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/resource/validate"
Expand All @@ -55,7 +55,7 @@ func (r ResourceGroupResource) Arguments() map[string]*pluginsdk.Schema {
Required: true,
},
"location": location.Schema(),
"location": commonschema.Location(),
"tags": tags.Schema(),
}
Expand Down
4 changes: 2 additions & 2 deletions internal/services/aadb2c/aadb2c_directory_data_source.go
Expand Up @@ -6,7 +6,7 @@ import (
"net/http"
"time"

"github.com/hashicorp/terraform-provider-azurerm/helpers/azure"
"github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema"
"github.com/hashicorp/terraform-provider-azurerm/internal/sdk"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/aadb2c/sdk/2021-04-01-preview/tenants"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/aadb2c/validate"
Expand Down Expand Up @@ -51,7 +51,7 @@ func (r AadB2cDirectoryDataSource) Arguments() map[string]*pluginsdk.Schema {
ValidateFunc: validation.StringIsNotEmpty,
},

"resource_group_name": azure.SchemaResourceGroupNameForDataSource(),
"resource_group_name": commonschema.ResourceGroupNameForDataSource(),
}
}

Expand Down
Expand Up @@ -9,13 +9,13 @@ import (

"github.com/hashicorp/go-azure-helpers/lang/response"
"github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema"
"github.com/hashicorp/go-azure-helpers/resourcemanager/location"
"github.com/hashicorp/go-azure-helpers/resourcemanager/tags"
"github.com/hashicorp/terraform-provider-azurerm/helpers/azure"
"github.com/hashicorp/terraform-provider-azurerm/helpers/tf"
azValidate "github.com/hashicorp/terraform-provider-azurerm/helpers/validate"
"github.com/hashicorp/terraform-provider-azurerm/internal/clients"
"github.com/hashicorp/terraform-provider-azurerm/internal/features"
"github.com/hashicorp/terraform-provider-azurerm/internal/location"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/analysisservices/sdk/2017-08-01/servers"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/analysisservices/validate"
"github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk"
Expand Down
Expand Up @@ -5,7 +5,7 @@ import (
"time"

"github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2021-08-01/apimanagement"
"github.com/hashicorp/terraform-provider-azurerm/helpers/azure"
"github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema"
"github.com/hashicorp/terraform-provider-azurerm/internal/clients"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/apimanagement/parse"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/apimanagement/schemaz"
Expand Down Expand Up @@ -33,7 +33,7 @@ func dataSourceApiManagementApi() *pluginsdk.Resource {

"api_management_name": schemaz.SchemaApiManagementDataSourceName(),

"resource_group_name": azure.SchemaResourceGroupNameForDataSource(),
"resource_group_name": commonschema.ResourceGroupNameForDataSource(),

"revision": {
Type: pluginsdk.TypeString,
Expand Down
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"time"

"github.com/hashicorp/terraform-provider-azurerm/helpers/azure"
"github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema"
"github.com/hashicorp/terraform-provider-azurerm/internal/clients"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/apimanagement/parse"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/apimanagement/schemaz"
Expand All @@ -24,7 +24,7 @@ func dataSourceApiManagementApiVersionSet() *pluginsdk.Resource {
Schema: map[string]*pluginsdk.Schema{
"name": schemaz.SchemaApiManagementChildDataSourceName(),

"resource_group_name": azure.SchemaResourceGroupNameForDataSource(),
"resource_group_name": commonschema.ResourceGroupNameForDataSource(),

"api_management_name": schemaz.SchemaApiManagementDataSourceName(),

Expand Down
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"time"

"github.com/hashicorp/terraform-provider-azurerm/helpers/azure"
"github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema"
"github.com/hashicorp/terraform-provider-azurerm/internal/clients"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/apimanagement/parse"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/apimanagement/schemaz"
Expand All @@ -24,7 +24,7 @@ func dataSourceApiManagementGroup() *pluginsdk.Resource {
Schema: map[string]*pluginsdk.Schema{
"name": schemaz.SchemaApiManagementChildDataSourceName(),

"resource_group_name": azure.SchemaResourceGroupNameForDataSource(),
"resource_group_name": commonschema.ResourceGroupNameForDataSource(),

"api_management_name": schemaz.SchemaApiManagementDataSourceName(),

Expand Down
Expand Up @@ -7,10 +7,10 @@ import (
"time"

"github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2021-08-01/apimanagement"
"github.com/hashicorp/go-azure-helpers/resourcemanager/location"
"github.com/hashicorp/terraform-provider-azurerm/helpers/azure"
"github.com/hashicorp/terraform-provider-azurerm/helpers/tf"
"github.com/hashicorp/terraform-provider-azurerm/internal/clients"
"github.com/hashicorp/terraform-provider-azurerm/internal/location"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/apimanagement/parse"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/apimanagement/validate"
"github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk"
Expand Down
2 changes: 1 addition & 1 deletion internal/services/apimanagement/api_management_resource.go
Expand Up @@ -13,13 +13,13 @@ import (
"github.com/hashicorp/go-azure-helpers/lang/response"
"github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema"
"github.com/hashicorp/go-azure-helpers/resourcemanager/identity"
"github.com/hashicorp/go-azure-helpers/resourcemanager/location"
"github.com/hashicorp/go-azure-helpers/resourcemanager/zones"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/hashicorp/terraform-provider-azurerm/helpers/azure"
"github.com/hashicorp/terraform-provider-azurerm/helpers/tf"
"github.com/hashicorp/terraform-provider-azurerm/internal/clients"
"github.com/hashicorp/terraform-provider-azurerm/internal/features"
"github.com/hashicorp/terraform-provider-azurerm/internal/location"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/apimanagement/parse"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/apimanagement/schemaz"
apimValidate "github.com/hashicorp/terraform-provider-azurerm/internal/services/apimanagement/validate"
Expand Down
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"time"

"github.com/hashicorp/terraform-provider-azurerm/helpers/azure"
"github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema"
"github.com/hashicorp/terraform-provider-azurerm/internal/clients"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/apimanagement/parse"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/apimanagement/schemaz"
Expand All @@ -26,7 +26,7 @@ func dataSourceApiManagementUser() *pluginsdk.Resource {

"api_management_name": schemaz.SchemaApiManagementDataSourceName(),

"resource_group_name": azure.SchemaResourceGroupNameForDataSource(),
"resource_group_name": commonschema.ResourceGroupNameForDataSource(),

"first_name": {
Type: pluginsdk.TypeString,
Expand Down
Expand Up @@ -6,10 +6,10 @@ import (

"github.com/hashicorp/go-azure-helpers/lang/response"
"github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema"
"github.com/hashicorp/go-azure-helpers/resourcemanager/location"
"github.com/hashicorp/go-azure-helpers/resourcemanager/tags"
"github.com/hashicorp/terraform-provider-azurerm/helpers/azure"
"github.com/hashicorp/terraform-provider-azurerm/internal/clients"
"github.com/hashicorp/terraform-provider-azurerm/internal/location"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/appconfiguration/sdk/2020-06-01/configurationstores"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/appconfiguration/validate"
"github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk"
Expand All @@ -31,7 +31,7 @@ func dataSourceAppConfiguration() *pluginsdk.Resource {
ValidateFunc: validate.ConfigurationStoreName,
},

"resource_group_name": azure.SchemaResourceGroupNameForDataSource(),
"resource_group_name": commonschema.ResourceGroupNameForDataSource(),

"location": azure.SchemaLocationForDataSource(),

Expand Down
Expand Up @@ -10,12 +10,12 @@ import (

"github.com/hashicorp/go-azure-helpers/lang/response"
"github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema"
"github.com/hashicorp/go-azure-helpers/resourcemanager/location"
"github.com/hashicorp/go-azure-helpers/resourcemanager/tags"
"github.com/hashicorp/terraform-provider-azurerm/helpers/azure"
"github.com/hashicorp/terraform-provider-azurerm/helpers/tf"
"github.com/hashicorp/terraform-provider-azurerm/internal/clients"
legacyIdentity "github.com/hashicorp/terraform-provider-azurerm/internal/identity"
"github.com/hashicorp/terraform-provider-azurerm/internal/location"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/appconfiguration/sdk/2020-06-01/configurationstores"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/appconfiguration/validate"
"github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk"
Expand Down

0 comments on commit 4f0cd66

Please sign in to comment.