:wave:
When creating a App Service within a Linux App Service Plan using the LinuxFxVersion field - the App Service is created successfully; however it appears this field isn't populated/returned in the API response when retrieving an App Service.
I'm making use of the Go SDK here, but from what I can see this is a Service Issue rather than something specific to the Go SDK.. whilst this may also affect other fields, but I've only noticed the LinuxFxVersion isn't returned - would it be possible to fix this?
Thanks!
ping @fearthecowboy - is there any update available here? :)
assigning to owner (@naveedaz )for follow up
Hey there, are there any updates available? :) @naveedaz
Also chiming in here, this leaves a large hole in my deployment right now.
@tombuildsstuff would you mind describing how the missing field effects Terraform? Thanks!
@seffyroff are you using Terraform or having a problem using the SDKs directly? Thanks!
@joshgav so with the API in it's current state it's not possible for us to detect drift, since these values can be submitted but aren't returned back, which means that if a change is made outside of Terraform, it won't be detected in the plan. It also means it's not currently possible to fully import a Linux App Service since the fields aren't mapped across; and due to #1697 Terraform will attempt to delete the App Service upon noticing these changes (to work around being unable to update the App Service in the API) - which isn't ideal
Hope that helps - let me know if you need any more information - thanks! :)
@seffyroff are you using Terraform or having a problem using the SDKs directly? Thanks!
Terraform, yes. I have looked at accomplishing this via SDK scaffolding or with a template, but neither is ideal in our use case, and would be a significant departure from our existing workflow.
Thanks @tombuildsstuff and @seffyroff for the details! @davidebbo @naveedaz we'll need your help addressing this, also about to start an email thread with you, thanks!
Guys, any update here ? :) @davidebbo @naveedaz
Azure Web App for Containers is a cool feature and would love to manage it from Terraform. Appreciate your quick support here. Thanks
Not my area, so I'll let @naveedaz or others respond here.
@tombuildsstuff
Please use the https://docs.microsoft.com/en-us/rest/api/appservice/webapps/getconfiguration API to get the value for linuxFxVersion. The Update/Get Configuration API is the supported method of modifying and tracking that configuration.
The swagger file has it already as:
https://github.com/Azure/azure-rest-api-specs/blob/master/specification/web/resource-manager/Microsoft.Web/stable/2016-03-01/CommonDefinitions.json#L1914
Thank you @naveedaz. The corresponding Go SDK methods are:
So @naveedaz, assuming the user has an AppsClient as client, would you recommend the following code for checking and updating LinuxFxVersion?
@tombuildsstuff are you using this GetConfiguration method and still not getting an updated field?
config, _ := client.GetConfiguration(ctx, rgName, appName)
fmt.Println(config.LinuxFxVersion)
config.LinuxFxVersion = "string"
config, err := client.CreateOrUpdateConfiguration(ctx, rgName, appName, config)
@naveedaz @joshgav yep - we're using both of those endpoints. Here's the Update call (via client.CreateOrUpdateConfiguration:
and the Read call (via client.GetConfiguration):
For the moment the code linked above doesn't submit the Linux values (since it's broken / hence this issue) - however when adding these fields in, and giving them values; these are omited from the responses from the Azure API's.
Hope that helps!
Hey @tombuildsstuff, I just spent a little time digging here and I think we may be able to work around this while I follow-up internally.
When I GET an existing Web App for Containers using this endpoint:
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}
Instead of getting back a site config as here:
and here:
I get back a structure that looks like this:
"siteProperties": {
"metadata": null,
"properties": [
{
"name": "LinuxFxVersion",
"value": "DOCKER|marstr/musicvotes"
},
{
"name": "WindowsFxVersion",
"value": null
}
],
"appSettings": null
},
I can't find any reference in the Swagger that documents the "siteProperties" object. I'll follow up internally to get those definitions added.
In the meantime, let me know if you'd like help with a work around.
Acutally, while the above is a departure from what is noted in Swagger, it does seem like when I call the endpoint linked above by @joshgav:
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web
I do get a siteConfig back with the property, "linuxFxVersion": "DOCKER|marstr/musicvotes". Are you not getting that, @tombuildsstuff?
edit: I'm going to start writing a test in the Go SDK samples repository to see if I can repro @tombuildsstuff's results.
@marstr thanks for confirming that, I'll take a look into this later this week - it could well be this is now returned in the new API version? Thanks!
For what it's worth, I'm submitting a PR into the Azure-Samples/azure-sdk-for-go-samples repository that spins up a WebApp for containers, then fetches the value of LinuxFxVersion: https://github.com/Azure-Samples/azure-sdk-for-go-samples/pull/187
Let me know if there's anything else I can do to make the sample a defacto repro for this issue. :)
@yungezz can you confirm if this issue has been resolved - I don't believe this has been fixed?
HI @tombuildstuff, https://github.com/Azure/azure-rest-api-specs/issues/1698#issuecomment-391147095 shared the sample of getting LinuxFxVersion in go. Could you pls give it a try? We're cleanup legacy issues no updating in years.
Most helpful comment
Hey there, are there any updates available? :) @naveedaz