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_share doesn't support import #321

Closed
LukeCarrier opened this issue Sep 11, 2017 · 2 comments
Closed

azurerm_storage_share doesn't support import #321

LukeCarrier opened this issue Sep 11, 2017 · 2 comments

Comments

@LukeCarrier
Copy link

Terraform Version

0.10.4

Affected Resource(s)

  • azurerm_storage_share

If this issue appears to affect multiple resources, it may be an issue with Terraform's core, so please mention this.

Terraform Configuration Files

variable "storage_shares" {
  type    = "map"
  default = {
    "someshare"      = "100",
    "someothershare" = "10"
  }
}

resource "azurerm_storage_share" "storage_shares" {
  count                = "${length(var.storage_shares)}"
  name                 = "${element(keys(var.storage_shares), count.index)}"
  resource_group_name  = "${var.resource_group_name}"
  storage_account_name = "${azurerm_storage_account.storage_account.name}"
  quota                = "${lookup(var.storage_shares, element(keys(var.storage_shares), count.index))}"
}

Debug Output

$ terraform import module.alp-shares-uat.azurerm_storage_share.ss[7] jellyfish
module.alp-shares-uat.azurerm_storage_share.ss: Importing from ID "jellyfish"...
Error importing: 1 error(s) occurred:
* module.alp-shares-uat.azurerm_storage_share.ss[7] (import id: jellyfish): import module.alp-shares-uat.azurerm_storage_share.ss (id: jellyfish): resource azurerm_storage_share doesn't support import

Panic Output

Not this time 👍

Expected Behavior

The resource should have been imported.

Actual Behavior

The resource was not imported and the following error was emitted:

* module.alp-shares-uat.azurerm_storage_share.ss[7] (import id: jellyfish): import module.alp-shares-uat.azurerm_storage_share.ss (id: jellyfish): resource azurerm_storage_share doesn't support import

Steps to Reproduce

  1. Declare an azurerm_storage_share in the configuration.
  2. Manually create the storage share in Azure (via the portal, CLI or API).
  3. Attempt to import the storage share resource from Terraform.

Important Factoids

Not that we're aware of.

References

@mbfrahry
Copy link
Member

This is addressed in #1650.

@ghost
Copy link

ghost commented Mar 30, 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 👉 [email protected]. Thanks!

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

No branches or pull requests

4 participants