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

azurerm_storage_account - Enable migration of account_kind from Storage to StorageV2 #6580

Merged
merged 3 commits into from May 14, 2020

Conversation

HappyTobi
Copy link
Contributor

@HappyTobi HappyTobi commented Apr 22, 2020

Hi all,

With the update it's now possible to change the account_kind from Storageto StorageV2 without dropping. (Migration is possible now)
For all other changes on the account_kind attribute a ForceNew will be triggered like before.

The migration was a valid path to change the account_kind without dropping it.
See also the comments in the azure-sdk-for-go

Here the output of terraform apply

Terraform will perform the following actions:

 # azurerm_storage_account.storage will be updated in-place
 ~ resource "azurerm_storage_account" "storage" {
      ~ account_kind                   = "Storage" -> "StorageV2"
...
Plan: 0 to add, 1 to change, 0 to destroy.

If you change the type back or to something else:

Terraform will perform the following actions:

  # azurerm_storage_account.storage must be replaced
-/+ resource "azurerm_storage_account" "storage" {
      ~ account_kind                     = "StorageV2" -> "Storage" # forces replacement
...
Plan: 1 to add, 0 to change, 1 to destroy.

Kind regards
Tobi

Fixes #5758

@ghost ghost added the size/M label Apr 22, 2020
@ClaudiaBaur
Copy link

As this issue blocks our migration from storage account v1 to v2 using terraform, can you please kindly have a look at this PR and merge back?
Thanks, Claudia

@ghost ghost added the documentation label May 13, 2020
@WodansSon WodansSon added this to the v2.10.0 milestone May 13, 2020
Copy link
Collaborator

@WodansSon WodansSon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 🚀

@HappyTobi
Copy link
Contributor Author

@WodansSon
thx for updating the documentation!

katbyte pushed a commit to hashicorp/terraform-provider-azuread that referenced this pull request May 14, 2020
@WodansSon WodansSon changed the title Add resource migration for Storage Account V1 to V2 azurerm_storage_account - Enable migration of account_kind from Storage to StorageV2 May 14, 2020
@WodansSon
Copy link
Collaborator

One test failed but it is a known issue...
image

@WodansSon WodansSon merged commit 02c1024 into hashicorp:master May 14, 2020
WodansSon added a commit that referenced this pull request May 14, 2020
@ClaudiaBaur
Copy link

@WodansSon, thanks!

@WodansSon
Copy link
Collaborator

@ClaudiaBaur, it was a group effort. 🙂

@ghost
Copy link

ghost commented May 15, 2020

This has been released in version 2.10.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example:

provider "azurerm" {
    version = "~> 2.10.0"
}
# ... other configuration ...

@ghost
Copy link

ghost commented Jun 13, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks!

@hashicorp hashicorp locked and limited conversation to collaborators Jun 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Changing account_kind of azurerm_storage_account to StorageV2 causes destroy and create of storage account
3 participants