We recommend using Azure Native.
Azure v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi
azure.network.getIpGroup
Explore with Pulumi AI
Use this data source to access information about an existing IP Group.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = azure.network.getIpGroup({
name: "example1-ipgroup",
resourceGroupName: "example-rg",
});
export const cidrs = example.then(example => example.cidrs);
import pulumi
import pulumi_azure as azure
example = azure.network.get_ip_group(name="example1-ipgroup",
resource_group_name="example-rg")
pulumi.export("cidrs", example.cidrs)
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.GetIpGroup(ctx, &network.GetIpGroupArgs{
Name: "example1-ipgroup",
ResourceGroupName: "example-rg",
}, nil)
if err != nil {
return err
}
ctx.Export("cidrs", example.Cidrs)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var example = Azure.Network.GetIpGroup.Invoke(new()
{
Name = "example1-ipgroup",
ResourceGroupName = "example-rg",
});
return new Dictionary<string, object?>
{
["cidrs"] = example.Apply(getIpGroupResult => getIpGroupResult.Cidrs),
};
});
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.GetIpGroupArgs;
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.getIpGroup(GetIpGroupArgs.builder()
.name("example1-ipgroup")
.resourceGroupName("example-rg")
.build());
ctx.export("cidrs", example.applyValue(getIpGroupResult -> getIpGroupResult.cidrs()));
}
}
variables:
example:
fn::invoke:
Function: azure:network:getIpGroup
Arguments:
name: example1-ipgroup
resourceGroupName: example-rg
outputs:
cidrs: ${example.cidrs}
Using getIpGroup
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 getIpGroup(args: GetIpGroupArgs, opts?: InvokeOptions): Promise<GetIpGroupResult>
function getIpGroupOutput(args: GetIpGroupOutputArgs, opts?: InvokeOptions): Output<GetIpGroupResult>
def get_ip_group(name: Optional[str] = None,
resource_group_name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetIpGroupResult
def get_ip_group_output(name: Optional[pulumi.Input[str]] = None,
resource_group_name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetIpGroupResult]
func GetIpGroup(ctx *Context, args *GetIpGroupArgs, opts ...InvokeOption) (*GetIpGroupResult, error)
func GetIpGroupOutput(ctx *Context, args *GetIpGroupOutputArgs, opts ...InvokeOption) GetIpGroupResultOutput
> Note: This function is named GetIpGroup
in the Go SDK.
public static class GetIpGroup
{
public static Task<GetIpGroupResult> InvokeAsync(GetIpGroupArgs args, InvokeOptions? opts = null)
public static Output<GetIpGroupResult> Invoke(GetIpGroupInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetIpGroupResult> getIpGroup(GetIpGroupArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: azure:network/getIpGroup:getIpGroup
arguments:
# arguments dictionary
The following arguments are supported:
- Name string
- Specifies the Name of the IP Group.
- Resource
Group stringName - Specifies the Name of the Resource Group within which the IP Group exists
- Name string
- Specifies the Name of the IP Group.
- Resource
Group stringName - Specifies the Name of the Resource Group within which the IP Group exists
- name String
- Specifies the Name of the IP Group.
- resource
Group StringName - Specifies the Name of the Resource Group within which the IP Group exists
- name string
- Specifies the Name of the IP Group.
- resource
Group stringName - Specifies the Name of the Resource Group within which the IP Group exists
- name str
- Specifies the Name of the IP Group.
- resource_
group_ strname - Specifies the Name of the Resource Group within which the IP Group exists
- name String
- Specifies the Name of the IP Group.
- resource
Group StringName - Specifies the Name of the Resource Group within which the IP Group exists
getIpGroup Result
The following output properties are available:
- Cidrs List<string>
- A list of CIDRs or IP addresses.
- Id string
- The provider-assigned unique ID for this managed resource.
- Location string
- The supported Azure location where the resource exists.
- Name string
- Resource
Group stringName - Dictionary<string, string>
- A mapping of tags assigned to the resource.
- Cidrs []string
- A list of CIDRs or IP addresses.
- Id string
- The provider-assigned unique ID for this managed resource.
- Location string
- The supported Azure location where the resource exists.
- Name string
- Resource
Group stringName - map[string]string
- A mapping of tags assigned to the resource.
- cidrs List<String>
- A list of CIDRs or IP addresses.
- id String
- The provider-assigned unique ID for this managed resource.
- location String
- The supported Azure location where the resource exists.
- name String
- resource
Group StringName - Map<String,String>
- A mapping of tags assigned to the resource.
- cidrs string[]
- A list of CIDRs or IP addresses.
- id string
- The provider-assigned unique ID for this managed resource.
- location string
- The supported Azure location where the resource exists.
- name string
- resource
Group stringName - {[key: string]: string}
- A mapping of tags assigned to the resource.
- cidrs Sequence[str]
- A list of CIDRs or IP addresses.
- id str
- The provider-assigned unique ID for this managed resource.
- location str
- The supported Azure location where the resource exists.
- name str
- resource_
group_ strname - Mapping[str, str]
- A mapping of tags assigned to the resource.
- cidrs List<String>
- A list of CIDRs or IP addresses.
- id String
- The provider-assigned unique ID for this managed resource.
- location String
- The supported Azure location where the resource exists.
- name String
- resource
Group StringName - Map<String>
- A mapping of tags assigned to the resource.
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurerm
Terraform Provider.