Closed vikingua closed 1 year ago
I read that Container Apps still not in production and available only in few locations, and Canada Central one of But I can create manually in West US without any issues
@vikingua I ran into the same problem just a few days ago! I'm not sure if location parameters are supported in this workflow. Consider using the azure cli instead and invoking the command az containerapp up
like this:
steps:
- name: Deploy Azure Container app
- run: |
az containerapp up \
--environment "qualified-or-existing-env-name-here" \
--name my-app \
--resource-group ${{ secrets.RESOURCE_GROUP }}
--image index.docker.io/myusername/image:latest \
--location "West US"
Reference: azure cli docs
Also, here are other qualified locations you can use for deployment which were obtained with this command (output may vary):
Input:
az provider show -n Microsoft.App --query "resourceTypes[?resourceType=='managedEnvironments'].locations"
Output:
[
[
"Canada Central",
"West Europe",
"North Europe",
....
]
]
Hope this helps!
@vikingua @CodyCline Hey folks, thanks for the comments and discussion; currently, this GitHub Action doesn't support setting the location of the Container App, but that's something I'll work on adding as an argument soon.
In the meanwhile, here's a comment from a developer on the az containerapp
module (that this action uses) regarding the location determined for the Container App:
When creating a new ACA environment with
up
, the CLI tries to intelligently pick a suitable location (if the user didn't provide a location with--location
) by doing the following:
- Get a list of locations the user's subscription can create environments in by calling the providers API
- For each location, attempt to create an environment in that location
- Continue when an environment was successfully created or error out if all locations were exhausted
As @CodyCline pointed out above, the list of providers listed for Container Apps may begin with "Canada Central", which would be the first location that would be tried as a suitable location for the environment and application.
Thanks for bringing this up -- I'll check into adding a location argument to override this default.
@vikingua Hey there, this issue should be resolved in the latest release of the AzureContainerAppsRC
task (0.1.8) -- I also updated our documentation to call out the code snippet that @CodyCline provided to get the valid locations that Container Apps can be deployed to within the current subscription.
Please feel free to let us know if there's anything else we can help with!
Thanks @cormacpayne !!!
When I use container-apps-deploy-action I have Location : Canada Central for container-app, Log Analytics workspace and Container Apps Environment Can it be set somehow ?