Error when deploying a container on a virtual network

Yannick Van Styvendael 41 Reputation points
2022-05-27T14:59:44.833+00:00

Hello,

I'm trying to deploy a container group on Azure using a YAML file. This container should be inside a virtual network.

However, when I launch the as container create command, I receive the following error message :

(InvalidRequestContent) The request content was invalid and could not be deserialized: 'Could not find member 'subnetsIds' on object of type 'ContainerGroupPropertiesDefinition'. Path 'properties.subnetsIds', line 1, position 595.'.
Code: InvalidRequestContent
Message: The request content was invalid and could not be deserialized: 'Could not find member 'subnetsIds' on object of type 'ContainerGroupPropertiesDefinition'. Path 'properties.subnetsIds', line 1, position 595.'.

The subnet exists and the ID is correct (I can do a GET using the Azure management API).

Did someone already have this issue ?

Thanks for your help :)

Yannick

Azure Container Instances
{count} votes

Answer accepted by question author
  1. shiva patpi 13,376 Reputation points Microsoft Employee Moderator
    2022-05-30T16:37:16.95+00:00

    Hello @Anonymous ,
    There was a small type in your YAML file section:
    instead of subnetsIds please use subnetids

    Sample reference YAML file: https://learn.microsoft.com/en-us/azure/container-instances/container-instances-vnet

    Let us know if you have additional questions !


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.