[azure][LFO] Remove app service plan creation step in LFO script#49
Merged
Conversation
Collaborator
The description seems to cut off here |
gpalmz
reviewed
Oct 21, 2025
|
|
||
| from az_shared.az_cmd import AzCmd, execute | ||
| from az_shared.errors import ExistenceCheckError, FatalError, ResourceNotFoundError | ||
| from az_shared.errors import ( |
Collaborator
There was a problem hiding this comment.
I wonder why this is happening 🤔
Member
Author
There was a problem hiding this comment.
I'll double check some of my VS code settings - it might be me
Member
Author
Updated, sorry about that |
gpalmz
approved these changes
Oct 22, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Overview
JIra
Problem
This is an odd issue.
When trying to create the app service plan for LFO's control plane in our
log-forwarding-testingsubscription, I would hit this error.ERROR: Operation returned an invalid status 'Unauthorized'This error does not happen when ran on
azure-integrations-testingand I have Contributor permissions on both subscriptions.The app service plan creation code was already using a previous workaround (GitHub issue) by utilizing
az resource createinstead ofaz appservice plan create. This was needed only for the Y1 ASP SKU (function app consumption plan), which is what LFO utilizes.After some research, it turns out that some Azure resource providers on newer subscriptions disallow passing JSON straight into the provider in certain cases. I believe this is the case for the Y1 app function SKUs. So the Unauthorized error is not necessarily regarding my Azure permissions - it is likely the Azure provider throwing a HTTP 401/403 due to the JSON specifying a Y1 SKU being passed directly to the provider.
Fix
If multiple function apps are configured in the same resource group and region, then Azure will automatically slot them into a shared app service plan with the Y1 SKU. The only caveat is that you cannot control the name of the app service plan, which is fine in the case of LFO.
Testing
Manually tested. I repro'd the original issue in
log-forwarding-testing, then confirmed that things still work as expected when the explicit ASP creation step is removed. Here is the auto-generated ASP.The script works in that subscription now 👍