GroupArgs

data class GroupArgs(val containers: Output<List<GroupContainerArgs>>? = null, val diagnostics: Output<GroupDiagnosticsArgs>? = null, val dnsConfig: Output<GroupDnsConfigArgs>? = null, val dnsNameLabel: Output<String>? = null, val dnsNameLabelReusePolicy: Output<String>? = null, val exposedPorts: Output<List<GroupExposedPortArgs>>? = null, val identity: Output<GroupIdentityArgs>? = null, val imageRegistryCredentials: Output<List<GroupImageRegistryCredentialArgs>>? = null, val initContainers: Output<List<GroupInitContainerArgs>>? = null, val ipAddressType: Output<String>? = null, val keyVaultKeyId: Output<String>? = null, val keyVaultUserAssignedIdentityId: Output<String>? = null, val location: Output<String>? = null, val name: Output<String>? = null, val networkProfileId: Output<String>? = null, val osType: Output<String>? = null, val priority: Output<String>? = null, val resourceGroupName: Output<String>? = null, val restartPolicy: Output<String>? = null, val sku: Output<String>? = null, val subnetIds: Output<String>? = null, val tags: Output<Map<String, String>>? = null, val zones: Output<List<String>>? = null) : ConvertibleToJava<GroupArgs>

Manages as an Azure Container Group instance.

Example Usage

This example provisions a Basic Container.

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = new azure.core.ResourceGroup("example", {
name: "example-resources",
location: "West Europe",
});
const exampleGroup = new azure.containerservice.Group("example", {
name: "example-continst",
location: example.location,
resourceGroupName: example.name,
ipAddressType: "Public",
dnsNameLabel: "aci-label",
osType: "Linux",
containers: [
{
name: "hello-world",
image: "mcr.microsoft.com/azuredocs/aci-helloworld:latest",
cpu: 0.5,
memory: 1.5,
ports: [{
port: 443,
protocol: "TCP",
}],
},
{
name: "sidecar",
image: "mcr.microsoft.com/azuredocs/aci-tutorial-sidecar",
cpu: 0.5,
memory: 1.5,
},
],
tags: {
environment: "testing",
},
});
import pulumi
import pulumi_azure as azure
example = azure.core.ResourceGroup("example",
name="example-resources",
location="West Europe")
example_group = azure.containerservice.Group("example",
name="example-continst",
location=example.location,
resource_group_name=example.name,
ip_address_type="Public",
dns_name_label="aci-label",
os_type="Linux",
containers=[
{
"name": "hello-world",
"image": "mcr.microsoft.com/azuredocs/aci-helloworld:latest",
"cpu": 0.5,
"memory": 1.5,
"ports": [{
"port": 443,
"protocol": "TCP",
}],
},
{
"name": "sidecar",
"image": "mcr.microsoft.com/azuredocs/aci-tutorial-sidecar",
"cpu": 0.5,
"memory": 1.5,
},
],
tags={
"environment": "testing",
})
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var example = new Azure.Core.ResourceGroup("example", new()
{
Name = "example-resources",
Location = "West Europe",
});
var exampleGroup = new Azure.ContainerService.Group("example", new()
{
Name = "example-continst",
Location = example.Location,
ResourceGroupName = example.Name,
IpAddressType = "Public",
DnsNameLabel = "aci-label",
OsType = "Linux",
Containers = new[]
{
new Azure.ContainerService.Inputs.GroupContainerArgs
{
Name = "hello-world",
Image = "mcr.microsoft.com/azuredocs/aci-helloworld:latest",
Cpu = 0.5,
Memory = 1.5,
Ports = new[]
{
new Azure.ContainerService.Inputs.GroupContainerPortArgs
{
Port = 443,
Protocol = "TCP",
},
},
},
new Azure.ContainerService.Inputs.GroupContainerArgs
{
Name = "sidecar",
Image = "mcr.microsoft.com/azuredocs/aci-tutorial-sidecar",
Cpu = 0.5,
Memory = 1.5,
},
},
Tags =
{
{ "environment", "testing" },
},
});
});
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/containerservice"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
Name: pulumi.String("example-resources"),
Location: pulumi.String("West Europe"),
})
if err != nil {
return err
}
_, err = containerservice.NewGroup(ctx, "example", &containerservice.GroupArgs{
Name: pulumi.String("example-continst"),
Location: example.Location,
ResourceGroupName: example.Name,
IpAddressType: pulumi.String("Public"),
DnsNameLabel: pulumi.String("aci-label"),
OsType: pulumi.String("Linux"),
Containers: containerservice.GroupContainerArray{
&containerservice.GroupContainerArgs{
Name: pulumi.String("hello-world"),
Image: pulumi.String("mcr.microsoft.com/azuredocs/aci-helloworld:latest"),
Cpu: pulumi.Float64(0.5),
Memory: pulumi.Float64(1.5),
Ports: containerservice.GroupContainerPortArray{
&containerservice.GroupContainerPortArgs{
Port: pulumi.Int(443),
Protocol: pulumi.String("TCP"),
},
},
},
&containerservice.GroupContainerArgs{
Name: pulumi.String("sidecar"),
Image: pulumi.String("mcr.microsoft.com/azuredocs/aci-tutorial-sidecar"),
Cpu: pulumi.Float64(0.5),
Memory: pulumi.Float64(1.5),
},
},
Tags: pulumi.StringMap{
"environment": pulumi.String("testing"),
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.containerservice.Group;
import com.pulumi.azure.containerservice.GroupArgs;
import com.pulumi.azure.containerservice.inputs.GroupContainerArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new ResourceGroup("example", ResourceGroupArgs.builder()
.name("example-resources")
.location("West Europe")
.build());
var exampleGroup = new Group("exampleGroup", GroupArgs.builder()
.name("example-continst")
.location(example.location())
.resourceGroupName(example.name())
.ipAddressType("Public")
.dnsNameLabel("aci-label")
.osType("Linux")
.containers(
GroupContainerArgs.builder()
.name("hello-world")
.image("mcr.microsoft.com/azuredocs/aci-helloworld:latest")
.cpu("0.5")
.memory("1.5")
.ports(GroupContainerPortArgs.builder()
.port(443)
.protocol("TCP")
.build())
.build(),
GroupContainerArgs.builder()
.name("sidecar")
.image("mcr.microsoft.com/azuredocs/aci-tutorial-sidecar")
.cpu("0.5")
.memory("1.5")
.build())
.tags(Map.of("environment", "testing"))
.build());
}
}
resources:
example:
type: azure:core:ResourceGroup
properties:
name: example-resources
location: West Europe
exampleGroup:
type: azure:containerservice:Group
name: example
properties:
name: example-continst
location: ${example.location}
resourceGroupName: ${example.name}
ipAddressType: Public
dnsNameLabel: aci-label
osType: Linux
containers:
- name: hello-world
image: mcr.microsoft.com/azuredocs/aci-helloworld:latest
cpu: '0.5'
memory: '1.5'
ports:
- port: 443
protocol: TCP
- name: sidecar
image: mcr.microsoft.com/azuredocs/aci-tutorial-sidecar
cpu: '0.5'
memory: '1.5'
tags:
environment: testing

Import

Container Group's can be imported using the resource id, e.g.

$ pulumi import azure:containerservice/group:Group containerGroup1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.ContainerInstance/containerGroups/myContainerGroup1

Constructors

Link copied to clipboard
constructor(containers: Output<List<GroupContainerArgs>>? = null, diagnostics: Output<GroupDiagnosticsArgs>? = null, dnsConfig: Output<GroupDnsConfigArgs>? = null, dnsNameLabel: Output<String>? = null, dnsNameLabelReusePolicy: Output<String>? = null, exposedPorts: Output<List<GroupExposedPortArgs>>? = null, identity: Output<GroupIdentityArgs>? = null, imageRegistryCredentials: Output<List<GroupImageRegistryCredentialArgs>>? = null, initContainers: Output<List<GroupInitContainerArgs>>? = null, ipAddressType: Output<String>? = null, keyVaultKeyId: Output<String>? = null, keyVaultUserAssignedIdentityId: Output<String>? = null, location: Output<String>? = null, name: Output<String>? = null, networkProfileId: Output<String>? = null, osType: Output<String>? = null, priority: Output<String>? = null, resourceGroupName: Output<String>? = null, restartPolicy: Output<String>? = null, sku: Output<String>? = null, subnetIds: Output<String>? = null, tags: Output<Map<String, String>>? = null, zones: Output<List<String>>? = null)

Properties

Link copied to clipboard
val containers: Output<List<GroupContainerArgs>>? = null

The definition of a container that is part of the group as documented in the container block below. Changing this forces a new resource to be created.

Link copied to clipboard
val diagnostics: Output<GroupDiagnosticsArgs>? = null

A diagnostics block as documented below. Changing this forces a new resource to be created.

Link copied to clipboard
val dnsConfig: Output<GroupDnsConfigArgs>? = null

A dns_config block as documented below. Changing this forces a new resource to be created.

Link copied to clipboard
val dnsNameLabel: Output<String>? = null

The DNS label/name for the container group's IP. Changing this forces a new resource to be created.

Link copied to clipboard
val dnsNameLabelReusePolicy: Output<String>? = null

The value representing the security enum. Noreuse, ResourceGroupReuse, SubscriptionReuse, TenantReuse or Unsecure. Defaults to Unsecure. Changing this forces a new resource to be created.

Link copied to clipboard
val exposedPorts: Output<List<GroupExposedPortArgs>>? = null

Zero or more exposed_port blocks as defined below. Changing this forces a new resource to be created.

Link copied to clipboard
val identity: Output<GroupIdentityArgs>? = null

An identity block as defined below.

Link copied to clipboard

An image_registry_credential block as documented below. Changing this forces a new resource to be created.

Link copied to clipboard

The definition of an init container that is part of the group as documented in the init_container block below. Changing this forces a new resource to be created.

Link copied to clipboard
val ipAddressType: Output<String>? = null

Specifies the IP address type of the container. Public, Private or None. Changing this forces a new resource to be created. If set to Private, subnet_ids also needs to be set. Defaults to Public.

Link copied to clipboard
val keyVaultKeyId: Output<String>? = null

The Key Vault key URI for CMK encryption. Changing this forces a new resource to be created.

Link copied to clipboard

The user assigned identity that has access to the Key Vault Key. If not specified, the RP principal named "Azure Container Instance Service" will be used instead. Make sure the identity has the proper key_permissions set, at least with Get, UnwrapKey, WrapKey and GetRotationPolicy.

Link copied to clipboard
val location: Output<String>? = null

Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

Link copied to clipboard
val name: Output<String>? = null

Specifies the name of the Container Group. Changing this forces a new resource to be created.

Link copied to clipboard
val networkProfileId: Output<String>? = null
Link copied to clipboard
val osType: Output<String>? = null

The OS for the container group. Allowed values are Linux and Windows. Changing this forces a new resource to be created.

Link copied to clipboard
val priority: Output<String>? = null

The priority of the Container Group. Possible values are Regular and Spot. Changing this forces a new resource to be created.

Link copied to clipboard
val resourceGroupName: Output<String>? = null

The name of the resource group in which to create the Container Group. Changing this forces a new resource to be created.

Link copied to clipboard
val restartPolicy: Output<String>? = null

Restart policy for the container group. Allowed values are Always, Never, OnFailure. Defaults to Always. Changing this forces a new resource to be created.

Link copied to clipboard
val sku: Output<String>? = null

Specifies the sku of the Container Group. Possible values are Confidential, Dedicated and Standard. Defaults to Standard. Changing this forces a new resource to be created.

Link copied to clipboard
val subnetIds: Output<String>? = null

The subnet resource IDs for a container group. Changing this forces a new resource to be created.

Link copied to clipboard
val tags: Output<Map<String, String>>? = null

A mapping of tags to assign to the resource.

Link copied to clipboard
val zones: Output<List<String>>? = null

A list of Availability Zones in which this Container Group is located. Changing this forces a new resource to be created.

Functions

Link copied to clipboard
open override fun toJava(): GroupArgs