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

Support during plan phase for azurerm_storage_account to validate for name uniqueness. #23791

Open
1 task done
bgmonroe opened this issue Nov 6, 2023 · 2 comments · Fixed by #23799
Open
1 task done
Labels
enhancement service/storage upstream/terraform This issue is blocked on an upstream issue within Terraform (Terraform Core/CLI, The Plugin SDK etc)

Comments

@bgmonroe
Copy link

bgmonroe commented Nov 6, 2023

Is there an existing issue for this?

  • I have searched the existing issues

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment and review the contribution guide to help.

Description

The azurerm_storage_account resource requires a globally unique name (global across Azure's storage account platform).
Currently, there is no validation taking place during the plan phase to check if the proposed name is, in fact, globally unique.

I would think that this should be easy enough to test for during the plan phase of a deployment, assuming the name is not "known after apply." I assume that validation could be skipped in instances where the name can't be known prior to the apply phase.

Having the plan succeed only to have the apply fail can be quite time consuming so having more checks done prior to the apply would be very helpful.

Thanks!

New or Affected Resource(s)/Data Source(s)

azurerm_storage_account

Potential Terraform Configuration

N/A

References

No response

@rcskosir
Copy link
Contributor

Thank you for taking the time to open this issue. Please subscribe to PR #23799 created by @magodo for this issue.

@magodo
Copy link
Collaborator

magodo commented Dec 7, 2023

@bgmonroe Due to the underlying SDK limitation, currently we can't implement this feature, and have to revert #23799 in #24142

@magodo magodo reopened this Dec 7, 2023
@magodo magodo added the upstream/terraform This issue is blocked on an upstream issue within Terraform (Terraform Core/CLI, The Plugin SDK etc) label Dec 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement service/storage upstream/terraform This issue is blocked on an upstream issue within Terraform (Terraform Core/CLI, The Plugin SDK etc)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants