diff --git a/internal/services/maps/maps_creator_resource.go b/internal/services/maps/maps_creator_resource.go index abee80675f24..8da05c544daf 100644 --- a/internal/services/maps/maps_creator_resource.go +++ b/internal/services/maps/maps_creator_resource.go @@ -34,6 +34,8 @@ func resourceMapsCreator() *pluginsdk.Resource { Delete: pluginsdk.DefaultTimeout(30 * time.Minute), }, + DeprecationMessage: "The `azurerm_maps_creator` resource has been deprecated and will be removed in v5.0 of the AzureRM Provider", + Importer: pluginsdk.ImporterValidatingResourceId(func(id string) error { _, err := creators.ParseCreatorID(id) return err diff --git a/internal/services/maps/maps_creator_resource_test.go b/internal/services/maps/maps_creator_resource_test.go index b1a7e3950acb..d29ef4030aa4 100644 --- a/internal/services/maps/maps_creator_resource_test.go +++ b/internal/services/maps/maps_creator_resource_test.go @@ -13,6 +13,7 @@ import ( "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" + "github.com/hashicorp/terraform-provider-azurerm/internal/features" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/utils" ) @@ -20,6 +21,9 @@ import ( type MapsCreatorResource struct{} func TestAccMapsCreator_basic(t *testing.T) { + if features.FivePointOhBeta() { + t.Skipf("Skipping since `azurerm_maps_creator` is deprecated and will be removed in 5.0") + } data := acceptance.BuildTestData(t, "azurerm_maps_creator", "test") r := MapsCreatorResource{} data.ResourceTest(t, r, []acceptance.TestStep{ @@ -34,6 +38,9 @@ func TestAccMapsCreator_basic(t *testing.T) { } func TestAccMapsCreator_requiresImport(t *testing.T) { + if features.FivePointOhBeta() { + t.Skipf("Skipping since `azurerm_maps_creator` is deprecated and will be removed in 5.0") + } data := acceptance.BuildTestData(t, "azurerm_maps_creator", "test") r := MapsCreatorResource{} data.ResourceTest(t, r, []acceptance.TestStep{ @@ -48,6 +55,9 @@ func TestAccMapsCreator_requiresImport(t *testing.T) { } func TestAccMapsCreator_complete(t *testing.T) { + if features.FivePointOhBeta() { + t.Skipf("Skipping since `azurerm_maps_creator` is deprecated and will be removed in 5.0") + } data := acceptance.BuildTestData(t, "azurerm_maps_creator", "test") r := MapsCreatorResource{} data.ResourceTest(t, r, []acceptance.TestStep{ @@ -62,6 +72,9 @@ func TestAccMapsCreator_complete(t *testing.T) { } func TestAccMapsCreator_update(t *testing.T) { + if features.FivePointOhBeta() { + t.Skipf("Skipping since `azurerm_maps_creator` is deprecated and will be removed in 5.0") + } data := acceptance.BuildTestData(t, "azurerm_maps_creator", "test") r := MapsCreatorResource{} data.ResourceTest(t, r, []acceptance.TestStep{ diff --git a/internal/services/maps/registration.go b/internal/services/maps/registration.go index fed9e477e2ef..0db46190c373 100644 --- a/internal/services/maps/registration.go +++ b/internal/services/maps/registration.go @@ -4,6 +4,7 @@ package maps import ( + "github.com/hashicorp/terraform-provider-azurerm/internal/features" "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" ) @@ -37,8 +38,13 @@ func (r Registration) SupportedDataSources() map[string]*pluginsdk.Resource { // SupportedResources returns the supported Resources supported by this Service func (r Registration) SupportedResources() map[string]*pluginsdk.Resource { - return map[string]*pluginsdk.Resource{ + resources := map[string]*pluginsdk.Resource{ "azurerm_maps_account": resourceMapsAccount(), - "azurerm_maps_creator": resourceMapsCreator(), } + + if !features.FivePointOhBeta() { + resources["azurerm_maps_creator"] = resourceMapsCreator() + } + + return resources } diff --git a/website/docs/5.0-upgrade-guide.html.markdown b/website/docs/5.0-upgrade-guide.html.markdown index ebafb0c7e535..d97db8f6f291 100644 --- a/website/docs/5.0-upgrade-guide.html.markdown +++ b/website/docs/5.0-upgrade-guide.html.markdown @@ -54,6 +54,10 @@ This deprecated resource has been superseded/retired and has been removed from t * This deprecated resource has been removed from the Azure Provider. Please see the [documention for more details](https://learn.microsoft.com/en-us/azure/defender-for-cloud/prepare-deprecation-log-analytics-mma-agent#log-analytics-agent-autoprovisioning-experience---deprecation-plan). +### `azurerm_maps_creator` + +* This deprecated resource has been removed from the Azure Provider. Please see the [documention for more details](https://aka.ms/AzureMapsCreatorDeprecation). + ## Removed Data Sources Please follow the format in the example below for adding removed data sources: diff --git a/website/docs/r/maps_creator.html.markdown b/website/docs/r/maps_creator.html.markdown index 02b9fe1b1702..e9ce039ce2f7 100644 --- a/website/docs/r/maps_creator.html.markdown +++ b/website/docs/r/maps_creator.html.markdown @@ -10,6 +10,8 @@ description: |- Manages an Azure Maps Creator. +~> **Note:** The `azurerm_maps_creator` resource has been deprecated because the service is retiring from 2024-09-23 and will be removed in v5.0 of the AzureRM Provider. + ## Example Usage ```hcl