1. Packages
  2. Routeros Provider
  3. API Docs
  4. IpAddress
routeros 1.83.1 published on Monday, Apr 28, 2025 by terraform-routeros

routeros.IpAddress

Explore with Pulumi AI

routeros logo
routeros 1.83.1 published on Monday, Apr 28, 2025 by terraform-routeros

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as routeros from "@pulumi/routeros";
    
    const address = new routeros.IpAddress("address", {
        address: "10.0.0.1/24",
        "interface": "bridge",
        network: "10.0.0.0",
    });
    
    import pulumi
    import pulumi_routeros as routeros
    
    address = routeros.IpAddress("address",
        address="10.0.0.1/24",
        interface="bridge",
        network="10.0.0.0")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/routeros/routeros"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := routeros.NewIpAddress(ctx, "address", &routeros.IpAddressArgs{
    			Address:   pulumi.String("10.0.0.1/24"),
    			Interface: pulumi.String("bridge"),
    			Network:   pulumi.String("10.0.0.0"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Routeros = Pulumi.Routeros;
    
    return await Deployment.RunAsync(() => 
    {
        var address = new Routeros.IpAddress("address", new()
        {
            Address = "10.0.0.1/24",
            Interface = "bridge",
            Network = "10.0.0.0",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.routeros.IpAddress;
    import com.pulumi.routeros.IpAddressArgs;
    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 address = new IpAddress("address", IpAddressArgs.builder()
                .address("10.0.0.1/24")
                .interface_("bridge")
                .network("10.0.0.0")
                .build());
    
        }
    }
    
    resources:
      address:
        type: routeros:IpAddress
        properties:
          address: 10.0.0.1/24
          interface: bridge
          network: 10.0.0.0
    

    Create IpAddress Resource

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

    Constructor syntax

    new IpAddress(name: string, args: IpAddressArgs, opts?: CustomResourceOptions);
    @overload
    def IpAddress(resource_name: str,
                  args: IpAddressArgs,
                  opts: Optional[ResourceOptions] = None)
    
    @overload
    def IpAddress(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  address: Optional[str] = None,
                  interface: Optional[str] = None,
                  ___id_: Optional[float] = None,
                  ___path_: Optional[str] = None,
                  comment: Optional[str] = None,
                  disabled: Optional[bool] = None,
                  ip_address_id: Optional[str] = None,
                  network: Optional[str] = None)
    func NewIpAddress(ctx *Context, name string, args IpAddressArgs, opts ...ResourceOption) (*IpAddress, error)
    public IpAddress(string name, IpAddressArgs args, CustomResourceOptions? opts = null)
    public IpAddress(String name, IpAddressArgs args)
    public IpAddress(String name, IpAddressArgs args, CustomResourceOptions options)
    
    type: routeros:IpAddress
    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 IpAddressArgs
    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 IpAddressArgs
    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 IpAddressArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args IpAddressArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args IpAddressArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    IpAddress 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 IpAddress resource accepts the following input properties:

    Address string
    IP address.
    Interface string
    Name of the interface.
    Comment string
    Disabled bool
    IpAddressId string
    The ID of this resource.
    Network string
    IP address for the network. For point-to-point links it should be the address of the remote end. Starting from v5RC6 this parameter is configurable only for addresses with /32 netmask (point to point links)
    ___id_ double
    Resource ID type (.id / name). This is an internal service field, setting a value is not required.
    ___path_ string
    Resource path for CRUD operations. This is an internal service field, setting a value is not required.
    Address string
    IP address.
    Interface string
    Name of the interface.
    Comment string
    Disabled bool
    IpAddressId string
    The ID of this resource.
    Network string
    IP address for the network. For point-to-point links it should be the address of the remote end. Starting from v5RC6 this parameter is configurable only for addresses with /32 netmask (point to point links)
    ___id_ float64
    Resource ID type (.id / name). This is an internal service field, setting a value is not required.
    ___path_ string
    Resource path for CRUD operations. This is an internal service field, setting a value is not required.
    address String
    IP address.
    interface_ String
    Name of the interface.
    ___id_ Double
    Resource ID type (.id / name). This is an internal service field, setting a value is not required.
    ___path_ String
    Resource path for CRUD operations. This is an internal service field, setting a value is not required.
    comment String
    disabled Boolean
    ipAddressId String
    The ID of this resource.
    network String
    IP address for the network. For point-to-point links it should be the address of the remote end. Starting from v5RC6 this parameter is configurable only for addresses with /32 netmask (point to point links)
    address string
    IP address.
    interface string
    Name of the interface.
    ___id_ number
    Resource ID type (.id / name). This is an internal service field, setting a value is not required.
    ___path_ string
    Resource path for CRUD operations. This is an internal service field, setting a value is not required.
    comment string
    disabled boolean
    ipAddressId string
    The ID of this resource.
    network string
    IP address for the network. For point-to-point links it should be the address of the remote end. Starting from v5RC6 this parameter is configurable only for addresses with /32 netmask (point to point links)
    address str
    IP address.
    interface str
    Name of the interface.
    ___id_ float
    Resource ID type (.id / name). This is an internal service field, setting a value is not required.
    ___path_ str
    Resource path for CRUD operations. This is an internal service field, setting a value is not required.
    comment str
    disabled bool
    ip_address_id str
    The ID of this resource.
    network str
    IP address for the network. For point-to-point links it should be the address of the remote end. Starting from v5RC6 this parameter is configurable only for addresses with /32 netmask (point to point links)
    address String
    IP address.
    interface String
    Name of the interface.
    ___id_ Number
    Resource ID type (.id / name). This is an internal service field, setting a value is not required.
    ___path_ String
    Resource path for CRUD operations. This is an internal service field, setting a value is not required.
    comment String
    disabled Boolean
    ipAddressId String
    The ID of this resource.
    network String
    IP address for the network. For point-to-point links it should be the address of the remote end. Starting from v5RC6 this parameter is configurable only for addresses with /32 netmask (point to point links)

    Outputs

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

    ActualInterface string
    Name of the actual interface the logical one is bound to.
    Dynamic bool
    Configuration item created by software, not by management interface. It is not exported, and cannot be directly modified.
    Id string
    The provider-assigned unique ID for this managed resource.
    Invalid bool
    Slave bool
    Whether address belongs to an interface which is a slave port to some other master interface
    ActualInterface string
    Name of the actual interface the logical one is bound to.
    Dynamic bool
    Configuration item created by software, not by management interface. It is not exported, and cannot be directly modified.
    Id string
    The provider-assigned unique ID for this managed resource.
    Invalid bool
    Slave bool
    Whether address belongs to an interface which is a slave port to some other master interface
    actualInterface String
    Name of the actual interface the logical one is bound to.
    dynamic Boolean
    Configuration item created by software, not by management interface. It is not exported, and cannot be directly modified.
    id String
    The provider-assigned unique ID for this managed resource.
    invalid Boolean
    slave Boolean
    Whether address belongs to an interface which is a slave port to some other master interface
    actualInterface string
    Name of the actual interface the logical one is bound to.
    dynamic boolean
    Configuration item created by software, not by management interface. It is not exported, and cannot be directly modified.
    id string
    The provider-assigned unique ID for this managed resource.
    invalid boolean
    slave boolean
    Whether address belongs to an interface which is a slave port to some other master interface
    actual_interface str
    Name of the actual interface the logical one is bound to.
    dynamic bool
    Configuration item created by software, not by management interface. It is not exported, and cannot be directly modified.
    id str
    The provider-assigned unique ID for this managed resource.
    invalid bool
    slave bool
    Whether address belongs to an interface which is a slave port to some other master interface
    actualInterface String
    Name of the actual interface the logical one is bound to.
    dynamic Boolean
    Configuration item created by software, not by management interface. It is not exported, and cannot be directly modified.
    id String
    The provider-assigned unique ID for this managed resource.
    invalid Boolean
    slave Boolean
    Whether address belongs to an interface which is a slave port to some other master interface

    Look up Existing IpAddress Resource

    Get an existing IpAddress 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?: IpAddressState, opts?: CustomResourceOptions): IpAddress
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            ___id_: Optional[float] = None,
            ___path_: Optional[str] = None,
            actual_interface: Optional[str] = None,
            address: Optional[str] = None,
            comment: Optional[str] = None,
            disabled: Optional[bool] = None,
            dynamic: Optional[bool] = None,
            interface: Optional[str] = None,
            invalid: Optional[bool] = None,
            ip_address_id: Optional[str] = None,
            network: Optional[str] = None,
            slave: Optional[bool] = None) -> IpAddress
    func GetIpAddress(ctx *Context, name string, id IDInput, state *IpAddressState, opts ...ResourceOption) (*IpAddress, error)
    public static IpAddress Get(string name, Input<string> id, IpAddressState? state, CustomResourceOptions? opts = null)
    public static IpAddress get(String name, Output<String> id, IpAddressState state, CustomResourceOptions options)
    resources:  _:    type: routeros:IpAddress    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:
    ActualInterface string
    Name of the actual interface the logical one is bound to.
    Address string
    IP address.
    Comment string
    Disabled bool
    Dynamic bool
    Configuration item created by software, not by management interface. It is not exported, and cannot be directly modified.
    Interface string
    Name of the interface.
    Invalid bool
    IpAddressId string
    The ID of this resource.
    Network string
    IP address for the network. For point-to-point links it should be the address of the remote end. Starting from v5RC6 this parameter is configurable only for addresses with /32 netmask (point to point links)
    Slave bool
    Whether address belongs to an interface which is a slave port to some other master interface
    ___id_ double
    Resource ID type (.id / name). This is an internal service field, setting a value is not required.
    ___path_ string
    Resource path for CRUD operations. This is an internal service field, setting a value is not required.
    ActualInterface string
    Name of the actual interface the logical one is bound to.
    Address string
    IP address.
    Comment string
    Disabled bool
    Dynamic bool
    Configuration item created by software, not by management interface. It is not exported, and cannot be directly modified.
    Interface string
    Name of the interface.
    Invalid bool
    IpAddressId string
    The ID of this resource.
    Network string
    IP address for the network. For point-to-point links it should be the address of the remote end. Starting from v5RC6 this parameter is configurable only for addresses with /32 netmask (point to point links)
    Slave bool
    Whether address belongs to an interface which is a slave port to some other master interface
    ___id_ float64
    Resource ID type (.id / name). This is an internal service field, setting a value is not required.
    ___path_ string
    Resource path for CRUD operations. This is an internal service field, setting a value is not required.
    ___id_ Double
    Resource ID type (.id / name). This is an internal service field, setting a value is not required.
    ___path_ String
    Resource path for CRUD operations. This is an internal service field, setting a value is not required.
    actualInterface String
    Name of the actual interface the logical one is bound to.
    address String
    IP address.
    comment String
    disabled Boolean
    dynamic Boolean
    Configuration item created by software, not by management interface. It is not exported, and cannot be directly modified.
    interface_ String
    Name of the interface.
    invalid Boolean
    ipAddressId String
    The ID of this resource.
    network String
    IP address for the network. For point-to-point links it should be the address of the remote end. Starting from v5RC6 this parameter is configurable only for addresses with /32 netmask (point to point links)
    slave Boolean
    Whether address belongs to an interface which is a slave port to some other master interface
    ___id_ number
    Resource ID type (.id / name). This is an internal service field, setting a value is not required.
    ___path_ string
    Resource path for CRUD operations. This is an internal service field, setting a value is not required.
    actualInterface string
    Name of the actual interface the logical one is bound to.
    address string
    IP address.
    comment string
    disabled boolean
    dynamic boolean
    Configuration item created by software, not by management interface. It is not exported, and cannot be directly modified.
    interface string
    Name of the interface.
    invalid boolean
    ipAddressId string
    The ID of this resource.
    network string
    IP address for the network. For point-to-point links it should be the address of the remote end. Starting from v5RC6 this parameter is configurable only for addresses with /32 netmask (point to point links)
    slave boolean
    Whether address belongs to an interface which is a slave port to some other master interface
    ___id_ float
    Resource ID type (.id / name). This is an internal service field, setting a value is not required.
    ___path_ str
    Resource path for CRUD operations. This is an internal service field, setting a value is not required.
    actual_interface str
    Name of the actual interface the logical one is bound to.
    address str
    IP address.
    comment str
    disabled bool
    dynamic bool
    Configuration item created by software, not by management interface. It is not exported, and cannot be directly modified.
    interface str
    Name of the interface.
    invalid bool
    ip_address_id str
    The ID of this resource.
    network str
    IP address for the network. For point-to-point links it should be the address of the remote end. Starting from v5RC6 this parameter is configurable only for addresses with /32 netmask (point to point links)
    slave bool
    Whether address belongs to an interface which is a slave port to some other master interface
    ___id_ Number
    Resource ID type (.id / name). This is an internal service field, setting a value is not required.
    ___path_ String
    Resource path for CRUD operations. This is an internal service field, setting a value is not required.
    actualInterface String
    Name of the actual interface the logical one is bound to.
    address String
    IP address.
    comment String
    disabled Boolean
    dynamic Boolean
    Configuration item created by software, not by management interface. It is not exported, and cannot be directly modified.
    interface String
    Name of the interface.
    invalid Boolean
    ipAddressId String
    The ID of this resource.
    network String
    IP address for the network. For point-to-point links it should be the address of the remote end. Starting from v5RC6 this parameter is configurable only for addresses with /32 netmask (point to point links)
    slave Boolean
    Whether address belongs to an interface which is a slave port to some other master interface

    Import

    #The ID can be found via API or the terminal

    #The command for the terminal is -> :put [/ip/address get [print show-ids]]

    $ pulumi import routeros:index/ipAddress:IpAddress address "*0"
    

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

    Package Details

    Repository
    routeros terraform-routeros/terraform-provider-routeros
    License
    Notes
    This Pulumi package is based on the routeros Terraform Provider.
    routeros logo
    routeros 1.83.1 published on Monday, Apr 28, 2025 by terraform-routeros