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

Fix a crash in azurerm_storage_account_datasource #10370

Merged
merged 1 commit into from
Jan 29, 2021
Merged

Fix a crash in azurerm_storage_account_datasource #10370

merged 1 commit into from
Jan 29, 2021

Conversation

favoretti
Copy link
Collaborator

It crashes if the name passed to it is an empty string.

Fixes #10369

It crashes if the name passed to it is an empty string.

Fixes #10369
@ghost ghost added the size/XS label Jan 28, 2021
@favoretti
Copy link
Collaborator Author

favoretti commented Jan 29, 2021

Now instead of crashing it errors out gracefully:

data "azurerm_storage_account" "this" {
  name                = ""
  resource_group_name = azurerm_resource_group.this.name
}
$ ta

Warning: Provider development overrides are in effect

The following provider development overrides are set in the CLI configuration:
 - hashicorp/azurerm in /Users/vlazarenko/go/bin

The behavior may therefore not match any released version of the provider and
applying changes may cause the state to become incompatible with published
releases.

Acquiring state lock. This may take a few moments...

Error: name ("") can only consist of lowercase letters and numbers, and must be between 3 and 24 characters long

  on sa.tf line 1, in data "azurerm_storage_account" "this":
   1: data "azurerm_storage_account" "this" {

@katbyte katbyte added this to the v2.46.0 milestone Jan 29, 2021
Copy link
Collaborator

@katbyte katbyte left a comment

Choose a reason for hiding this comment

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

Thanks @favoretti - LGTM 👍

@katbyte katbyte merged commit 6602f50 into hashicorp:master Jan 29, 2021
katbyte added a commit that referenced this pull request Jan 29, 2021
@ghost
Copy link

ghost commented Feb 5, 2021

This has been released in version 2.46.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.46.0"
}
# ... other configuration ...

@ghost
Copy link

ghost commented Feb 28, 2021

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 as resolved and limited conversation to collaborators Feb 28, 2021
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.

Azurerm_storage_account
2 participants