in the yaml example <https://docs.microsoft.com/en...
# azure
o
in the yaml example https://docs.microsoft.com/en-us/azure/container-instances/container-instances-vnet#example---yaml you can add subnetIds. But i cannot find that settings in the ContainerGroupArgs
I have used
'@pulumi/azure-native/containerinstance/v20211001/index.js'
now and got the
subnetIds
property, but when I add the
subnetIds
to the containergroup:
Copy code
const myAppApp = new containerinstance.ContainerGroup('gpu-containergroup', {

    osType: 'linux'
    , restartPolicy: containerinstance.ContainerGroupRestartPolicy.Never // [TODO] change
    , resourceGroupName: resourceGroup.name
     ,subnetIds:[{
        id:backendSubnetId
        ,name:'backend-subnet'
    }]
    , ipAddress: {
        ports: [{ port: 6000, protocol: 'tcp' }]
        , type: 'private'
    }
    , containers: [{
        name: "myApp",
        image: myAppImage.imageName,
        resources: {
            requests: {
                cpu: 1.0
                , memoryInGB: 1.5
                , gpu: {
                    count: 1
                    , sku: "K80"
                }
            }
        },
        ports:[{port:6000,protocol: 'tcp'}]
    }]
    , ...
}, {})
I get the following error:
Copy code
error: autorest/azure: Service returned an error. Status=<nil> Code="ServiceUnavailable" Message="The requested resource is not available in the location 'westeurope' at this moment. Please retry with a different resource request or in another location. Resource requested: '1' CPU '1.5' GB memory 'Linux' OS '1' 'K80' GPU virtual network"
without the subnetid, I can create the group without problems
anyone got an idea what I’m doing wrong?
Ok I think I found it. GPU container instances are not available for virtual networks 😞