1. Packages
  2. Azure Classic
  3. API Docs
  4. containerservice
  5. getGroup

We recommend using Azure Native.

Azure v6.22.0 published on Tuesday, Apr 1, 2025 by Pulumi

azure.containerservice.getGroup

Explore with Pulumi AI

We recommend using Azure Native.

Azure v6.22.0 published on Tuesday, Apr 1, 2025 by Pulumi

Use this data source to access information about an existing Container Group instance.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const example = azure.containerservice.getGroup({
    name: "existing",
    resourceGroupName: "existing",
});
export const id = example.then(example => example.id);
export const ipAddress = example.then(example => example.ipAddress);
export const fqdn = example.then(example => example.fqdn);
Copy
import pulumi
import pulumi_azure as azure

example = azure.containerservice.get_group(name="existing",
    resource_group_name="existing")
pulumi.export("id", example.id)
pulumi.export("ipAddress", example.ip_address)
pulumi.export("fqdn", example.fqdn)
Copy
package main

import (
	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/containerservice"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := containerservice.LookupGroup(ctx, &containerservice.LookupGroupArgs{
			Name:              "existing",
			ResourceGroupName: "existing",
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("id", example.Id)
		ctx.Export("ipAddress", example.IpAddress)
		ctx.Export("fqdn", example.Fqdn)
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;

return await Deployment.RunAsync(() => 
{
    var example = Azure.ContainerService.GetGroup.Invoke(new()
    {
        Name = "existing",
        ResourceGroupName = "existing",
    });

    return new Dictionary<string, object?>
    {
        ["id"] = example.Apply(getGroupResult => getGroupResult.Id),
        ["ipAddress"] = example.Apply(getGroupResult => getGroupResult.IpAddress),
        ["fqdn"] = example.Apply(getGroupResult => getGroupResult.Fqdn),
    };
});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.containerservice.ContainerserviceFunctions;
import com.pulumi.azure.containerservice.inputs.GetGroupArgs;
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) {
        final var example = ContainerserviceFunctions.getGroup(GetGroupArgs.builder()
            .name("existing")
            .resourceGroupName("existing")
            .build());

        ctx.export("id", example.applyValue(getGroupResult -> getGroupResult.id()));
        ctx.export("ipAddress", example.applyValue(getGroupResult -> getGroupResult.ipAddress()));
        ctx.export("fqdn", example.applyValue(getGroupResult -> getGroupResult.fqdn()));
    }
}
Copy
variables:
  example:
    fn::invoke:
      function: azure:containerservice:getGroup
      arguments:
        name: existing
        resourceGroupName: existing
outputs:
  id: ${example.id}
  ipAddress: ${example.ipAddress}
  fqdn: ${example.fqdn}
Copy

Using getGroup

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getGroup(args: GetGroupArgs, opts?: InvokeOptions): Promise<GetGroupResult>
function getGroupOutput(args: GetGroupOutputArgs, opts?: InvokeOptions): Output<GetGroupResult>
Copy
def get_group(name: Optional[str] = None,
              resource_group_name: Optional[str] = None,
              zones: Optional[Sequence[str]] = None,
              opts: Optional[InvokeOptions] = None) -> GetGroupResult
def get_group_output(name: Optional[pulumi.Input[str]] = None,
              resource_group_name: Optional[pulumi.Input[str]] = None,
              zones: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
              opts: Optional[InvokeOptions] = None) -> Output[GetGroupResult]
Copy
func LookupGroup(ctx *Context, args *LookupGroupArgs, opts ...InvokeOption) (*LookupGroupResult, error)
func LookupGroupOutput(ctx *Context, args *LookupGroupOutputArgs, opts ...InvokeOption) LookupGroupResultOutput
Copy

> Note: This function is named LookupGroup in the Go SDK.

