1. Packages
  2. Azure Classic
  3. API Docs
  4. network
  5. getIpGroups

We recommend using Azure Native.

Azure v6.21.0 published on Friday, Mar 7, 2025 by Pulumi

azure.network.getIpGroups

Explore with Pulumi AI

We recommend using Azure Native.

Azure v6.21.0 published on Friday, Mar 7, 2025 by Pulumi

Use this data source to access information about existing IP Groups.

Example Usage

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

const example = azure.network.getIpGroups({
    name: "existing",
    resourceGroupName: "existing",
});
export const ids = example.then(example => example.ids);
Copy
import pulumi
import pulumi_azure as azure

example = azure.network.get_ip_groups(name="existing",
    resource_group_name="existing")
pulumi.export("ids", example.ids)
Copy
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := network.GetIpGroups(ctx, &network.GetIpGroupsArgs{
			Name:              "existing",
			ResourceGroupName: "existing",
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("ids", example.Ids)
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;

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

    return new Dictionary<string, object?>
    {
        ["ids"] = example.Apply(getIpGroupsResult => getIpGroupsResult.Ids),
    };
});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.network.NetworkFunctions;
import com.pulumi.azure.network.inputs.GetIpGroupsArgs;
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 = NetworkFunctions.getIpGroups(GetIpGroupsArgs.builder()
            .name("existing")
            .resourceGroupName("existing")
            .build());

        ctx.export("ids", example.applyValue(getIpGroupsResult -> getIpGroupsResult.ids()));
    }
}
Copy
variables:
  example:
    fn::invoke:
      function: azure:network:getIpGroups
      arguments:
        name: existing
        resourceGroupName: existing
outputs:
  ids: ${example.ids}
Copy

Using getIpGroups

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 getIpGroups(args: GetIpGroupsArgs, opts?: InvokeOptions): Promise<GetIpGroupsResult>
function getIpGroupsOutput(args: GetIpGroupsOutputArgs, opts?: InvokeOptions): Output<GetIpGroupsResult>
Copy
def get_ip_groups(name: Optional[str] = None,
                  resource_group_name: Optional[str] = None,
                  opts: Optional[InvokeOptions] = None) -> GetIpGroupsResult
def get_ip_groups_output(name: Optional[pulumi.Input[str]] = None,
                  resource_group_name: Optional[pulumi.Input[str]] = None,
                  opts: Optional[InvokeOptions] = None) -> Output[GetIpGroupsResult]
Copy
func GetIpGroups(ctx *Context, args *GetIpGroupsArgs, opts ...InvokeOption) (*GetIpGroupsResult, error)
func GetIpGroupsOutput(ctx *Context, args *GetIpGroupsOutputArgs, opts ...InvokeOption) GetIpGroupsResultOutput
Copy

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

public static class GetIpGroups 
{
    public static Task<GetIpGroupsResult> InvokeAsync(GetIpGroupsArgs args, InvokeOptions? opts = null)
    public static Output<GetIpGroupsResult> Invoke(GetIpGroupsInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetIpGroupsResult> getIpGroups(GetIpGroupsArgs args, InvokeOptions options)
public static Output<GetIpGroupsResult> getIpGroups(GetIpGroupsArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: azure:network/getIpGroups:getIpGroups
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Name This property is required. string
A substring to match some number of IP Groups.
ResourceGroupName This property is required. string
The name of the Resource Group where the IP Groups exist.
Name This property is required. string
A substring to match some number of IP Groups.
ResourceGroupName This property is required. string
The name of the Resource Group where the IP Groups exist.
name This property is required. String
A substring to match some number of IP Groups.
resourceGroupName This property is required. String
The name of the Resource Group where the IP Groups exist.
name This property is required. string
A substring to match some number of IP Groups.
resourceGroupName This property is required. string
The name of the Resource Group where the IP Groups exist.
name This property is required. str
A substring to match some number of IP Groups.
resource_group_name This property is required. str
The name of the Resource Group where the IP Groups exist.
name This property is required. String
A substring to match some number of IP Groups.
resourceGroupName This property is required. String
The name of the Resource Group where the IP Groups exist.

getIpGroups Result

The following output properties are available:

Id string
The provider-assigned unique ID for this managed resource.
Ids List<string>
A list of IP Group IDs.
Location string
Name string
Names List<string>
A list of IP Group Names.
ResourceGroupName string
Tags Dictionary<string, string>
Id string
The provider-assigned unique ID for this managed resource.
Ids []string
A list of IP Group IDs.
Location string
Name string
Names []string
A list of IP Group Names.
ResourceGroupName string
Tags map[string]string
id String
The provider-assigned unique ID for this managed resource.
ids List<String>
A list of IP Group IDs.
location String
name String
names List<String>
A list of IP Group Names.
resourceGroupName String
tags Map<String,String>
id string
The provider-assigned unique ID for this managed resource.
ids string[]
A list of IP Group IDs.
location string
name string
names string[]
A list of IP Group Names.
resourceGroupName string
tags {[key: string]: string}
id str
The provider-assigned unique ID for this managed resource.
ids Sequence[str]
A list of IP Group IDs.
location str
name str
names Sequence[str]
A list of IP Group Names.
resource_group_name str
tags Mapping[str, str]
id String
The provider-assigned unique ID for this managed resource.
ids List<String>
A list of IP Group IDs.
location String
name String
names List<String>
A list of IP Group Names.
resourceGroupName String
tags Map<String>

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.21.0 published on Friday, Mar 7, 2025 by Pulumi