1. Packages
  2. Netaddr Provider
  3. API Docs
  4. RangeIpv4
netaddr 0.5.1 published on Tuesday, Apr 15, 2025 by ferlab-ste-justine

netaddr.RangeIpv4

Explore with Pulumi AI

netaddr logo
netaddr 0.5.1 published on Tuesday, Apr 15, 2025 by ferlab-ste-justine

    Address range to create ipv4 addresses on.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as netaddr from "@pulumi/netaddr";
    
    const test = new netaddr.RangeIpv4("test", {
        firstAddress: "192.168.0.1",
        keyPrefix: "/test/ipv4/",
        lastAddress: "192.168.0.254",
    });
    
    import pulumi
    import pulumi_netaddr as netaddr
    
    test = netaddr.RangeIpv4("test",
        first_address="192.168.0.1",
        key_prefix="/test/ipv4/",
        last_address="192.168.0.254")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/netaddr/netaddr"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := netaddr.NewRangeIpv4(ctx, "test", &netaddr.RangeIpv4Args{
    			FirstAddress: pulumi.String("192.168.0.1"),
    			KeyPrefix:    pulumi.String("/test/ipv4/"),
    			LastAddress:  pulumi.String("192.168.0.254"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Netaddr = Pulumi.Netaddr;
    
    return await Deployment.RunAsync(() => 
    {
        var test = new Netaddr.RangeIpv4("test", new()
        {
            FirstAddress = "192.168.0.1",
            KeyPrefix = "/test/ipv4/",
            LastAddress = "192.168.0.254",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.netaddr.RangeIpv4;
    import com.pulumi.netaddr.RangeIpv4Args;
    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 test = new RangeIpv4("test", RangeIpv4Args.builder()
                .firstAddress("192.168.0.1")
                .keyPrefix("/test/ipv4/")
                .lastAddress("192.168.0.254")
                .build());
    
        }
    }
    
    resources:
      test:
        type: netaddr:RangeIpv4
        properties:
          firstAddress: 192.168.0.1
          keyPrefix: /test/ipv4/
          lastAddress: 192.168.0.254
    

    Create RangeIpv4 Resource

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

    Constructor syntax

    new RangeIpv4(name: string, args: RangeIpv4Args, opts?: CustomResourceOptions);
    @overload
    def RangeIpv4(resource_name: str,
                  args: RangeIpv4Args,
                  opts: Optional[ResourceOptions] = None)
    
    @overload
    def RangeIpv4(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  first_address: Optional[str] = None,
                  key_prefix: Optional[str] = None,
                  last_address: Optional[str] = None,
                  range_ipv4_id: Optional[str] = None)
    func NewRangeIpv4(ctx *Context, name string, args RangeIpv4Args, opts ...ResourceOption) (*RangeIpv4, error)
    public RangeIpv4(string name, RangeIpv4Args args, CustomResourceOptions? opts = null)
    public RangeIpv4(String name, RangeIpv4Args args)
    public RangeIpv4(String name, RangeIpv4Args args, CustomResourceOptions options)
    
    type: netaddr:RangeIpv4
    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 RangeIpv4Args
    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 RangeIpv4Args
    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 RangeIpv4Args
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args RangeIpv4Args
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args RangeIpv4Args
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

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

    var rangeIpv4Resource = new Netaddr.RangeIpv4("rangeIpv4Resource", new()
    {
        FirstAddress = "string",
        KeyPrefix = "string",
        LastAddress = "string",
        RangeIpv4Id = "string",
    });
    
    example, err := netaddr.NewRangeIpv4(ctx, "rangeIpv4Resource", &netaddr.RangeIpv4Args{
    	FirstAddress: pulumi.String("string"),
    	KeyPrefix:    pulumi.String("string"),
    	LastAddress:  pulumi.String("string"),
    	RangeIpv4Id:  pulumi.String("string"),
    })
    
    var rangeIpv4Resource = new RangeIpv4("rangeIpv4Resource", RangeIpv4Args.builder()
        .firstAddress("string")
        .keyPrefix("string")
        .lastAddress("string")
        .rangeIpv4Id("string")
        .build());
    
    range_ipv4_resource = netaddr.RangeIpv4("rangeIpv4Resource",
        first_address="string",
        key_prefix="string",
        last_address="string",
        range_ipv4_id="string")
    
    const rangeIpv4Resource = new netaddr.RangeIpv4("rangeIpv4Resource", {
        firstAddress: "string",
        keyPrefix: "string",
        lastAddress: "string",
        rangeIpv4Id: "string",
    });
    
    type: netaddr:RangeIpv4
    properties:
        firstAddress: string
        keyPrefix: string
        lastAddress: string
        rangeIpv4Id: string
    

    RangeIpv4 Resource Properties

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

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The RangeIpv4 resource accepts the following input properties:

    FirstAddress string
    First assignable address in the range.
    KeyPrefix string
    Etcd key prefix for all the keys related to the range.
    LastAddress string
    Last assignable address in the range.
    RangeIpv4Id string
    The ID of this resource.
    FirstAddress string
    First assignable address in the range.
    KeyPrefix string
    Etcd key prefix for all the keys related to the range.
    LastAddress string
    Last assignable address in the range.
    RangeIpv4Id string
    The ID of this resource.
    firstAddress String
    First assignable address in the range.
    keyPrefix String
    Etcd key prefix for all the keys related to the range.
    lastAddress String
    Last assignable address in the range.
    rangeIpv4Id String
    The ID of this resource.
    firstAddress string
    First assignable address in the range.
    keyPrefix string
    Etcd key prefix for all the keys related to the range.
    lastAddress string
    Last assignable address in the range.
    rangeIpv4Id string
    The ID of this resource.
    first_address str
    First assignable address in the range.
    key_prefix str
    Etcd key prefix for all the keys related to the range.
    last_address str
    Last assignable address in the range.
    range_ipv4_id str
    The ID of this resource.
    firstAddress String
    First assignable address in the range.
    keyPrefix String
    Etcd key prefix for all the keys related to the range.
    lastAddress String
    Last assignable address in the range.
    rangeIpv4Id String
    The ID of this resource.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the RangeIpv4 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 RangeIpv4 Resource

    Get an existing RangeIpv4 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?: RangeIpv4State, opts?: CustomResourceOptions): RangeIpv4
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            first_address: Optional[str] = None,
            key_prefix: Optional[str] = None,
            last_address: Optional[str] = None,
            range_ipv4_id: Optional[str] = None) -> RangeIpv4
    func GetRangeIpv4(ctx *Context, name string, id IDInput, state *RangeIpv4State, opts ...ResourceOption) (*RangeIpv4, error)
    public static RangeIpv4 Get(string name, Input<string> id, RangeIpv4State? state, CustomResourceOptions? opts = null)
    public static RangeIpv4 get(String name, Output<String> id, RangeIpv4State state, CustomResourceOptions options)
    resources:  _:    type: netaddr:RangeIpv4    get:      id: ${id}
    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:
    FirstAddress string
    First assignable address in the range.
    KeyPrefix string
    Etcd key prefix for all the keys related to the range.
    LastAddress string
    Last assignable address in the range.
    RangeIpv4Id string
    The ID of this resource.
    FirstAddress string
    First assignable address in the range.
    KeyPrefix string
    Etcd key prefix for all the keys related to the range.
    LastAddress string
    Last assignable address in the range.
    RangeIpv4Id string
    The ID of this resource.
    firstAddress String
    First assignable address in the range.
    keyPrefix String
    Etcd key prefix for all the keys related to the range.
    lastAddress String
    Last assignable address in the range.
    rangeIpv4Id String
    The ID of this resource.
    firstAddress string
    First assignable address in the range.
    keyPrefix string
    Etcd key prefix for all the keys related to the range.
    lastAddress string
    Last assignable address in the range.
    rangeIpv4Id string
    The ID of this resource.
    first_address str
    First assignable address in the range.
    key_prefix str
    Etcd key prefix for all the keys related to the range.
    last_address str
    Last assignable address in the range.
    range_ipv4_id str
    The ID of this resource.
    firstAddress String
    First assignable address in the range.
    keyPrefix String
    Etcd key prefix for all the keys related to the range.
    lastAddress String
    Last assignable address in the range.
    rangeIpv4Id String
    The ID of this resource.

    Package Details

    Repository
    netaddr ferlab-ste-justine/terraform-provider-netaddr
    License
    Notes
    This Pulumi package is based on the netaddr Terraform Provider.
    netaddr logo
    netaddr 0.5.1 published on Tuesday, Apr 15, 2025 by ferlab-ste-justine