Skip to content

Commit

Permalink
Merge pull request #15934 from hashicorp/t/blob-public-property-name-…
Browse files Browse the repository at this point in the history
…catchall

tests - rename all remaining blob access properties
  • Loading branch information
tombuildsstuff authored Mar 22, 2022
2 parents 8b2016a + 612b628 commit 0e70efb
Show file tree
Hide file tree
Showing 9 changed files with 74 additions and 73 deletions.
2 changes: 1 addition & 1 deletion internal/services/batch/batch_pool_resource_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1303,7 +1303,7 @@ resource "azurerm_storage_account" "test" {
account_tier = "Standard"
account_replication_type = "LRS"
allow_blob_public_access = true
allow_nested_items_to_be_public = true
tags = {
environment = "Dev"
Expand Down
24 changes: 12 additions & 12 deletions internal/services/compute/image_data_source_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,12 @@ resource "azurerm_network_interface" "testsource" {
}
resource "azurerm_storage_account" "test" {
name = "acctestsa%s"
resource_group_name = azurerm_resource_group.test.name
location = azurerm_resource_group.test.location
account_tier = "Standard"
account_replication_type = "LRS"
allow_blob_public_access = true
name = "acctestsa%s"
resource_group_name = azurerm_resource_group.test.name
location = azurerm_resource_group.test.location
account_tier = "Standard"
account_replication_type = "LRS"
allow_nested_items_to_be_public = true
tags = {
environment = "Dev"
Expand Down Expand Up @@ -240,12 +240,12 @@ resource "azurerm_network_interface" "testsource" {
}
resource "azurerm_storage_account" "test" {
name = "acctestsa%s"
resource_group_name = azurerm_resource_group.test.name
location = azurerm_resource_group.test.location
account_tier = "Standard"
account_replication_type = "LRS"
allow_blob_public_access = true
name = "acctestsa%s"
resource_group_name = azurerm_resource_group.test.name
location = azurerm_resource_group.test.location
account_tier = "Standard"
account_replication_type = "LRS"
allow_nested_items_to_be_public = true
tags = {
environment = "Dev"
Expand Down
3 changes: 2 additions & 1 deletion internal/services/compute/image_resource_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,8 @@ resource "azurerm_storage_account" "test" {
location = azurerm_resource_group.test.location
account_tier = "Standard"
account_replication_type = "%s"
allow_blob_public_access = true
allow_nested_items_to_be_public = true
}
resource "azurerm_storage_container" "test" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -363,12 +363,12 @@ resource "azurerm_network_interface" "source" {
}
resource "azurerm_storage_account" "test" {
name = "accsa%s"
resource_group_name = azurerm_resource_group.test.name
location = azurerm_resource_group.test.location
account_tier = "Standard"
account_replication_type = "LRS"
allow_blob_public_access = true
name = "accsa%s"
resource_group_name = azurerm_resource_group.test.name
location = azurerm_resource_group.test.location
account_tier = "Standard"
account_replication_type = "LRS"
allow_nested_items_to_be_public = true
}
resource "azurerm_storage_container" "test" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -373,12 +373,12 @@ resource "azurerm_network_interface" "source" {
}
resource "azurerm_storage_account" "test" {
name = "accsa%s"
resource_group_name = azurerm_resource_group.test.name
location = azurerm_resource_group.test.location
account_tier = "Standard"
account_replication_type = "LRS"
allow_blob_public_access = true
name = "accsa%s"
resource_group_name = azurerm_resource_group.test.name
location = azurerm_resource_group.test.location
account_tier = "Standard"
account_replication_type = "LRS"
allow_nested_items_to_be_public = true
}
resource "azurerm_storage_container" "test" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,12 +172,12 @@ func (r LogicAppIntegrationAccountAssemblyResource) update(data acceptance.TestD
%s
resource "azurerm_storage_account" "test" {
name = "acctestsa%s"
resource_group_name = azurerm_resource_group.test.name
location = azurerm_resource_group.test.location
account_tier = "Standard"
account_replication_type = "LRS"
allow_blob_public_access = true
name = "acctestsa%s"
resource_group_name = azurerm_resource_group.test.name
location = azurerm_resource_group.test.location
account_tier = "Standard"
account_replication_type = "LRS"
allow_nested_items_to_be_public = true
}
resource "azurerm_storage_container" "test" {
Expand Down
32 changes: 16 additions & 16 deletions internal/services/storage/storage_account_resource_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,23 +229,23 @@ func TestAccStorageAccount_allowBlobPublicAccess(t *testing.T) {
Config: r.basic(data),
Check: acceptance.ComposeTestCheckFunc(
check.That(data.ResourceName).ExistsInAzure(r),
check.That(data.ResourceName).Key("allow_blob_public_access").HasValue("false"),
check.That(data.ResourceName).Key("allow_nested_items_to_be_public").HasValue("false"),
),
},
data.ImportStep(),
{
Config: r.allowBlobPublicAccess(data),
Check: acceptance.ComposeTestCheckFunc(
check.That(data.ResourceName).ExistsInAzure(r),
check.That(data.ResourceName).Key("allow_blob_public_access").HasValue("true"),
check.That(data.ResourceName).Key("allow_nested_items_to_be_public").HasValue("true"),
),
},
data.ImportStep(),
{
Config: r.disallowBlobPublicAccess(data),
Check: acceptance.ComposeTestCheckFunc(
check.That(data.ResourceName).ExistsInAzure(r),
check.That(data.ResourceName).Key("allow_blob_public_access").HasValue("false"),
check.That(data.ResourceName).Key("allow_nested_items_to_be_public").HasValue("false"),
),
},
})
Expand Down Expand Up @@ -1436,10 +1436,10 @@ resource "azurerm_storage_account" "test" {
name = "unlikely23exst2acct%s"
resource_group_name = azurerm_resource_group.test.name
location = azurerm_resource_group.test.location
account_tier = "Standard"
account_replication_type = "LRS"
allow_blob_public_access = true
location = azurerm_resource_group.test.location
account_tier = "Standard"
account_replication_type = "LRS"
allow_nested_items_to_be_public = true
tags = {
environment = "production"
Expand All @@ -1464,10 +1464,10 @@ resource "azurerm_storage_account" "test" {
name = "unlikely23exst2acct%s"
resource_group_name = azurerm_resource_group.test.name
location = azurerm_resource_group.test.location
account_tier = "Standard"
account_replication_type = "LRS"
allow_blob_public_access = false
location = azurerm_resource_group.test.location
account_tier = "Standard"
account_replication_type = "LRS"
allow_nested_items_to_be_public = false
tags = {
environment = "production"
Expand Down Expand Up @@ -2436,11 +2436,11 @@ resource "azurerm_storage_account" "test" {
name = "unlikely23exst2acct%s"
resource_group_name = azurerm_resource_group.test.name
location = azurerm_resource_group.test.location
account_tier = "Standard"
account_replication_type = "LRS"
enable_https_traffic_only = true
allow_blob_public_access = true
location = azurerm_resource_group.test.location
account_tier = "Standard"
account_replication_type = "LRS"
enable_https_traffic_only = true
allow_nested_items_to_be_public = true
blob_properties {
cors_rule {
Expand Down
38 changes: 19 additions & 19 deletions internal/services/storage/storage_blob_resource_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1038,12 +1038,12 @@ resource "azurerm_resource_group" "test" {
}
resource "azurerm_storage_account" "test" {
name = "acctestacc%s"
resource_group_name = azurerm_resource_group.test.name
location = azurerm_resource_group.test.location
account_tier = "Standard"
account_replication_type = "LRS"
allow_blob_public_access = true
name = "acctestacc%s"
resource_group_name = azurerm_resource_group.test.name
location = azurerm_resource_group.test.location
account_tier = "Standard"
account_replication_type = "LRS"
allow_nested_items_to_be_public = true
}
resource "azurerm_storage_container" "test" {
Expand All @@ -1062,13 +1062,13 @@ resource "azurerm_resource_group" "test" {
}
resource "azurerm_storage_account" "test" {
name = "acctestacc%s"
resource_group_name = azurerm_resource_group.test.name
location = azurerm_resource_group.test.location
account_kind = "StorageV2"
account_tier = "Standard"
account_replication_type = "LRS"
allow_blob_public_access = true
name = "acctestacc%s"
resource_group_name = azurerm_resource_group.test.name
location = azurerm_resource_group.test.location
account_kind = "StorageV2"
account_tier = "Standard"
account_replication_type = "LRS"
allow_nested_items_to_be_public = true
}
resource "azurerm_storage_container" "test" {
Expand All @@ -1087,12 +1087,12 @@ resource "azurerm_resource_group" "test" {
}
resource "azurerm_storage_account" "test" {
name = "acctestacc%s"
resource_group_name = azurerm_resource_group.test.name
location = azurerm_resource_group.test.location
account_tier = "Premium"
account_replication_type = "LRS"
allow_blob_public_access = true
name = "acctestacc%s"
resource_group_name = azurerm_resource_group.test.name
location = azurerm_resource_group.test.location
account_tier = "Premium"
account_replication_type = "LRS"
allow_nested_items_to_be_public = true
}
resource "azurerm_storage_container" "test" {
Expand Down
12 changes: 6 additions & 6 deletions internal/services/storage/storage_container_resource_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -388,12 +388,12 @@ resource "azurerm_resource_group" "test" {
}
resource "azurerm_storage_account" "test" {
name = "acctestacc%s"
resource_group_name = azurerm_resource_group.test.name
location = azurerm_resource_group.test.location
account_tier = "Standard"
account_replication_type = "LRS"
allow_blob_public_access = true
name = "acctestacc%s"
resource_group_name = azurerm_resource_group.test.name
location = azurerm_resource_group.test.location
account_tier = "Standard"
account_replication_type = "LRS"
allow_nested_items_to_be_public = true
tags = {
environment = "staging"
Expand Down

0 comments on commit 0e70efb

Please sign in to comment.