[AppService]: fix #17347- Fixed Import-AzWebAppKeyVaultCertificate to use certificate naming convention same as Az-CLI
#19190
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
#17347
When using the Import-AzWebAppKeyVaultCertificate, the Microsoft.Web\Certificates created use the name standard "Keyvalt-Secret" to import the certificate.
In case there are multiple App Service Plans from different webspace on the same RG, the 1st import will work fine and can be used by the App Service Plan. Now, if you run the same import to another ASP that is on a different Webspace, it will be understood as an update of the 1st certificate and the App Service Plan won't be able to consume the certificate.
Azure CLI (az webapp config ssl import) imports with the standard "webspace+KeyVaultName+CertName" and that way it is difficult to conflict with the same name.
Please use the same standard or allow to create it's own name
Checklist
CONTRIBUTING.mdand reviewed the following information:generationbranch.ChangeLog.mdfile(s) appropriatelyChangeLog.mdfile can be found atsrc/{{SERVICE}}/{{SERVICE}}/ChangeLog.md## Upcoming Releaseheader in the past tense. Add changelog in description section if PR goes intogenerationbranch.ChangeLog.mdif no new release is required, such as fixing test case only.