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

Purged App Configuration Services are not releasing the name #677

Closed
teowa opened this issue Aug 25, 2022 · 1 comment
Closed

Purged App Configuration Services are not releasing the name #677

teowa opened this issue Aug 25, 2022 · 1 comment
Assignees
Labels

Comments

@teowa
Copy link

teowa commented Aug 25, 2022

Background

Hi, I am working on support soft_delete feature of App Configuration 2022-05-01 in Terraform hashicorp/terraform-provider-azurerm#17714, seems the purged App Configuration are not releasing the name(for about serveral minutes with location west us), which affects some of the automation. From a previous issue #264, I know maybe it is by design.

As a workaround, I find there is a POST operation checkNameAvailability can check the name availibility in certain location. I plan to add logic to retry checkNameAvailability before PUT. Seems there is no doc about this, please help check once this checkNameAvailability returns the name is availble then I can PUT without the NameUnavailable error, right? From my own test, the result is expected (checkNameAvailability returns OK then PUT is OK). And please tell if there is other insights, thanks.

Repro Steps (with REST API)

  1. PUT a Appconfiguration with Standard sku (purge_protection is off)
  2. DELETE the App Configuration
  3. POST purge the soft-deleted App Configuration, checked that both of GET the first created and the deleted return 404
  4. PUT a same named App Configuration, return the error

Error

Code="NameUnavailable" Message="The specified name is already in use."

Related

  1. azurerm_app_configuration - support for the encrption, local_auth_enabled, public_network_access_enabled, purge_protection_enabled,and soft_delete_retention_days properties hashicorp/terraform-provider-azurerm#17714
  2. previous issue: Deleted App Configuration Services are not releasing name  #264
@jiayi11
Copy link

jiayi11 commented Aug 30, 2022

Hi @teowa
Yes, you are right, it's by design that the store name will not be released immediately after purging the store. You should use the CheckNameAvailability API to check if the name is available for use before recreating.
https://docs.microsoft.com/en-us/rest/api/appconfiguration/stable/operations/regional-check-name-availability?tabs=HTTP
Generally if CheckNameAvailability returns true, you won't see the NameUnavailble error when creating the store, but the most reliable way is to handle the NameUnavailable error in your app and retry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants