Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace deprecated property storage_account_name #6

Open
rswrz opened this issue Nov 28, 2024 · 1 comment
Open

Replace deprecated property storage_account_name #6

rswrz opened this issue Nov 28, 2024 · 1 comment
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@rswrz
Copy link
Member

rswrz commented Nov 28, 2024

The following warning occurs on azurerm provider version 4.11.0.

╷
│ Warning: Argument is deprecated
│ 
│   with module.launchpad.azurerm_storage_container.this,
│   on .terraform/modules/launchpad/r-storage-account.tf line 56, in resource "azurerm_storage_container" "this":
│   56:   storage_account_name  = azurerm_storage_account.this.name
│ 
│ the `storage_account_name` property has been deprecated in favour of
│ `storage_account_id` and will be removed in version 5.0 of the Provider.
╵
@rswrz rswrz moved this from Backlog to Ready in Terraform Module Development Nov 28, 2024
@rswrz rswrz added good first issue Good for newcomers bug Something isn't working labels Dec 9, 2024
@rswrz
Copy link
Member Author

rswrz commented Dec 13, 2024

Caution

If storage_account_name is replaced with storage_account_id the storage container will be recreated

Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
-/+ destroy and then create replacement

Terraform will perform the following actions:

  # module.launchpad.azurerm_storage_container.this must be replaced
-/+ resource "azurerm_storage_container" "this" {
      ~ default_encryption_scope          = "$account-encryption-key" -> (known after apply)
      ~ has_immutability_policy           = false -> (known after apply)
      ~ has_legal_hold                    = false -> (known after apply)
      ~ id                                = "https://stlaunchpad.blob.core.windows.net/tfstate" -> (known after apply)
      ~ metadata                          = {} -> (known after apply)
        name                              = "tfstate"
      ~ resource_manager_id               = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/RG/providers/Microsoft.Storage/storageAccounts/stlaunchpad/blobServices/default/containers/tfstate" -> (known after apply)
      + storage_account_id                = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/RG/providers/Microsoft.Storage/storageAccounts/stlaunchpad" # forces replacement
      - storage_account_name              = "stlaunchpad" -> null # forces replacement
        # (2 unchanged attributes hidden)
    }

Plan: 1 to add, 0 to change, 1 to destroy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
No open projects
Development

No branches or pull requests

1 participant