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

We recommend using Azure Native.

Azure Classic v5.80.0 published on Monday, Jun 10, 2024 by Pulumi

azure.network.IPGroupCIDR

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v5.80.0 published on Monday, Jun 10, 2024 by Pulumi

    Manages IP Group CIDR records.

    Warning Do not use this resource at the same time as the cidrs property of the azure.network.IPGroup resource for the same IP Group. Doing so will cause a conflict and CIDRS will be removed.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const example = new azure.core.ResourceGroup("example", {
        name: "test-rg",
        location: "West Europe",
    });
    const exampleIPGroup = new azure.network.IPGroup("example", {
        name: "test-ipgroup",
        location: example.location,
        resourceGroupName: example.name,
    });
    const exampleIPGroupCIDR = new azure.network.IPGroupCIDR("example", {
        ipGroupId: exampleIPGroup.id,
        cidr: "10.10.10.0/24",
    });
    
    import pulumi
    import pulumi_azure as azure
    
    example = azure.core.ResourceGroup("example",
        name="test-rg",
        location="West Europe")
    example_ip_group = azure.network.IPGroup("example",
        name="test-ipgroup",
        location=example.location,
        resource_group_name=example.name)
    example_ip_group_cidr = azure.network.IPGroupCIDR("example",
        ip_group_id=example_ip_group.id,
        cidr="10.10.10.0/24")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/network"
    	"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("test-rg"),
    			Location: pulumi.String("West Europe"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleIPGroup, err := network.NewIPGroup(ctx, "example", &network.IPGroupArgs{
    			Name:              pulumi.String("test-ipgroup"),
    			Location:          example.Location,
    			ResourceGroupName: example.Name,
    		})
    		if err != nil {
    			return err
    		}
    		_, err = network.NewIPGroupCIDR(ctx, "example", &network.IPGroupCIDRArgs{
    			IpGroupId: exampleIPGroup.ID(),
    			Cidr:      pulumi.String("10.10.10.0/24"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    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 = "test-rg",
            Location = "West Europe",
        });
    
        var exampleIPGroup = new Azure.Network.IPGroup("example", new()
        {
            Name = "test-ipgroup",
            Location = example.Location,
            ResourceGroupName = example.Name,
        });
    
        var exampleIPGroupCIDR = new Azure.Network.IPGroupCIDR("example", new()
        {
            IpGroupId = exampleIPGroup.Id,
            Cidr = "10.10.10.0/24",
        });
    
    });
    
    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.network.IPGroup;
    import com.pulumi.azure.network.IPGroupArgs;
    import com.pulumi.azure.network.IPGroupCIDR;
    import com.pulumi.azure.network.IPGroupCIDRArgs;
    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("test-rg")
                .location("West Europe")
                .build());
    
            var exampleIPGroup = new IPGroup("exampleIPGroup", IPGroupArgs.builder()
                .name("test-ipgroup")
                .location(example.location())
                .resourceGroupName(example.name())
                .build());
    
            var exampleIPGroupCIDR = new IPGroupCIDR("exampleIPGroupCIDR", IPGroupCIDRArgs.builder()
                .ipGroupId(exampleIPGroup.id())
                .cidr("10.10.10.0/24")
                .build());
    
        }
    }
    
    resources:
      example:
        type: azure:core:ResourceGroup
        properties:
          name: test-rg
          location: West Europe
      exampleIPGroup:
        type: azure:network:IPGroup
        name: example
        properties:
          name: test-ipgroup
          location: ${example.location}
          resourceGroupName: ${example.name}
      exampleIPGroupCIDR:
        type: azure:network:IPGroupCIDR
        name: example
        properties:
          ipGroupId: ${exampleIPGroup.id}
          cidr: 10.10.10.0/24
    

    Create IPGroupCIDR Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new IPGroupCIDR(name: string, args: IPGroupCIDRArgs, opts?: CustomResourceOptions);
    @overload
    def IPGroupCIDR(resource_name: str,
                    args: IPGroupCIDRArgs,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def IPGroupCIDR(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    cidr: Optional[str] = None,
                    ip_group_id: Optional[str] = None)
    func NewIPGroupCIDR(ctx *Context, name string, args IPGroupCIDRArgs, opts ...ResourceOption) (*IPGroupCIDR, error)
    public IPGroupCIDR(string name, IPGroupCIDRArgs args, CustomResourceOptions? opts = null)
    public IPGroupCIDR(String name, IPGroupCIDRArgs args)
    public IPGroupCIDR(String name, IPGroupCIDRArgs args, CustomResourceOptions options)
    
    type: azure:network:IPGroupCIDR
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args IPGroupCIDRArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args IPGroupCIDRArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args IPGroupCIDRArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args IPGroupCIDRArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args IPGroupCIDRArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var ipgroupCIDRResource = new Azure.Network.IPGroupCIDR("ipgroupCIDRResource", new()
    {
        Cidr = "string",
        IpGroupId = "string",
    });
    
    example, err := network.NewIPGroupCIDR(ctx, "ipgroupCIDRResource", &network.IPGroupCIDRArgs{
    	Cidr:      pulumi.String("string"),
    	IpGroupId: pulumi.String("string"),
    })
    
    var ipgroupCIDRResource = new IPGroupCIDR("ipgroupCIDRResource", IPGroupCIDRArgs.builder()
        .cidr("string")
        .ipGroupId("string")
        .build());
    
    ipgroup_cidr_resource = azure.network.IPGroupCIDR("ipgroupCIDRResource",
        cidr="string",
        ip_group_id="string")
    
    const ipgroupCIDRResource = new azure.network.IPGroupCIDR("ipgroupCIDRResource", {
        cidr: "string",
        ipGroupId: "string",
    });
    
    type: azure:network:IPGroupCIDR
    properties:
        cidr: string
        ipGroupId: string
    

    IPGroupCIDR Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The IPGroupCIDR resource accepts the following input properties:

    Cidr string
    IpGroupId string
    The ID of the destination IP Group. Changing this forces a new IP Group CIDR to be created.
    Cidr string
    IpGroupId string
    The ID of the destination IP Group. Changing this forces a new IP Group CIDR to be created.
    cidr String
    ipGroupId String
    The ID of the destination IP Group. Changing this forces a new IP Group CIDR to be created.
    cidr string
    ipGroupId string
    The ID of the destination IP Group. Changing this forces a new IP Group CIDR to be created.
    cidr str
    ip_group_id str
    The ID of the destination IP Group. Changing this forces a new IP Group CIDR to be created.
    cidr String
    ipGroupId String
    The ID of the destination IP Group. Changing this forces a new IP Group CIDR to be created.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the IPGroupCIDR resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing IPGroupCIDR Resource

    Get an existing IPGroupCIDR resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: IPGroupCIDRState, opts?: CustomResourceOptions): IPGroupCIDR
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            cidr: Optional[str] = None,
            ip_group_id: Optional[str] = None) -> IPGroupCIDR
    func GetIPGroupCIDR(ctx *Context, name string, id IDInput, state *IPGroupCIDRState, opts ...ResourceOption) (*IPGroupCIDR, error)
    public static IPGroupCIDR Get(string name, Input<string> id, IPGroupCIDRState? state, CustomResourceOptions? opts = null)
    public static IPGroupCIDR get(String name, Output<String> id, IPGroupCIDRState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Cidr string
    IpGroupId string
    The ID of the destination IP Group. Changing this forces a new IP Group CIDR to be created.
    Cidr string
    IpGroupId string
    The ID of the destination IP Group. Changing this forces a new IP Group CIDR to be created.
    cidr String
    ipGroupId String
    The ID of the destination IP Group. Changing this forces a new IP Group CIDR to be created.
    cidr string
    ipGroupId string
    The ID of the destination IP Group. Changing this forces a new IP Group CIDR to be created.
    cidr str
    ip_group_id str
    The ID of the destination IP Group. Changing this forces a new IP Group CIDR to be created.
    cidr String
    ipGroupId String
    The ID of the destination IP Group. Changing this forces a new IP Group CIDR to be created.

    Import

    IP Group CIDRs can be imported using the resource id of the IP Group and

    the CIDR value (/ characters have to be replaced by _), e.g.

    $ pulumi import azure:network/iPGroupCIDR:IPGroupCIDR example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Network/ipGroups/test-ipgroup/cidrs/10.1.0.0_24
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

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

    We recommend using Azure Native.

    Azure Classic v5.80.0 published on Monday, Jun 10, 2024 by Pulumi