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

azurerm_maps_creator - deprecate this resource #28341

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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: 2 additions & 0 deletions internal/services/maps/maps_creator_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 13 additions & 0 deletions internal/services/maps/maps_creator_resource_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,17 @@ 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"
)

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{
Expand All @@ -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{
Expand All @@ -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{
Expand All @@ -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{
Expand Down
10 changes: 8 additions & 2 deletions internal/services/maps/registration.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down Expand Up @@ -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
}
4 changes: 4 additions & 0 deletions website/docs/5.0-upgrade-guide.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 2 additions & 0 deletions website/docs/r/maps_creator.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading