gray-sunset-39305
05/20/2022, 11:18 PMnetwork, err := docker.NewNetwork(ctx, "trustified", &docker.NetworkArgs{
Attachable: pulumi.Bool(true),
Name: pulumi.String("trustified-" + stack),
})
And now trying to launch a container in that network, but I’m not certain what to put in the “NetworksAdvanced” field. It seems like my network var should be the right thing but it errors because networks doesn’t implement ContainerNetworksAdvancedArrayInput.
Here’s the code I’m using:
apiContainer, err := docker.NewContainer(ctx, "api", &docker.ContainerArgs{
Envs: pulumi.ToStringArray(apiEnvVars),
Healthcheck: nil,
Image: api.ImageName,
Name: pulumi.String("api"),
NetworksAdvanced: network,
Ports: nil,
Volumes: nil,
})
How do I transform the network I created to a ContainerNetworksAdvancedArrayInput type?No matter how you like to participate in developer communities, Pulumi wants to meet you there. If you want to meet other Pulumi users to share use-cases and best practices, contribute code or documentation, see us at an event, or just tell a story about something cool you did with Pulumi, you are part of our community.
Powered by