-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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 scope of name availability check in ASE hosted app services #7157
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
This has been released in version 2.13.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.13.0"
}
# ... other configuration ... |
First off thanks to everyone working on this project and forgive my lack of Github etiquette if this is in the wrong place. This change does not resolve the issue for my deployments and appears to have an error in it. Looking at the code in this PR it seems that it never actually does anything with the ASE, only the App Service Plan (ASP) including using the ASP name where the ASE Name is expected to build the FQDN being passed to the availability checker, which of course then fails every time. Here is the code in question, "aspID" (App Service Plan ID?) is being created with the details of the ASP and then aspID.Name is being used in place of I have verified this is what is occurring by reviewing the trace logs from my most recent attempt to deploy: #Item# = Redacted
FYI - I remain unable to deploy an App Service into an ILB ASE V2 due to this availability check failing. Also, This winds up creating an external ASE and not an ILB based ASE and thus would have a FQDN of .p.azurewebsites.net. AFAIK at the moment you cannot create a "correct" ILB ASE V2 natively in terraform due to issue #5905 and must use an ARM template. |
Hi @exmnewellwf
which is returned by the name check API. Can you check your hostname is compatible with the RFC linked in the error message? (though this should be caught by the schema validation). If there's still a problem, could you open a new issue with a much information as you can provide and we'll look into it? Thanks! |
I was able to cobble together a powershell script that calls Microsoft.Web/checknameavailability and did some testing and can now clearly see the issue. Only RFC valid characters for App Service Names and ASE Names are allowed, but App Service plans do not have that restriction and thus using it to build the FQDN can result in a failure. Consider the following: App Name: MyApp This code in the PR will assemble the name to be sent to checknameavailability using the name of the App Service Plan:
Based on the example names above the code would assemble the following name:
This name fails the check because the App Service Plan name includes underscore chars, which is the case for my App Service Plan names. The code should be assembling the following FQDN to pass to the checker:
As the App and ASE names are limited to the RFC chars this would pass the check. |
@jackofallops, |
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! |
fixes #3003