Hello @Sandro Francisco ,
It looks like the documentation is not updated and missing the creation of container instance.
Please try the example provided below, which states creation of container instance first using New-AzContainerInstanceObject and then creating Container group.
$port1 = New-AzContainerInstancePortObject -Port 8000 -Protocol TCP
$port2 = New-AzContainerInstancePortObject -Port 8001 -Protocol TCP
$container = New-AzContainerInstanceObject -Name test-container -Image nginx -RequestCpu 1 -RequestMemoryInGb 1.5 -Port @($port1, $port2)
$containerGroup = New-AzContainerGroup -ResourceGroupName test-rg -Name test-cg -Location eastus -Container $container -OsType Linux -RestartPolicy "Never" -IpAddressType Public
I have also reached out to the document owner to ensure that the Quickstart: Deploy a container instance in Azure using Azure PowerShell document is updated.
If you are still seeing difficulties creating ACI with PowerShell, let me know in the comments below and I can further investigate/engage with the right teams to ensure your query is resolved.
----------
If this answers your query, do click “Accept the answer” and Up-Vote for the same, which might be beneficial to other community members reading this thread.
And, if you have any further query do let us know in the comments.