Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azure.containerservice.kotlin
import com.pulumi.azure.containerservice.GroupArgs.builder
import com.pulumi.azure.containerservice.kotlin.inputs.GroupContainerArgs
import com.pulumi.azure.containerservice.kotlin.inputs.GroupContainerArgsBuilder
import com.pulumi.azure.containerservice.kotlin.inputs.GroupDiagnosticsArgs
import com.pulumi.azure.containerservice.kotlin.inputs.GroupDiagnosticsArgsBuilder
import com.pulumi.azure.containerservice.kotlin.inputs.GroupDnsConfigArgs
import com.pulumi.azure.containerservice.kotlin.inputs.GroupDnsConfigArgsBuilder
import com.pulumi.azure.containerservice.kotlin.inputs.GroupExposedPortArgs
import com.pulumi.azure.containerservice.kotlin.inputs.GroupExposedPortArgsBuilder
import com.pulumi.azure.containerservice.kotlin.inputs.GroupIdentityArgs
import com.pulumi.azure.containerservice.kotlin.inputs.GroupIdentityArgsBuilder
import com.pulumi.azure.containerservice.kotlin.inputs.GroupImageRegistryCredentialArgs
import com.pulumi.azure.containerservice.kotlin.inputs.GroupImageRegistryCredentialArgsBuilder
import com.pulumi.azure.containerservice.kotlin.inputs.GroupInitContainerArgs
import com.pulumi.azure.containerservice.kotlin.inputs.GroupInitContainerArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Deprecated
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName
/**
* Manages as an Azure Container Group instance.
* > **Note** `network_profile_id` is [deprecated](https://docs.microsoft.com/en-us/azure/container-instances/container-instances-vnet) by Azure. For users who want to continue to manage existing `azure.containerservice.Group` that rely on `network_profile_id`, please stay on provider versions prior to v3.16.0. Otherwise, use `subnet_ids` instead.
* ## Example Usage
* This example provisions a Basic Container.
*
* ```typescript
* 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",
* },
* });
* ```
* ```python
* 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",
* })
* ```
* ```csharp
* 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" },
* },
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/containerservice"
* "github.com/pulumi/pulumi-azure/sdk/v5/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
* })
* }
* ```
* ```java
* 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());
* }
* }
* ```
* ```yaml
* 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.
* ```sh
* $ pulumi import azure:containerservice/group:Group containerGroup1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.ContainerInstance/containerGroups/myContainerGroup1
* ```
* @property containers 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.
* @property diagnostics A `diagnostics` block as documented below. Changing this forces a new resource to be created.
* @property dnsConfig A `dns_config` block as documented below. Changing this forces a new resource to be created.
* @property dnsNameLabel The DNS label/name for the container group's IP. Changing this forces a new resource to be created.
* > **Note:** DNS label/name is not supported when deploying to virtual networks.
* @property dnsNameLabelReusePolicy The value representing the security enum. `Noreuse`, `ResourceGroupReuse`, `SubscriptionReuse`, `TenantReuse` or `Unsecure`. Defaults to `Unsecure`.
* @property exposedPorts Zero or more `exposed_port` blocks as defined below. Changing this forces a new resource to be created.
* > **Note:** The `exposed_port` can only contain ports that are also exposed on one or more containers in the group.
* @property identity An `identity` block as defined below.
* @property imageRegistryCredentials An `image_registry_credential` block as documented below. Changing this forces a new resource to be created.
* @property initContainers 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.
* @property ipAddressType 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`.
* > **Note:** `dns_name_label` and `os_type` set to `windows` are not compatible with `Private` `ip_address_type`
* @property keyVaultKeyId The Key Vault key URI for CMK encryption. Changing this forces a new resource to be created.
* @property keyVaultUserAssignedIdentityId 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`.
* @property location Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
* @property name Specifies the name of the Container Group. Changing this forces a new resource to be created.
* @property networkProfileId
* @property osType The OS for the container group. Allowed values are `Linux` and `Windows`. Changing this forces a new resource to be created.
* > **Note:** if `os_type` is set to `Windows` currently only a single `container` block is supported. Windows containers are not supported in virtual networks.
* @property priority The priority of the Container Group. Possible values are `Regular` and `Spot`. Changing this forces a new resource to be created.
* > **NOTE:** When `priority` is set to `Spot`, the `ip_address_type` has to be `None`.
* @property resourceGroupName The name of the resource group in which to create the Container Group. Changing this forces a new resource to be created.
* @property restartPolicy Restart policy for the container group. Allowed values are `Always`, `Never`, `OnFailure`. Defaults to `Always`. Changing this forces a new resource to be created.
* @property sku 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.
* @property subnetIds The subnet resource IDs for a container group. Changing this forces a new resource to be created.
* @property tags A mapping of tags to assign to the resource.
* @property zones A list of Availability Zones in which this Container Group is located. Changing this forces a new resource to be created.
*/
public data class GroupArgs(
public val containers: Output>? = null,
public val diagnostics: Output? = null,
public val dnsConfig: Output? = null,
public val dnsNameLabel: Output? = null,
public val dnsNameLabelReusePolicy: Output? = null,
public val exposedPorts: Output>? = null,
public val identity: Output? = null,
public val imageRegistryCredentials: Output>? = null,
public val initContainers: Output>? = null,
public val ipAddressType: Output? = null,
public val keyVaultKeyId: Output? = null,
public val keyVaultUserAssignedIdentityId: Output? = null,
public val location: Output? = null,
public val name: Output? = null,
@Deprecated(
message = """
the 'network_profile_id' has been removed from the latest versions of the container instance API
and has been deprecated. It no longer functions and will be removed from the 4.0 AzureRM
provider. Please use the 'subnet_ids' field instead
""",
)
public val networkProfileId: Output? = null,
public val osType: Output? = null,
public val priority: Output? = null,
public val resourceGroupName: Output? = null,
public val restartPolicy: Output? = null,
public val sku: Output? = null,
public val subnetIds: Output? = null,
public val tags: Output