-
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
Provisioning an App Service Plan within a App Service Environment fails #917
Comments
Hey @JoMoore88 Thanks for opening this issue
Indeed - in the failure case we don't save anything to the state, since the operator needs to determine how's best to proceed (e.g. if it's ok, the resource can be Imported into Terraform). In this case - the Azure API's returning a HTTP 201 for an internal server error, which as you've seen: a) isn't the status code for an actual http error and b) isn't documented. Out of interest, do you get any more useful information in the logs if you run @joshgav 👋 would you be able to reach out to the App Service Team about this? The API returning an internal server error is one thing (and valid) - but returning a 201 "unknown error" feels like the wrong approach? Thanks! |
I'm also seeing this error.
Is a workaround available? (Other than creating the web app / app service manually, of course) Thanks, |
From the docs and the specs it looks the web.AppServicePlansClient#CreateOrUpdate call should only return 200 or 202, so perhaps the SDK lib can't handle the 201. @naveedaz can you fix the service not to return 201 or update the spec to accept 201's? @jhendrixMSFT is the missing response code in the spec the reason for this error? Thanks! |
@naveedaz any idea of a rough timeframe for fixing this? Thanks! |
ping @naveedaz :) |
@joshgav would you be able to reach out to the service team about this? thanks :) |
@joshgav 👋 - would you be able to reach out to the service team here? :) |
Yes, thanks for the bump! Just in case, @marstr any insights based on your current work with App Service? |
Nothing specific to App Service from my side, I would check to see if this definition should have been considered a Long Running Operation. At least for Go updating this would be a breaking change, so even if it gets fixed we probably have to wait for v17 of the Azure SDK for Go to fix it. I'd be open at looking at hacks in v16 to unblock people though. |
@marstr the definition is marked as long running. I think it is missing |
Any update on this? Looks like v17 (and v18) of the Azure SDK for Go have been released. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
👋 hi all Just to let you know that a fix for the Application Insights issue mentioned has been released as part of v1.13.0 of the AzureRM Provider :) Since this fix is unrelated to the original bug report in this issue - I'm going to hide the Application Insights related comments for the moment so that there's no confusion, I hope you don't mind! Thanks! |
I filled Azure/azure-rest-api-specs#3648 and created Azure/azure-rest-api-specs#3774 so hopefully this can get fixed at the Azure API swagger and then pushed to the go SDK which will fix this. |
Any update on this issue? Seems pretty incredible this is still hanging out there. Was reported almost a year ago. |
Yeah, we gave up on evaluating ASEs at work because of this. |
I'm still hoping that one day I can incorporate ASEs into my Terraform work instead of creating them manually. |
We have incorporated them into our Terraform code by using an ARM template resource. Works ok but since the actual creation of the ASE takes a long time...once the Terraform deployment times out you need to monitor the creation via the portal. Once the creation completes, you re-run the Terraform deployment again to get the ASE under Terraform control and get any outputs you might have from the ARM template resource. |
Unfortunately ASE's are still blocked on the upstream API issue: Azure/azure-rest-api-specs#4915 - so we're unable to do much with them until that's resolved unfortunately (we're unable to add a Data Source for an existing one, since it'd require writing a test which could provision one, which isn't reasonable possible since the API's broken); as such whilst we'd like to add support for ASE's (and thus be able to poll for them to be successful & then continue so this succeeds; and add test cases covering this) we're blocked on this API issue at this time, unfortunately. |
The original issue where provisioning an App Service Plan within a App Service Environment would fail because Azure would respond with HTTP Code 201 and for the SDK it was an invalid code got fixed in the latest release of the SDK (27.0.0). |
Any update on when this will get fixed in the provider now that the SDK issue is resolved? |
@Phydeauxman this is unfortunately still blocked on the App Service Environment API being broken: Azure/azure-rest-api-specs#4915 |
@tombuildsstuff; |
@ChethanRavulaGit What issues do you see creating app service plan within an ASE? I am trying to follow up with the product group on the deployment time issue. @tombuildsstuff what is a current issue? I was able to deploy ASP inside ASE using Terraform (of course, ASE was pre-created and resource id was harcoded). Having ASE data source is definitely a must have for a good e2e, but I don't think there is any issues with existing ASP resource (assuming deployment time issue is fixed) |
@logachev; |
👋 We've got tests for provisioning an App Service Plan within an App Service Environment which are now passing - and whilst it does take quite a while to provision (an hour, iirc) it does so successfully and as such I'm going to close this issue for the moment. Thanks! |
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. |
This issue was originally opened by @JoMoore88 as hashicorp/terraform#17477. It was migrated here as a result of the provider split. The original body of the issue is below.
Terraform Version
Terraform Configuration Files
Crash Output
Expected Behavior
App service plans should be created, if it already exists the resource should be skipped. This should run error free.
Actual Behavior
The App service plans deploy on the first run; however the error above is generated for any App service plans in the resource block.
Subsequent runs have the App Service Plans detected as new resources, this is because the App Service Plans are not shown in state. I assume due to the above. This is woesome for me as i have another ARM template that runs later on in the project which depends on the azurerm_app_service_plan.ASE_Dev_ASPs block.
Steps to Reproduce
Additional Context
Per the following : https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-manager-async-operations
So it looks like we are getting the status 'created' back but terraform cannot handle said status code. Can this be corrected? Or is there a means of exempting errors/error codes on the HCL side of things that i can implement?
The text was updated successfully, but these errors were encountered: