steambun
steambun

Reputation: 51

Azure APIM Import OpenAPI Spec Failing in GitHub Build Actions

After loggging into Azure from my GitHub Build action I am trying to update my APIM OpenAPI spec to keep it in sync with my source code.

I try to do this by executing the following:

- name: Update APIM Specification uses: azure/CLI@v1 with: azcliversion: 2.0.72 inlineScript: | az apim api import --resource-group prod-rg --service-name MyAppAPI --path /myapp/v1 --specification-format OpenApi --specification-path ./openapi_spec.yaml --api-id my-app --subscription-required false

And I was expecting the action to be performed successfully. Unfortunately I get the following error:

Starting script execution via docker image mcr.microsoft.com/azure-cli:2.0.72 ERROR: az apim: 'api' is not in the 'az apim' command group. See 'az apim --help'. Error: Error: az cli script failed.

I have read the docs and It's not clear why this couldn't be available to run. I am "running on":

runs-on: ubuntu-latest

Upvotes: 0

Views: 155

Answers (1)

Vitaliy Kurokhtin
Vitaliy Kurokhtin

Reputation: 7810

According to docs: https://learn.microsoft.com/en-us/cli/azure/release-notes-azure-cli#august-04-2020 az apim api import was added only in version 2.10.0.

Upvotes: 2

Related Questions