-
Notifications
You must be signed in to change notification settings - Fork 36
Open
Labels
enhancementNew feature or requestNew feature or request
Description
terraform-plugin-go version
v0.19.0
Use cases
See:
- Support during plan phase for azurerm_storage_account to validate for name uniqueness. terraform-provider-azurerm#23791 for the initial ask
azurerm_storage_account
: Plan time name validation terraform-provider-azurerm#23799: for the initial PR to meet above request- Revert "
azurerm_storage_account
: Plan time name validation (#23799)" terraform-provider-azurerm#24142: for why we reverted it
Long to short, we have a resource, whose name is globally unique, which means creating this resource with an existing name would fail. So we want to add validation in plan time, by using the "CustomizeDiff" (SDKv2) or "ModifyPlan" (FW). It works fine for most cases, whilst if the resource is tainted, the plan will fail (at least for CustomizeDiff
), in that the state
is nil and the plan will have the name set to the existing name, with that resource still existed (not deleted yet).
Attempted solutions
Proposal
I don't have a comprehensive proposal here, whilst I'd like to ask for a way to meet the requirement above, any suggestion would also be appreciated!
References
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request