Skip to content

Commit

Permalink
[TestCase] azurerm_maps_account - update sku_name value in the test c…
Browse files Browse the repository at this point in the history
…ase (#23563)

* [TestCase] azurerm_maps_account - update sku_name value in the test case

* update code

* update code

* update code
  • Loading branch information
neil-yechenwei authored Oct 16, 2023
1 parent e8c755a commit befca9a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion internal/services/maps/maps_account_data_source_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func TestAccMapsAccountDataSource_basic(t *testing.T) {
check.That(data.ResourceName).Key("resource_group_name").Exists(),
check.That(data.ResourceName).Key("tags.%").HasValue("1"),
check.That(data.ResourceName).Key("tags.environment").HasValue("testing"),
check.That(data.ResourceName).Key("sku_name").HasValue("S0"),
check.That(data.ResourceName).Key("sku_name").HasValue("G2"),
check.That(data.ResourceName).Key("x_ms_client_id").Exists(),
check.That(data.ResourceName).Key("primary_access_key").Exists(),
check.That(data.ResourceName).Key("secondary_access_key").Exists(),
Expand Down
14 changes: 7 additions & 7 deletions internal/services/maps/maps_account_resource_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func TestAccMapsAccount_basic(t *testing.T) {
check.That(data.ResourceName).Key("x_ms_client_id").Exists(),
check.That(data.ResourceName).Key("primary_access_key").Exists(),
check.That(data.ResourceName).Key("secondary_access_key").Exists(),
check.That(data.ResourceName).Key("sku_name").HasValue("S0"),
check.That(data.ResourceName).Key("sku_name").HasValue("G2"),
),
},
data.ImportStep(),
Expand All @@ -43,13 +43,13 @@ func TestAccMapsAccount_sku(t *testing.T) {

data.ResourceTest(t, r, []acceptance.TestStep{
{
Config: r.sku(data, "S1"),
Config: r.sku(data, "G2"),
Check: acceptance.ComposeTestCheckFunc(
check.That(data.ResourceName).Key("name").Exists(),
check.That(data.ResourceName).Key("x_ms_client_id").Exists(),
check.That(data.ResourceName).Key("primary_access_key").Exists(),
check.That(data.ResourceName).Key("secondary_access_key").Exists(),
check.That(data.ResourceName).Key("sku_name").HasValue("S1"),
check.That(data.ResourceName).Key("sku_name").HasValue("G2"),
),
},
data.ImportStep(),
Expand Down Expand Up @@ -152,7 +152,7 @@ resource "azurerm_resource_group" "test" {
resource "azurerm_maps_account" "test" {
name = "accMapsAccount-%d"
resource_group_name = azurerm_resource_group.test.name
sku_name = "S0"
sku_name = "G2"
}
`, data.RandomInteger, data.Locations.Primary, data.RandomInteger)
}
Expand Down Expand Up @@ -190,7 +190,7 @@ resource "azurerm_resource_group" "test" {
resource "azurerm_maps_account" "test" {
name = "accMapsAccount-%d"
resource_group_name = azurerm_resource_group.test.name
sku_name = "S0"
sku_name = "G2"
tags = {
environment = "testing"
Expand All @@ -213,7 +213,7 @@ resource "azurerm_resource_group" "test" {
resource "azurerm_maps_account" "test" {
name = "accMapsAccount-%d"
resource_group_name = azurerm_resource_group.test.name
sku_name = "S0"
sku_name = "G2"
local_authentication_enabled = false
}
`, data.RandomInteger, data.Locations.Primary, data.RandomInteger)
Expand All @@ -233,7 +233,7 @@ resource "azurerm_resource_group" "test" {
resource "azurerm_maps_account" "test" {
name = "accMapsAccount-%d"
resource_group_name = azurerm_resource_group.test.name
sku_name = "S0"
sku_name = "G2"
local_authentication_enabled = true
}
`, data.RandomInteger, data.Locations.Primary, data.RandomInteger)
Expand Down
2 changes: 2 additions & 0 deletions website/docs/r/maps_account.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ The following arguments are supported:

* `sku_name` - (Required) The SKU of the Azure Maps Account. Possible values are `S0`, `S1` and `G2`. Changing this forces a new resource to be created.

~> **Note:** Gen1 SKUs (`S0` and `S1`) are deprecated and can no longer be used for new deployments, which should instead use a Gen2 SKU (`G2`) - more information can be found [in the Azure documentation](https://learn.microsoft.com/azure/azure-maps/how-to-manage-pricing-tier).

* `local_authentication_enabled` - (Optional) Is local authentication enabled for this Azure Maps Account? When `false`, all authentication to the Azure Maps data-plane REST API is disabled, except Azure AD authentication. Defaults to `true`.

* `tags` - (Optional) A mapping of tags to assign to the Azure Maps Account.
Expand Down

0 comments on commit befca9a

Please sign in to comment.