From fca8231076d70eca3111c3e50a233c63bc4f17eb Mon Sep 17 00:00:00 2001 From: Jeffrey Cline <20408400+WodansSon@users.noreply.github.com> Date: Fri, 16 Aug 2024 02:00:02 -0600 Subject: [PATCH] Add create failure and update docs... --- .../services/storage/storage_account_resource.go | 9 +++++++++ .../r/storage_account_queue_properties.html.markdown | 12 ++++++------ 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/internal/services/storage/storage_account_resource.go b/internal/services/storage/storage_account_resource.go index 8c74f066fa98..4831b83c2f89 100644 --- a/internal/services/storage/storage_account_resource.go +++ b/internal/services/storage/storage_account_resource.go @@ -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) diff --git a/website/docs/r/storage_account_queue_properties.html.markdown b/website/docs/r/storage_account_queue_properties.html.markdown index 094948a87eb0..090e932942ee 100644 --- a/website/docs/r/storage_account_queue_properties.html.markdown +++ b/website/docs/r/storage_account_queue_properties.html.markdown @@ -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"