Azure / Azure/azure-libraries-for-java
Does not seem possible to Create a ContainerGroup with multiple Container Instances
- Dominant language
- Java
- Stars
- 97
- Forks
- 102
- PR merge metrics
- No merged PRs in 30d
Description
The current Fluent API works well if you know ahead of time what containers so you can hard code the deployment.
I am trying to do:
var containerGroup = azure.containerGroups().define(groupName)
.withRegion(region)
.withExistingResourceGroup(resourceGroupName)
.withLinux()
.withPrivateImageRegistry(registryAddress, username, password)
.withoutVolume()
requests.forEach {
val thing = containerGroup.defineContainerInstance(it.instanceName)
.withImage(it.remoteImageName)
.withExternalTcpPorts(*it.portsToOpen.toIntArray())
.withEnvironmentVariables(it.env)
.attach().withRestartPolicy(ContainerGroupRestartPolicy.ON_FAILURE)
.withDnsPrefix("${it.instanceName}-$networkName")
}
where a loop will add a container instance to the group.
This does not seem possible.
Contributor guide
Assessment
This issue has not been assessed yet.