Skip to content

Commit 1fcd453

Browse files
authored
test: analysisservices, appinsights, arckubernetes, authorization, automation - various acceptance test fixes (#32470)
1 parent 5899690 commit 1fcd453

8 files changed

Lines changed: 17 additions & 17 deletions

internal/services/analysisservices/analysis_services_server_resource_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ resource "azurerm_storage_account" "test" {
487487
488488
resource "azurerm_storage_container" "test" {
489489
name = "assbackup"
490-
storage_account_name = azurerm_storage_account.test.name
490+
storage_account_id = azurerm_storage_account.test.id
491491
container_access_type = "private"
492492
}
493493

internal/services/applicationinsights/application_insights_workbook_resource_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ resource "azurerm_storage_account" "test" {
302302
303303
resource "azurerm_storage_container" "test" {
304304
name = "test"
305-
storage_account_name = azurerm_storage_account.test.name
305+
storage_account_id = azurerm_storage_account.test.id
306306
container_access_type = "private"
307307
}
308308
@@ -377,7 +377,7 @@ resource "azurerm_storage_account" "test" {
377377
378378
resource "azurerm_storage_container" "test" {
379379
name = "test"
380-
storage_account_name = azurerm_storage_account.test.name
380+
storage_account_id = azurerm_storage_account.test.id
381381
container_access_type = "private"
382382
}
383383
@@ -452,7 +452,7 @@ resource "azurerm_storage_account" "test" {
452452
453453
resource "azurerm_storage_container" "test" {
454454
name = "test"
455-
storage_account_name = azurerm_storage_account.test.name
455+
storage_account_id = azurerm_storage_account.test.id
456456
container_access_type = "private"
457457
}
458458
@@ -527,7 +527,7 @@ resource "azurerm_storage_account" "test" {
527527
528528
resource "azurerm_storage_container" "test" {
529529
name = "test"
530-
storage_account_name = azurerm_storage_account.test.name
530+
storage_account_id = azurerm_storage_account.test.id
531531
container_access_type = "private"
532532
}
533533

internal/services/arckubernetes/arc_kubernetes_flux_configuration_resource_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ resource "azurerm_storage_account" "test" {
408408
409409
resource "azurerm_storage_container" "test" {
410410
name = "asc%[2]d"
411-
storage_account_name = azurerm_storage_account.test.name
411+
storage_account_id = azurerm_storage_account.test.id
412412
container_access_type = "private"
413413
}
414414
@@ -453,7 +453,7 @@ resource "azurerm_storage_account" "test" {
453453
454454
resource "azurerm_storage_container" "test" {
455455
name = "asc%[2]d"
456-
storage_account_name = azurerm_storage_account.test.name
456+
storage_account_id = azurerm_storage_account.test.id
457457
container_access_type = "private"
458458
}
459459
@@ -541,7 +541,7 @@ resource "azurerm_storage_account" "test" {
541541
542542
resource "azurerm_storage_container" "test" {
543543
name = "asc%[2]d"
544-
storage_account_name = azurerm_storage_account.test.name
544+
storage_account_id = azurerm_storage_account.test.id
545545
container_access_type = "private"
546546
}
547547
@@ -611,7 +611,7 @@ resource "azurerm_storage_account" "test" {
611611
612612
resource "azurerm_storage_container" "test" {
613613
name = "asc%[2]d"
614-
storage_account_name = azurerm_storage_account.test.name
614+
storage_account_id = azurerm_storage_account.test.id
615615
container_access_type = "private"
616616
}
617617

internal/services/authorization/marketplace_role_assignment_resource_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ func TestAccRoleAssignmentMarketplace_requiresImport(t *testing.T) {
7272
id := uuid.New().String()
7373

7474
r := RoleAssignmentMarketplaceResource{}
75-
roleName := "Managed Applications Reader"
75+
roleName := "ContainerApp Reader"
7676

7777
data.ResourceSequentialTest(t, r, []acceptance.TestStep{
7878
{
@@ -310,7 +310,7 @@ provider "azurerm" {
310310
resource "azurerm_marketplace_role_assignment" "test" {
311311
name = "%s"
312312
role_definition_name = "%s"
313-
principal_id = azuread_service_principal.test.id
313+
principal_id = azuread_service_principal.test.object_id
314314
315315
lifecycle {
316316
ignore_changes = [
@@ -340,7 +340,7 @@ provider "azurerm" {
340340
resource "azurerm_marketplace_role_assignment" "test" {
341341
name = "%s"
342342
role_definition_name = "%s"
343-
principal_id = azuread_service_principal.test.id
343+
principal_id = azuread_service_principal.test.object_id
344344
skip_service_principal_aad_check = true
345345
346346
lifecycle {

internal/services/authorization/role_assignment_resource_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@ resource "azurerm_role_assignment" "test" {
511511
name = "%s"
512512
scope = data.azurerm_subscription.current.id
513513
role_definition_name = "Reader"
514-
principal_id = azuread_service_principal.test.id
514+
principal_id = azuread_service_principal.test.object_id
515515
}
516516
`, rInt, roleAssignmentID)
517517
}
@@ -539,7 +539,7 @@ resource "azurerm_role_assignment" "test" {
539539
name = "%s"
540540
scope = data.azurerm_subscription.current.id
541541
role_definition_name = "Reader"
542-
principal_id = azuread_service_principal.test.id
542+
principal_id = azuread_service_principal.test.object_id
543543
skip_service_principal_aad_check = true
544544
}
545545
`, rInt, roleAssignmentID)

internal/services/authorization/role_definition_data_source_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ func TestAccRoleDefinitionDataSource_builtIn_contributor(t *testing.T) {
7373
check.That(data.ResourceName).Key("permissions.#").HasValue("1"),
7474
check.That(data.ResourceName).Key("permissions.0.actions.#").HasValue("1"),
7575
check.That(data.ResourceName).Key("permissions.0.actions.0").HasValue("*"),
76-
check.That(data.ResourceName).Key("permissions.0.not_actions.#").HasValue("9"),
76+
check.That(data.ResourceName).Key("permissions.0.not_actions.#").HasValue("11"),
7777
check.That(data.ResourceName).Key("permissions.0.not_actions.0").HasValue("Microsoft.Authorization/*/Delete"),
7878
check.That(data.ResourceName).Key("permissions.0.not_actions.1").HasValue("Microsoft.Authorization/*/Write"),
7979
check.That(data.ResourceName).Key("permissions.0.not_actions.2").HasValue("Microsoft.Authorization/elevateAccess/Action"),

internal/services/automation/automation_account_resource_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ resource "azurerm_key_vault" "test" {
354354
sku_name = "standard"
355355
soft_delete_retention_days = 7
356356
purge_protection_enabled = true
357-
enable_rbac_authorization = true
357+
rbac_authorization_enabled = true
358358
}
359359
360360
resource "azurerm_role_assignment" "current" {

internal/services/automation/automation_watcher_resource_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ resource "azurerm_automation_watcher" "test" {
114114
}
115115
116116
script_parameters = {
117-
foo = "bar"
117+
param_foo = "arg_bar"
118118
}
119119
120120
etag = "etag example"

0 commit comments

Comments
 (0)