From e28b1db55ae39758494e921a93ee95bbc8ab5341 Mon Sep 17 00:00:00 2001 From: Matthew Date: Wed, 25 Sep 2024 11:22:46 -0700 Subject: [PATCH] azurerm_storage_blob - is now ForceNew --- internal/services/storage/storage_blob_resource.go | 1 + internal/services/storage/storage_blob_resource_test.go | 7 ------- website/docs/r/storage_blob.html.markdown | 2 +- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/internal/services/storage/storage_blob_resource.go b/internal/services/storage/storage_blob_resource.go index 6962694d563d..5ea2eed5c8d7 100644 --- a/internal/services/storage/storage_blob_resource.go +++ b/internal/services/storage/storage_blob_resource.go @@ -128,6 +128,7 @@ func resourceStorageBlob() *pluginsdk.Resource { "source_content": { Type: pluginsdk.TypeString, Optional: true, + ForceNew: true, ConflictsWith: []string{"source", "source_uri"}, }, diff --git a/internal/services/storage/storage_blob_resource_test.go b/internal/services/storage/storage_blob_resource_test.go index d90cf6e65adc..03daa9c46285 100644 --- a/internal/services/storage/storage_blob_resource_test.go +++ b/internal/services/storage/storage_blob_resource_test.go @@ -477,13 +477,6 @@ func TestAccStorageBlob_pageFromInlineContent(t *testing.T) { ), }, data.ImportStep("parallelism", "size", "source_content", "type"), - { - Config: r.pageFromInlineContent(data, 1024), - Check: acceptance.ComposeTestCheckFunc( - check.That(data.ResourceName).ExistsInAzure(r), - ), - }, - data.ImportStep("parallelism", "size", "source_content", "type"), { Config: r.pageFromInlineContent(data, 511), ExpectError: regexp.MustCompile(`"source" must be aligned to 512-byte boundary for "type" set to "Page"`), diff --git a/website/docs/r/storage_blob.html.markdown b/website/docs/r/storage_blob.html.markdown index bdc3186e4c40..d5b970d394ba 100644 --- a/website/docs/r/storage_blob.html.markdown +++ b/website/docs/r/storage_blob.html.markdown @@ -69,7 +69,7 @@ The following arguments are supported: * `encryption_scope` - (Optional) The encryption scope to use for this blob. -* `source` - (Optional) An absolute path to a file on the local system. This field cannot be specified for Append blobs and cannot be specified if `source_content` or `source_uri` is specified. +* `source` - (Optional) An absolute path to a file on the local system. This field cannot be specified for Append blobs and cannot be specified if `source_content` or `source_uri` is specified. Changing this forces a new resource to be created. * `source_content` - (Optional) The content for this blob which should be defined inline. This field can only be specified for Block blobs and cannot be specified if `source` or `source_uri` is specified. Changing this forces a new resource to be created.