Skip to content

Commit

Permalink
Add create failure and update docs...
Browse files Browse the repository at this point in the history
  • Loading branch information
WodansSon committed Aug 16, 2024
1 parent 0af59bf commit fca8231
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
9 changes: 9 additions & 0 deletions internal/services/storage/storage_account_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -1420,6 +1420,15 @@ func resourceStorageAccountCreate(d *pluginsdk.ResourceData, meta interface{}) e
return tf.ImportAsExistsError("azurerm_storage_account", id.ID())
}

// Block create here...
if _, ok := d.GetOk("queue_properties"); ok {
return fmt.Errorf("the `queue_properties` code block is no longer supported for new storage accounts, please use the `azurerm_storage_account_queue_properties` resource instead")
}

if _, ok := d.GetOk("static_website"); ok {
return fmt.Errorf("the `static_website` field is no longer supported for new storage accounts, please use the `azurerm_storage_account_static_website_properties` resource instead")
}

accountKind := storageaccounts.Kind(d.Get("account_kind").(string))
accountTier := storageaccounts.SkuTier(d.Get("account_tier").(string))
replicationType := d.Get("account_replication_type").(string)
Expand Down
12 changes: 6 additions & 6 deletions website/docs/r/storage_account_queue_properties.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ resource "azurerm_resource_group" "example" {
}
resource "azurerm_storage_account" "example" {
name = "storageaccountname"
resource_group_name = azurerm_resource_group.example.name
location = azurerm_resource_group.example.location
account_tier = "Standard"
account_kind = "StorageV2"
account_replication_type = "GRS"
name = "storageaccountname"
resource_group_name = azurerm_resource_group.example.name
location = azurerm_resource_group.example.location
account_tier = "Standard"
account_kind = "StorageV2"
account_replication_type = "GRS"
tags = {
environment = "staging"
Expand Down

0 comments on commit fca8231

Please sign in to comment.