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 / account_type problems with modules #442

Closed
DonEstefan opened this issue Oct 19, 2017 · 3 comments
Closed

azurerm_storage_account / account_type problems with modules #442

DonEstefan opened this issue Oct 19, 2017 · 3 comments

Comments

@DonEstefan
Copy link

Terraform Version

  • Terraform v0.10.7 on Win
  • provider.azurerm: version = "~> 0.3"
  • provider.template: version = "~> 1.0"

Affected Resource(s)

azurerm_storage_account:

  • account_type
  • account_tier
  • account_replication_type

Terraform Configuration Files

resource "azurerm_storage_account" "storeaccount" {
  #the old way of doing stuff
  #I keep this for backward compatibility
  account_type          = "Standard_GRS"

  #the new way of doing stuff
  account_tier          = "Standard"
  account_replication_type = "GRS"
}

Expected Behavior

terraform plan [DIR] works with or without [DIR] or modules

Actual Behavior

Using cd /terraform/module1; terraform plan I get a warning (which is expected)

* module.module1.azurerm_storage_account.storeaccount: "account_type": [DEPRECATED] 
This field has been split into `acount_tier` and `account_replication_type`

Using cd /terraform; terraform plan module1 I get an error which states exactly the opposite of the warning above

2 error(s) occurred:
* module.module1.azurerm_storage_account.storeaccount: : invalid or unknown key: account_replication_type
* module.module1.azurerm_storage_account.storeaccount: : invalid or unknown key: account_tier

References

maybe #437 ?!?

@nbering
Copy link

nbering commented Oct 19, 2017

@DonEstefan I wonder if you have a version mismatch of the locally-stored modules in the .terraform directory? So in one module, you're using the new version where the variable is deprecated and in the other you're using one where the new variables don't exist? Try terraform init maybe?

@DonEstefan
Copy link
Author

Thanks for the hint!
We use modules and subdirectories to separate parts of our environment. Due to hashicorp/terraform#15447 I have to change directories before tainting resources. I did not realize that this makes me use a separate copy of the azurerm provider in the sub-folder. After updating the second provider copy everything was smooth again...

@ghost
Copy link

ghost commented Apr 1, 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!

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

No branches or pull requests

2 participants