public static class GetGroup 
{
    public static Task<GetGroupResult> InvokeAsync(GetGroupArgs args, InvokeOptions? opts = null)
    public static Output<GetGroupResult> Invoke(GetGroupInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetGroupResult> getGroup(GetGroupArgs args, InvokeOptions options)
public static Output<GetGroupResult> getGroup(GetGroupArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: azure:containerservice/getGroup:getGroup
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Name This property is required. string
The name of this Container Group instance.
ResourceGroupName This property is required. string
The name of the Resource Group where the Container Group instance exists.
Zones Changes to this property will trigger replacement. List<string>
A list of Availability Zones in which this Container Group is located.
Name This property is required. string
The name of this Container Group instance.
ResourceGroupName This property is required. string
The name of the Resource Group where the Container Group instance exists.
Zones Changes to this property will trigger replacement. []string
A list of Availability Zones in which this Container Group is located.
name This property is required. String
The name of this Container Group instance.
resourceGroupName This property is required. String
The name of the Resource Group where the Container Group instance exists.
zones Changes to this property will trigger replacement. List<String>
A list of Availability Zones in which this Container Group is located.
name This property is required. string
The name of this Container Group instance.
resourceGroupName This property is required. string
The name of the Resource Group where the Container Group instance exists.
zones Changes to this property will trigger replacement. string[]
A list of Availability Zones in which this Container Group is located.
name This property is required. str
The name of this Container Group instance.
resource_group_name This property is required. str
The name of the Resource Group where the Container Group instance exists.
zones Changes to this property will trigger replacement. Sequence[str]
A list of Availability Zones in which this Container Group is located.
name This property is required. String
The name of this Container Group instance.
resourceGroupName This property is required. String
The name of the Resource Group where the Container Group instance exists.
zones Changes to this property will trigger replacement. List<String>
A list of Availability Zones in which this Container Group is located.

getGroup Result

The following output properties are available:

Fqdn string
The FQDN of the Container Group instance derived from dns_name_label.
Id string
The provider-assigned unique ID for this managed resource.
Identities List<GetGroupIdentity>
A identity block as defined below.
IpAddress string
The IP address allocated to the Container Group instance.
Location string
The Azure Region where the Container Group instance exists.
Name string
ResourceGroupName string
SubnetIds List<string>
The subnet resource IDs for a container group.
Tags Dictionary<string, string>
A mapping of tags assigned to the Container Group instance.
Zones List<string>
A list of Availability Zones in which this Container Group is located.
Fqdn string
The FQDN of the Container Group instance derived from dns_name_label.
Id string
The provider-assigned unique ID for this managed resource.
Identities []GetGroupIdentity
A identity block as defined below.
IpAddress string
The IP address allocated to the Container Group instance.
Location string
The Azure Region where the Container Group instance exists.
Name string
ResourceGroupName string
SubnetIds []string
The subnet resource IDs for a container group.
Tags map[string]string
A mapping of tags assigned to the Container Group instance.
Zones []string
A list of Availability Zones in which this Container Group is located.
fqdn String
The FQDN of the Container Group instance derived from dns_name_label.
id String
The provider-assigned unique ID for this managed resource.
identities List<GetGroupIdentity>
A identity block as defined below.
ipAddress String
The IP address allocated to the Container Group instance.
location String
The Azure Region where the Container Group instance exists.
name String
resourceGroupName String
subnetIds List<String>
The subnet resource IDs for a container group.
tags Map<String,String>
A mapping of tags assigned to the Container Group instance.
zones List<String>
A list of Availability Zones in which this Container Group is located.
fqdn string
The FQDN of the Container Group instance derived from dns_name_label.
id string
The provider-assigned unique ID for this managed resource.
identities GetGroupIdentity[]
A identity block as defined below.
ipAddress string
The IP address allocated to the Container Group instance.
location string
The Azure Region where the Container Group instance exists.
name string
resourceGroupName string
subnetIds string[]
The subnet resource IDs for a container group.
tags {[key: string]: string}
A mapping of tags assigned to the Container Group instance.
zones string[]
A list of Availability Zones in which this Container Group is located.
fqdn str
The FQDN of the Container Group instance derived from dns_name_label.
id str
The provider-assigned unique ID for this managed resource.
identities Sequence[GetGroupIdentity]
A identity block as defined below.
ip_address str
The IP address allocated to the Container Group instance.
location str
The Azure Region where the Container Group instance exists.
name str
resource_group_name str
subnet_ids Sequence[str]
The subnet resource IDs for a container group.
tags Mapping[str, str]
A mapping of tags assigned to the Container Group instance.
zones Sequence[str]
A list of Availability Zones in which this Container Group is located.
fqdn String
The FQDN of the Container Group instance derived from dns_name_label.
id String
The provider-assigned unique ID for this managed resource.
identities List<Property Map>
A identity block as defined below.
ipAddress String
The IP address allocated to the Container Group instance.
location String
The Azure Region where the Container Group instance exists.
name String
resourceGroupName String
subnetIds List<String>
The subnet resource IDs for a container group.
tags Map<String>
A mapping of tags assigned to the Container Group instance.
zones List<String>
A list of Availability Zones in which this Container Group is located.

Supporting Types

GetGroupIdentity

IdentityIds This property is required. List<string>
The list of User Assigned Managed Identity IDs assigned to this Container Group.
PrincipalId This property is required. string
The Principal ID of the System Assigned Managed Service Identity that is configured on this Container Group.
TenantId This property is required. string
The Tenant ID of the System Assigned Managed Service Identity that is configured on this Container Group.
Type This property is required. string
Type of Managed Service Identity configured on this Container Group.
IdentityIds This property is required. []string
The list of User Assigned Managed Identity IDs assigned to this Container Group.
PrincipalId This property is required. string
The Principal ID of the System Assigned Managed Service Identity that is configured on this Container Group.
TenantId This property is required. string
The Tenant ID of the System Assigned Managed Service Identity that is configured on this Container Group.
Type This property is required. string
Type of Managed Service Identity configured on this Container Group.
identityIds This property is required. List<String>
The list of User Assigned Managed Identity IDs assigned to this Container Group.
principalId This property is required. String
The Principal ID of the System Assigned Managed Service Identity that is configured on this Container Group.
tenantId This property is required. String
The Tenant ID of the System Assigned Managed Service Identity that is configured on this Container Group.
type This property is required. String
Type of Managed Service Identity configured on this Container Group.
identityIds This property is required. string[]
The list of User Assigned Managed Identity IDs assigned to this Container Group.
principalId This property is required. string
The Principal ID of the System Assigned Managed Service Identity that is configured on this Container Group.
tenantId This property is required. string
The Tenant ID of the System Assigned Managed Service Identity that is configured on this Container Group.
type This property is required. string
Type of Managed Service Identity configured on this Container Group.
identity_ids This property is required. Sequence[str]
The list of User Assigned Managed Identity IDs assigned to this Container Group.
principal_id This property is required. str
The Principal ID of the System Assigned Managed Service Identity that is configured on this Container Group.
tenant_id This property is required. str
The Tenant ID of the System Assigned Managed Service Identity that is configured on this Container Group.
type This property is required. str
Type of Managed Service Identity configured on this Container Group.
identityIds This property is required. List<String>
The list of User Assigned Managed Identity IDs assigned to this Container Group.
principalId This property is required. String
The Principal ID of the System Assigned Managed Service Identity that is configured on this Container Group.
tenantId This property is required. String
The Tenant ID of the System Assigned Managed Service Identity that is configured on this Container Group.
type This property is required. String
Type of Managed Service Identity configured on this Container Group.

Package Details

Repository
Azure Classic pulumi/pulumi-azure
License
Apache-2.0
Notes
This Pulumi package is based on the azurerm Terraform Provider.

We recommend using Azure Native.

Azure v6.22.0 published on Tuesday, Apr 1, 2025 by Pulumi