-
Notifications
You must be signed in to change notification settings - Fork 136
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
Use Stacks API for Flex Consumption SKU #4104
Conversation
const getFlexStack = async (stack: string) => { | ||
const result: AzExtPipelineResponse = await client.sendRequest(createPipelineRequest({ | ||
method: 'GET', | ||
url: requestUtils.createRequestUrl(`providers/Microsoft.Web/locations/${location.name}/functionAppStacks`, { |
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.
so flex stacks are location dependent? That's crazy
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.
Yeah, I can see it being helpful for this team since they have to deploy skus to regions individually (it seems like).
|
||
// TODO: Because we don't have the stack API, assume no stack means it's a flex app | ||
context.site = stack ? await this.createFunctionApp(context, rgName, siteName, stack) : await this.createFlexFunctionApp(context, rgName, siteName); | ||
context.site = !flexSku ? |
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.
I prefer avoiding negating this and flipping the ternary around.
url: `https://management.azure.com/subscriptions/${context.subscriptionId}/resourceGroups/${rgName}/providers/Microsoft.Web/sites/${siteName}?api-version=2023-12-01`, | ||
method: 'PUT', | ||
body: JSON.stringify(await this.getNewFlexSite(context)) as unknown as RequestBodyType, | ||
body: JSON.stringify(await this.getNewFlexSite(context, sku)) as unknown as RequestBodyType, |
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.
not for this PR, but this will eventually need to support sovereign clouds with different request urls
There are some different requirements for the stack API when acquiring the runtimes