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

Cannot check existence of an azurerm_storage_share #2384

Closed
TamasSzerb opened this issue Nov 26, 2018 · 2 comments · Fixed by #3828
Closed

Cannot check existence of an azurerm_storage_share #2384

TamasSzerb opened this issue Nov 26, 2018 · 2 comments · Fixed by #3828
Assignees
Milestone

Comments

@TamasSzerb
Copy link

TamasSzerb commented Nov 26, 2018

hashicorp/terraform#19445

Terraform Version

Terraform v0.11.10
+ provider.azurerm v1.16.0
+ provider.template v1.0.0

Terraform Configuration Files

resource "azurerm_storage_account" "moo-storage" {
  name                     = "moonortheurope"
  resource_group_name      = "moo"
  location                 = "${local.location}"
  account_tier             = "Standard"
  account_replication_type = "ZRS"
}

resource "azurerm_storage_share" "moo-share" {
  name                 = "share-moo"
  resource_group_name  = "moo"
  storage_account_name = "${azurerm_storage_account.moo-storage.name}"

  quota = 500
}

Debug Output

Crash Output

2018/11/22 19:20:05 [DEBUG] plugin: waiting for all plugin processes to complete...
Error: Error refreshing state: 1 error(s) occurred:

Expected Behavior

Check if the service up & running

Actual Behavior

Steps to Reproduce

  1. terraform init
  2. terraform apply

Additional Context

I believe the issue is that the "Host not found" considered as error, however based on the API documentation https://docs.microsoft.com/en-us/rest/api/storageservices/get-file-service-properties this could mean that the share does not exist yet. In the code:

https://github.com/terraform-providers/terraform-provider-azurerm/blob/22ca0989ab65278b202677740dfbc7373b2ae82a/azurerm/resource_arm_storage_share.go#L122

References

@ghost
Copy link

ghost commented Jul 30, 2019

This has been released in version 1.32.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 = "~> 1.32.0"
}
# ... other configuration ...

@ghost
Copy link

ghost commented Aug 11, 2019

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 Aug 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants