1. Packages
  2. Packet
  3. API Docs
  4. IpAttachment
Packet v3.2.2 published on Thursday, Nov 12, 2020 by Pulumi

packet.IpAttachment

Explore with Pulumi AI

packet logo
Packet v3.2.2 published on Thursday, Nov 12, 2020 by Pulumi

    Provides a resource to attach elastic IP subnets to devices.

    To attach an IP subnet from a reserved block to a provisioned device, you must derive a subnet CIDR belonging to one of your reserved blocks in the same project and facility as the target device.

    For example, you have reserved IPv4 address block 147.229.10.152/30, you can choose to assign either the whole block as one subnet to a device; or 2 subnets with CIDRs 147.229.10.152/31’ and 147.229.10.154/31; or 4 subnets with mask prefix length 32. More about the elastic IP subnets is here.

    Device and reserved block must be in the same facility.

    Create IpAttachment Resource

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

    Constructor syntax

    new IpAttachment(name: string, args: IpAttachmentArgs, opts?: CustomResourceOptions);
    @overload
    def IpAttachment(resource_name: str,
                     args: IpAttachmentArgs,
                     opts: Optional[ResourceOptions] = None)
    
    @overload
    def IpAttachment(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     cidr_notation: Optional[str] = None,
                     device_id: Optional[str] = None)
    func NewIpAttachment(ctx *Context, name string, args IpAttachmentArgs, opts ...ResourceOption) (*IpAttachment, error)
    public IpAttachment(string name, IpAttachmentArgs args, CustomResourceOptions? opts = null)
    public IpAttachment(String name, IpAttachmentArgs args)
    public IpAttachment(String name, IpAttachmentArgs args, CustomResourceOptions options)
    
    type: packet:IpAttachment
    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 IpAttachmentArgs
    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 IpAttachmentArgs
    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 IpAttachmentArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args IpAttachmentArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args IpAttachmentArgs
    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 ipAttachmentResource = new Packet.IpAttachment("ipAttachmentResource", new()
    {
        CidrNotation = "string",
        DeviceId = "string",
    });
    
    example, err := packet.NewIpAttachment(ctx, "ipAttachmentResource", &packet.IpAttachmentArgs{
    	CidrNotation: pulumi.String("string"),
    	DeviceId:     pulumi.String("string"),
    })
    
    var ipAttachmentResource = new IpAttachment("ipAttachmentResource", IpAttachmentArgs.builder()
        .cidrNotation("string")
        .deviceId("string")
        .build());
    
    ip_attachment_resource = packet.IpAttachment("ipAttachmentResource",
        cidr_notation="string",
        device_id="string")
    
    const ipAttachmentResource = new packet.IpAttachment("ipAttachmentResource", {
        cidrNotation: "string",
        deviceId: "string",
    });
    
    type: packet:IpAttachment
    properties:
        cidrNotation: string
        deviceId: string
    

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

    CidrNotation string
    CIDR notation of subnet from block reserved in the same project and facility as the device
    DeviceId string
    ID of device to which to assign the subnet
    CidrNotation string
    CIDR notation of subnet from block reserved in the same project and facility as the device
    DeviceId string
    ID of device to which to assign the subnet
    cidrNotation String
    CIDR notation of subnet from block reserved in the same project and facility as the device
    deviceId String
    ID of device to which to assign the subnet
    cidrNotation string
    CIDR notation of subnet from block reserved in the same project and facility as the device
    deviceId string
    ID of device to which to assign the subnet
    cidr_notation str
    CIDR notation of subnet from block reserved in the same project and facility as the device
    device_id str
    ID of device to which to assign the subnet
    cidrNotation String
    CIDR notation of subnet from block reserved in the same project and facility as the device
    deviceId String
    ID of device to which to assign the subnet

    Outputs

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

    Address string
    AddressFamily int
    Address family as integer (4 or 6)
    Cidr int
    length of CIDR prefix of the subnet as integer
    Gateway string
    IP address of gateway for the subnet
    Global bool
    Id string
    The provider-assigned unique ID for this managed resource.
    Manageable bool
    Management bool
    Netmask string
    Subnet mask in decimal notation, e.g. "255.255.255.0"
    Network string
    Subnet network address
    Public bool
    boolean flag whether subnet is reachable from the Internet
    Address string
    AddressFamily int
    Address family as integer (4 or 6)
    Cidr int
    length of CIDR prefix of the subnet as integer
    Gateway string
    IP address of gateway for the subnet
    Global bool
    Id string
    The provider-assigned unique ID for this managed resource.
    Manageable bool
    Management bool
    Netmask string
    Subnet mask in decimal notation, e.g. "255.255.255.0"
    Network string
    Subnet network address
    Public bool
    boolean flag whether subnet is reachable from the Internet
    address String
    addressFamily Integer
    Address family as integer (4 or 6)
    cidr Integer
    length of CIDR prefix of the subnet as integer
    gateway String
    IP address of gateway for the subnet
    global Boolean
    id String
    The provider-assigned unique ID for this managed resource.
    manageable Boolean
    management Boolean
    netmask String
    Subnet mask in decimal notation, e.g. "255.255.255.0"
    network String
    Subnet network address
    public_ Boolean
    boolean flag whether subnet is reachable from the Internet
    address string
    addressFamily number
    Address family as integer (4 or 6)
    cidr number
    length of CIDR prefix of the subnet as integer
    gateway string
    IP address of gateway for the subnet
    global boolean
    id string
    The provider-assigned unique ID for this managed resource.
    manageable boolean
    management boolean
    netmask string
    Subnet mask in decimal notation, e.g. "255.255.255.0"
    network string
    Subnet network address
    public boolean
    boolean flag whether subnet is reachable from the Internet
    address str
    address_family int
    Address family as integer (4 or 6)
    cidr int
    length of CIDR prefix of the subnet as integer
    gateway str
    IP address of gateway for the subnet
    global_ bool
    id str
    The provider-assigned unique ID for this managed resource.
    manageable bool
    management bool
    netmask str
    Subnet mask in decimal notation, e.g. "255.255.255.0"
    network str
    Subnet network address
    public bool
    boolean flag whether subnet is reachable from the Internet
    address String
    addressFamily Number
    Address family as integer (4 or 6)
    cidr Number
    length of CIDR prefix of the subnet as integer
    gateway String
    IP address of gateway for the subnet
    global Boolean
    id String
    The provider-assigned unique ID for this managed resource.
    manageable Boolean
    management Boolean
    netmask String
    Subnet mask in decimal notation, e.g. "255.255.255.0"
    network String
    Subnet network address
    public Boolean
    boolean flag whether subnet is reachable from the Internet

    Look up Existing IpAttachment Resource

    Get an existing IpAttachment 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?: IpAttachmentState, opts?: CustomResourceOptions): IpAttachment
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            address: Optional[str] = None,
            address_family: Optional[int] = None,
            cidr: Optional[int] = None,
            cidr_notation: Optional[str] = None,
            device_id: Optional[str] = None,
            gateway: Optional[str] = None,
            global_: Optional[bool] = None,
            manageable: Optional[bool] = None,
            management: Optional[bool] = None,
            netmask: Optional[str] = None,
            network: Optional[str] = None,
            public: Optional[bool] = None) -> IpAttachment
    func GetIpAttachment(ctx *Context, name string, id IDInput, state *IpAttachmentState, opts ...ResourceOption) (*IpAttachment, error)
    public static IpAttachment Get(string name, Input<string> id, IpAttachmentState? state, CustomResourceOptions? opts = null)
    public static IpAttachment get(String name, Output<String> id, IpAttachmentState 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:
    Address string
    AddressFamily int
    Address family as integer (4 or 6)
    Cidr int
    length of CIDR prefix of the subnet as integer
    CidrNotation string
    CIDR notation of subnet from block reserved in the same project and facility as the device
    DeviceId string
    ID of device to which to assign the subnet
    Gateway string
    IP address of gateway for the subnet
    Global bool
    Manageable bool
    Management bool
    Netmask string
    Subnet mask in decimal notation, e.g. "255.255.255.0"
    Network string
    Subnet network address
    Public bool
    boolean flag whether subnet is reachable from the Internet
    Address string
    AddressFamily int
    Address family as integer (4 or 6)
    Cidr int
    length of CIDR prefix of the subnet as integer
    CidrNotation string
    CIDR notation of subnet from block reserved in the same project and facility as the device
    DeviceId string
    ID of device to which to assign the subnet
    Gateway string
    IP address of gateway for the subnet
    Global bool
    Manageable bool
    Management bool
    Netmask string
    Subnet mask in decimal notation, e.g. "255.255.255.0"
    Network string
    Subnet network address
    Public bool
    boolean flag whether subnet is reachable from the Internet
    address String
    addressFamily Integer
    Address family as integer (4 or 6)
    cidr Integer
    length of CIDR prefix of the subnet as integer
    cidrNotation String
    CIDR notation of subnet from block reserved in the same project and facility as the device
    deviceId String
    ID of device to which to assign the subnet
    gateway String
    IP address of gateway for the subnet
    global Boolean
    manageable Boolean
    management Boolean
    netmask String
    Subnet mask in decimal notation, e.g. "255.255.255.0"
    network String
    Subnet network address
    public_ Boolean
    boolean flag whether subnet is reachable from the Internet
    address string
    addressFamily number
    Address family as integer (4 or 6)
    cidr number
    length of CIDR prefix of the subnet as integer
    cidrNotation string
    CIDR notation of subnet from block reserved in the same project and facility as the device
    deviceId string
    ID of device to which to assign the subnet
    gateway string
    IP address of gateway for the subnet
    global boolean
    manageable boolean
    management boolean
    netmask string
    Subnet mask in decimal notation, e.g. "255.255.255.0"
    network string
    Subnet network address
    public boolean
    boolean flag whether subnet is reachable from the Internet
    address str
    address_family int
    Address family as integer (4 or 6)
    cidr int
    length of CIDR prefix of the subnet as integer
    cidr_notation str
    CIDR notation of subnet from block reserved in the same project and facility as the device
    device_id str
    ID of device to which to assign the subnet
    gateway str
    IP address of gateway for the subnet
    global_ bool
    manageable bool
    management bool
    netmask str
    Subnet mask in decimal notation, e.g. "255.255.255.0"
    network str
    Subnet network address
    public bool
    boolean flag whether subnet is reachable from the Internet
    address String
    addressFamily Number
    Address family as integer (4 or 6)
    cidr Number
    length of CIDR prefix of the subnet as integer
    cidrNotation String
    CIDR notation of subnet from block reserved in the same project and facility as the device
    deviceId String
    ID of device to which to assign the subnet
    gateway String
    IP address of gateway for the subnet
    global Boolean
    manageable Boolean
    management Boolean
    netmask String
    Subnet mask in decimal notation, e.g. "255.255.255.0"
    network String
    Subnet network address
    public Boolean
    boolean flag whether subnet is reachable from the Internet

    Package Details

    Repository
    Packet pulumi/pulumi-packet
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the packet Terraform Provider.
    packet logo
    Packet v3.2.2 published on Thursday, Nov 12, 2020 by Pulumi