Ready to level-up your engineering skills? Join a Pulumi Workshop. Register Now

Device

Provides a Packet device resource. This can be used to create, modify, and delete devices.

Note: All arguments including the root_password and user_data will be stored in the raw state as plain-text. Read more about sensitive data in state.

Example Usage

using Pulumi;
using Packet = Pulumi.Packet;

class MyStack : Stack
{
    public MyStack()
    {
        var web1 = new Packet.Device("web1", new Packet.DeviceArgs
        {
            Hostname = "tf.coreos2",
            Plan = "t1.small.x86",
            Facilities = 
            {
                "ewr1",
            },
            OperatingSystem = "coreos_stable",
            BillingCycle = "hourly",
            ProjectId = local.Project_id,
        });
    }

}
package main

import (
    "github.com/pulumi/pulumi-packet/sdk/v3/go/packet"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := packet.NewDevice(ctx, "web1", &packet.DeviceArgs{
            Hostname: pulumi.String("tf.coreos2"),
            Plan:     pulumi.String("t1.small.x86"),
            Facilities: pulumi.StringArray{
                pulumi.String("ewr1"),
            },
            OperatingSystem: pulumi.String("coreos_stable"),
            BillingCycle:    pulumi.String("hourly"),
            ProjectId:       pulumi.Any(local.Project_id),
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_packet as packet

web1 = packet.Device("web1",
    hostname="tf.coreos2",
    plan="t1.small.x86",
    facilities=["ewr1"],
    operating_system="coreos_stable",
    billing_cycle="hourly",
    project_id=local["project_id"])
import * as pulumi from "@pulumi/pulumi";
import * as packet from "@pulumi/packet";

const web1 = new packet.Device("web1", {
    hostname: "tf.coreos2",
    plan: "t1.small.x86",
    facilities: ["ewr1"],
    operatingSystem: "coreos_stable",
    billingCycle: "hourly",
    projectId: local.project_id,
});

Create a Device Resource

new Device(name: string, args: DeviceArgs, opts?: CustomResourceOptions);
def Device(resource_name: str, opts: Optional[ResourceOptions] = None, always_pxe: Optional[bool] = None, billing_cycle: Optional[str] = None, description: Optional[str] = None, facilities: Optional[Sequence[str]] = None, force_detach_volumes: Optional[bool] = None, hardware_reservation_id: Optional[str] = None, hostname: Optional[str] = None, ip_addresses: Optional[Sequence[DeviceIpAddressArgs]] = None, ipxe_script_url: Optional[str] = None, operating_system: Optional[str] = None, plan: Optional[str] = None, project_id: Optional[str] = None, project_ssh_key_ids: Optional[Sequence[str]] = None, storage: Optional[str] = None, tags: Optional[Sequence[str]] = None, user_data: Optional[str] = None, wait_for_reservation_deprovision: Optional[bool] = None)
func NewDevice(ctx *Context, name string, args DeviceArgs, opts ...ResourceOption) (*Device, error)
public Device(string name, DeviceArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args DeviceArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args DeviceArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args DeviceArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

Device Resource Properties

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

Inputs

The Device resource accepts the following input properties:

BillingCycle string

monthly or hourly

Facilities List<string>

List of facility codes with deployment preferences. Packet API will go through the list and will deploy your device to first facility with free capacity. List items must be facility codes or any (a wildcard). To find the facility code, visit Facilities API docs, set your API auth token in the top of the page and see JSON from the API response.

Hostname string

The device name

OperatingSystem string

The operating system slug. To find the slug, or visit Operating Systems API docs, set your API auth token in the top of the page and see JSON from the API response.

Plan string

The device plan slug. To find the plan slug, visit Device plans API docs, set your auth token in the top of the page and see JSON from the API response.

ProjectId string

The ID of the project in which to create the device

AlwaysPxe bool

If true, a device with OS custom_ipxe will continue to boot via iPXE on reboots.

Description string

Description string for the device

ForceDetachVolumes bool

Delete device even if it has volumes attached. Only applies for destroy action.

HardwareReservationId string

The ID of hardware reservation which this device occupies * hostname- The hostname of the device

IpAddresses List<DeviceIpAddressArgs>

A list of IP address types for the device (structure is documented below).

IpxeScriptUrl string

URL pointing to a hosted iPXE script. More information is in the Custom iPXE doc.

ProjectSshKeyIds List<string>
Storage string

JSON for custom partitioning. Only usable on reserved hardware. More information in in the Custom Partitioning and RAID doc. * Please note that the disks.partitions.size attribute must be a string, not an integer. It can be a number string, or size notation string, e.g. “4G” or “8M” (for gigabytes and megabytes).

Tags List<string>

Tags attached to the device

UserData string

A string of the desired User Data for the device.

WaitForReservationDeprovision bool

Only used for devices in reserved hardware. If set, the deletion of this device will block until the hardware reservation is marked provisionable (about 4 minutes in August 2019).

BillingCycle string

monthly or hourly

Facilities []string

List of facility codes with deployment preferences. Packet API will go through the list and will deploy your device to first facility with free capacity. List items must be facility codes or any (a wildcard). To find the facility code, visit Facilities API docs, set your API auth token in the top of the page and see JSON from the API response.

Hostname string

The device name

OperatingSystem string

The operating system slug. To find the slug, or visit Operating Systems API docs, set your API auth token in the top of the page and see JSON from the API response.

Plan string

The device plan slug. To find the plan slug, visit Device plans API docs, set your auth token in the top of the page and see JSON from the API response.

ProjectId string

The ID of the project in which to create the device

AlwaysPxe bool

If true, a device with OS custom_ipxe will continue to boot via iPXE on reboots.

Description string

Description string for the device

ForceDetachVolumes bool

Delete device even if it has volumes attached. Only applies for destroy action.

HardwareReservationId string

The ID of hardware reservation which this device occupies * hostname- The hostname of the device

IpAddresses []DeviceIpAddress

A list of IP address types for the device (structure is documented below).

IpxeScriptUrl string

URL pointing to a hosted iPXE script. More information is in the Custom iPXE doc.

ProjectSshKeyIds []string
Storage string

JSON for custom partitioning. Only usable on reserved hardware. More information in in the Custom Partitioning and RAID doc. * Please note that the disks.partitions.size attribute must be a string, not an integer. It can be a number string, or size notation string, e.g. “4G” or “8M” (for gigabytes and megabytes).

Tags []string

Tags attached to the device

UserData string

A string of the desired User Data for the device.

WaitForReservationDeprovision bool

Only used for devices in reserved hardware. If set, the deletion of this device will block until the hardware reservation is marked provisionable (about 4 minutes in August 2019).

billingCycle BillingCycle

monthly or hourly

facilities Facility[]

List of facility codes with deployment preferences. Packet API will go through the list and will deploy your device to first facility with free capacity. List items must be facility codes or any (a wildcard). To find the facility code, visit Facilities API docs, set your API auth token in the top of the page and see JSON from the API response.

hostname string

The device name

operatingSystem OperatingSystem

The operating system slug. To find the slug, or visit Operating Systems API docs, set your API auth token in the top of the page and see JSON from the API response.

plan Plan

The device plan slug. To find the plan slug, visit Device plans API docs, set your auth token in the top of the page and see JSON from the API response.

projectId string

The ID of the project in which to create the device

alwaysPxe boolean

If true, a device with OS custom_ipxe will continue to boot via iPXE on reboots.

description string

Description string for the device

forceDetachVolumes boolean

Delete device even if it has volumes attached. Only applies for destroy action.

hardwareReservationId string

The ID of hardware reservation which this device occupies * hostname- The hostname of the device

ipAddresses DeviceIpAddress[]

A list of IP address types for the device (structure is documented below).

ipxeScriptUrl string

URL pointing to a hosted iPXE script. More information is in the Custom iPXE doc.

projectSshKeyIds string[]
storage string

JSON for custom partitioning. Only usable on reserved hardware. More information in in the Custom Partitioning and RAID doc. * Please note that the disks.partitions.size attribute must be a string, not an integer. It can be a number string, or size notation string, e.g. “4G” or “8M” (for gigabytes and megabytes).

tags string[]

Tags attached to the device

userData string

A string of the desired User Data for the device.

waitForReservationDeprovision boolean

Only used for devices in reserved hardware. If set, the deletion of this device will block until the hardware reservation is marked provisionable (about 4 minutes in August 2019).

billing_cycle str

monthly or hourly

facilities Sequence[str]

List of facility codes with deployment preferences. Packet API will go through the list and will deploy your device to first facility with free capacity. List items must be facility codes or any (a wildcard). To find the facility code, visit Facilities API docs, set your API auth token in the top of the page and see JSON from the API response.

hostname str

The device name

operating_system str

The operating system slug. To find the slug, or visit Operating Systems API docs, set your API auth token in the top of the page and see JSON from the API response.

plan str

The device plan slug. To find the plan slug, visit Device plans API docs, set your auth token in the top of the page and see JSON from the API response.

project_id str

The ID of the project in which to create the device

always_pxe bool

If true, a device with OS custom_ipxe will continue to boot via iPXE on reboots.

description str

Description string for the device

force_detach_volumes bool

Delete device even if it has volumes attached. Only applies for destroy action.

hardware_reservation_id str

The ID of hardware reservation which this device occupies * hostname- The hostname of the device

ip_addresses Sequence[DeviceIpAddressArgs]

A list of IP address types for the device (structure is documented below).

ipxe_script_url str

URL pointing to a hosted iPXE script. More information is in the Custom iPXE doc.

project_ssh_key_ids Sequence[str]
storage str

JSON for custom partitioning. Only usable on reserved hardware. More information in in the Custom Partitioning and RAID doc. * Please note that the disks.partitions.size attribute must be a string, not an integer. It can be a number string, or size notation string, e.g. “4G” or “8M” (for gigabytes and megabytes).

tags Sequence[str]

Tags attached to the device

user_data str

A string of the desired User Data for the device.

wait_for_reservation_deprovision bool

Only used for devices in reserved hardware. If set, the deletion of this device will block until the hardware reservation is marked provisionable (about 4 minutes in August 2019).

Outputs

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

AccessPrivateIpv4 string

The ipv4 private IP assigned to the device

AccessPublicIpv4 string

The ipv4 maintenance IP assigned to the device

AccessPublicIpv6 string

The ipv6 maintenance IP assigned to the device

Created string

The timestamp for when the device was created

DeployedFacility string

The facility where the device is deployed.

Id string
The provider-assigned unique ID for this managed resource.
Locked bool

Whether the device is locked

NetworkType string

Deprecated: You should handle Network Type with the new packet_device_network_type resource.

Networks List<DeviceNetwork>

The device’s private and public IP (v4 and v6) network details. When a device is run without any special network configuration, it will have 3 networks: * Public IPv4 at packet_device.name.network.0 * IPv6 at packet_device.name.network.1 * Private IPv4 at packet_device.name.network.2 Elastic addresses then stack by type - an assigned public IPv4 will go after the management public IPv4 (to index 1), and will then shift the indices of the IPv6 and private IPv4. Assigned private IPv4 will go after the management private IPv4 (to the end of the network list). The fields of the network attributes are:

Ports List<DevicePort>

Ports assigned to the device

RootPassword string

Root password to the server (disabled after 24 hours)

SshKeyIds List<string>

List of IDs of SSH keys deployed in the device, can be both user and project SSH keys

State string

The status of the device

Updated string

The timestamp for the last time the device was updated

AccessPrivateIpv4 string

The ipv4 private IP assigned to the device

AccessPublicIpv4 string

The ipv4 maintenance IP assigned to the device

AccessPublicIpv6 string

The ipv6 maintenance IP assigned to the device

Created string

The timestamp for when the device was created

DeployedFacility string

The facility where the device is deployed.

Id string
The provider-assigned unique ID for this managed resource.
Locked bool

Whether the device is locked

NetworkType string

Deprecated: You should handle Network Type with the new packet_device_network_type resource.

Networks []DeviceNetwork

The device’s private and public IP (v4 and v6) network details. When a device is run without any special network configuration, it will have 3 networks: * Public IPv4 at packet_device.name.network.0 * IPv6 at packet_device.name.network.1 * Private IPv4 at packet_device.name.network.2 Elastic addresses then stack by type - an assigned public IPv4 will go after the management public IPv4 (to index 1), and will then shift the indices of the IPv6 and private IPv4. Assigned private IPv4 will go after the management private IPv4 (to the end of the network list). The fields of the network attributes are:

Ports []DevicePort

Ports assigned to the device

RootPassword string

Root password to the server (disabled after 24 hours)

SshKeyIds []string

List of IDs of SSH keys deployed in the device, can be both user and project SSH keys

State string

The status of the device

Updated string

The timestamp for the last time the device was updated

accessPrivateIpv4 string

The ipv4 private IP assigned to the device

accessPublicIpv4 string

The ipv4 maintenance IP assigned to the device

accessPublicIpv6 string

The ipv6 maintenance IP assigned to the device

created string

The timestamp for when the device was created

deployedFacility string

The facility where the device is deployed.

id string
The provider-assigned unique ID for this managed resource.
locked boolean

Whether the device is locked

networkType NetworkType

Deprecated: You should handle Network Type with the new packet_device_network_type resource.

networks DeviceNetwork[]

The device’s private and public IP (v4 and v6) network details. When a device is run without any special network configuration, it will have 3 networks: * Public IPv4 at packet_device.name.network.0 * IPv6 at packet_device.name.network.1 * Private IPv4 at packet_device.name.network.2 Elastic addresses then stack by type - an assigned public IPv4 will go after the management public IPv4 (to index 1), and will then shift the indices of the IPv6 and private IPv4. Assigned private IPv4 will go after the management private IPv4 (to the end of the network list). The fields of the network attributes are:

ports DevicePort[]

Ports assigned to the device

rootPassword string

Root password to the server (disabled after 24 hours)

sshKeyIds string[]

List of IDs of SSH keys deployed in the device, can be both user and project SSH keys

state string

The status of the device

updated string

The timestamp for the last time the device was updated

access_private_ipv4 str

The ipv4 private IP assigned to the device

access_public_ipv4 str

The ipv4 maintenance IP assigned to the device

access_public_ipv6 str

The ipv6 maintenance IP assigned to the device

created str

The timestamp for when the device was created

deployed_facility str

The facility where the device is deployed.

id str
The provider-assigned unique ID for this managed resource.
locked bool

Whether the device is locked

network_type str

Deprecated: You should handle Network Type with the new packet_device_network_type resource.

networks Sequence[DeviceNetwork]

The device’s private and public IP (v4 and v6) network details. When a device is run without any special network configuration, it will have 3 networks: * Public IPv4 at packet_device.name.network.0 * IPv6 at packet_device.name.network.1 * Private IPv4 at packet_device.name.network.2 Elastic addresses then stack by type - an assigned public IPv4 will go after the management public IPv4 (to index 1), and will then shift the indices of the IPv6 and private IPv4. Assigned private IPv4 will go after the management private IPv4 (to the end of the network list). The fields of the network attributes are:

ports Sequence[DevicePort]

Ports assigned to the device

root_password str

Root password to the server (disabled after 24 hours)

ssh_key_ids Sequence[str]

List of IDs of SSH keys deployed in the device, can be both user and project SSH keys

state str

The status of the device

updated str

The timestamp for the last time the device was updated

Look up an Existing Device Resource

Get an existing Device 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?: DeviceState, opts?: CustomResourceOptions): Device
@staticmethod
def get(resource_name: str, id: str, opts: Optional[ResourceOptions] = None, access_private_ipv4: Optional[str] = None, access_public_ipv4: Optional[str] = None, access_public_ipv6: Optional[str] = None, always_pxe: Optional[bool] = None, billing_cycle: Optional[str] = None, created: Optional[str] = None, deployed_facility: Optional[str] = None, description: Optional[str] = None, facilities: Optional[Sequence[str]] = None, force_detach_volumes: Optional[bool] = None, hardware_reservation_id: Optional[str] = None, hostname: Optional[str] = None, ip_addresses: Optional[Sequence[DeviceIpAddressArgs]] = None, ipxe_script_url: Optional[str] = None, locked: Optional[bool] = None, network_type: Optional[str] = None, networks: Optional[Sequence[DeviceNetworkArgs]] = None, operating_system: Optional[str] = None, plan: Optional[str] = None, ports: Optional[Sequence[DevicePortArgs]] = None, project_id: Optional[str] = None, project_ssh_key_ids: Optional[Sequence[str]] = None, root_password: Optional[str] = None, ssh_key_ids: Optional[Sequence[str]] = None, state: Optional[str] = None, storage: Optional[str] = None, tags: Optional[Sequence[str]] = None, updated: Optional[str] = None, user_data: Optional[str] = None, wait_for_reservation_deprovision: Optional[bool] = None) -> Device
func GetDevice(ctx *Context, name string, id IDInput, state *DeviceState, opts ...ResourceOption) (*Device, error)
public static Device Get(string name, Input<string> id, DeviceState? state, CustomResourceOptions? opts = null)
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.

The following state arguments are supported:

AccessPrivateIpv4 string

The ipv4 private IP assigned to the device

AccessPublicIpv4 string

The ipv4 maintenance IP assigned to the device

AccessPublicIpv6 string

The ipv6 maintenance IP assigned to the device

AlwaysPxe bool

If true, a device with OS custom_ipxe will continue to boot via iPXE on reboots.

BillingCycle string

monthly or hourly

Created string

The timestamp for when the device was created

DeployedFacility string

The facility where the device is deployed.

Description string

Description string for the device

Facilities List<string>

List of facility codes with deployment preferences. Packet API will go through the list and will deploy your device to first facility with free capacity. List items must be facility codes or any (a wildcard). To find the facility code, visit Facilities API docs, set your API auth token in the top of the page and see JSON from the API response.

ForceDetachVolumes bool

Delete device even if it has volumes attached. Only applies for destroy action.

HardwareReservationId string

The ID of hardware reservation which this device occupies * hostname- The hostname of the device

Hostname string

The device name

IpAddresses List<DeviceIpAddressArgs>

A list of IP address types for the device (structure is documented below).

IpxeScriptUrl string

URL pointing to a hosted iPXE script. More information is in the Custom iPXE doc.

Locked bool

Whether the device is locked

NetworkType string

Deprecated: You should handle Network Type with the new packet_device_network_type resource.

Networks List<DeviceNetworkArgs>

The device’s private and public IP (v4 and v6) network details. When a device is run without any special network configuration, it will have 3 networks: * Public IPv4 at packet_device.name.network.0 * IPv6 at packet_device.name.network.1 * Private IPv4 at packet_device.name.network.2 Elastic addresses then stack by type - an assigned public IPv4 will go after the management public IPv4 (to index 1), and will then shift the indices of the IPv6 and private IPv4. Assigned private IPv4 will go after the management private IPv4 (to the end of the network list). The fields of the network attributes are:

OperatingSystem string

The operating system slug. To find the slug, or visit Operating Systems API docs, set your API auth token in the top of the page and see JSON from the API response.

Plan string

The device plan slug. To find the plan slug, visit Device plans API docs, set your auth token in the top of the page and see JSON from the API response.

Ports List<DevicePortArgs>

Ports assigned to the device

ProjectId string

The ID of the project in which to create the device

ProjectSshKeyIds List<string>
RootPassword string

Root password to the server (disabled after 24 hours)

SshKeyIds List<string>

List of IDs of SSH keys deployed in the device, can be both user and project SSH keys

State string

The status of the device

Storage string

JSON for custom partitioning. Only usable on reserved hardware. More information in in the Custom Partitioning and RAID doc. * Please note that the disks.partitions.size attribute must be a string, not an integer. It can be a number string, or size notation string, e.g. “4G” or “8M” (for gigabytes and megabytes).

Tags List<string>

Tags attached to the device

Updated string

The timestamp for the last time the device was updated

UserData string

A string of the desired User Data for the device.

WaitForReservationDeprovision bool

Only used for devices in reserved hardware. If set, the deletion of this device will block until the hardware reservation is marked provisionable (about 4 minutes in August 2019).

AccessPrivateIpv4 string

The ipv4 private IP assigned to the device

AccessPublicIpv4 string

The ipv4 maintenance IP assigned to the device

AccessPublicIpv6 string

The ipv6 maintenance IP assigned to the device

AlwaysPxe bool

If true, a device with OS custom_ipxe will continue to boot via iPXE on reboots.

BillingCycle string

monthly or hourly

Created string

The timestamp for when the device was created

DeployedFacility string

The facility where the device is deployed.

Description string

Description string for the device

Facilities []string

List of facility codes with deployment preferences. Packet API will go through the list and will deploy your device to first facility with free capacity. List items must be facility codes or any (a wildcard). To find the facility code, visit Facilities API docs, set your API auth token in the top of the page and see JSON from the API response.

ForceDetachVolumes bool

Delete device even if it has volumes attached. Only applies for destroy action.

HardwareReservationId string

The ID of hardware reservation which this device occupies * hostname- The hostname of the device

Hostname string

The device name

IpAddresses []DeviceIpAddress

A list of IP address types for the device (structure is documented below).

IpxeScriptUrl string

URL pointing to a hosted iPXE script. More information is in the Custom iPXE doc.

Locked bool

Whether the device is locked

NetworkType string

Deprecated: You should handle Network Type with the new packet_device_network_type resource.

Networks []DeviceNetwork

The device’s private and public IP (v4 and v6) network details. When a device is run without any special network configuration, it will have 3 networks: * Public IPv4 at packet_device.name.network.0 * IPv6 at packet_device.name.network.1 * Private IPv4 at packet_device.name.network.2 Elastic addresses then stack by type - an assigned public IPv4 will go after the management public IPv4 (to index 1), and will then shift the indices of the IPv6 and private IPv4. Assigned private IPv4 will go after the management private IPv4 (to the end of the network list). The fields of the network attributes are:

OperatingSystem string

The operating system slug. To find the slug, or visit Operating Systems API docs, set your API auth token in the top of the page and see JSON from the API response.

Plan string

The device plan slug. To find the plan slug, visit Device plans API docs, set your auth token in the top of the page and see JSON from the API response.

Ports []DevicePort

Ports assigned to the device

ProjectId string

The ID of the project in which to create the device

ProjectSshKeyIds []string
RootPassword string

Root password to the server (disabled after 24 hours)

SshKeyIds []string

List of IDs of SSH keys deployed in the device, can be both user and project SSH keys

State string

The status of the device

Storage string

JSON for custom partitioning. Only usable on reserved hardware. More information in in the Custom Partitioning and RAID doc. * Please note that the disks.partitions.size attribute must be a string, not an integer. It can be a number string, or size notation string, e.g. “4G” or “8M” (for gigabytes and megabytes).

Tags []string

Tags attached to the device

Updated string

The timestamp for the last time the device was updated

UserData string

A string of the desired User Data for the device.

WaitForReservationDeprovision bool

Only used for devices in reserved hardware. If set, the deletion of this device will block until the hardware reservation is marked provisionable (about 4 minutes in August 2019).

accessPrivateIpv4 string

The ipv4 private IP assigned to the device

accessPublicIpv4 string

The ipv4 maintenance IP assigned to the device

accessPublicIpv6 string

The ipv6 maintenance IP assigned to the device

alwaysPxe boolean

If true, a device with OS custom_ipxe will continue to boot via iPXE on reboots.

billingCycle BillingCycle

monthly or hourly

created string

The timestamp for when the device was created

deployedFacility string

The facility where the device is deployed.

description string

Description string for the device

facilities Facility[]

List of facility codes with deployment preferences. Packet API will go through the list and will deploy your device to first facility with free capacity. List items must be facility codes or any (a wildcard). To find the facility code, visit Facilities API docs, set your API auth token in the top of the page and see JSON from the API response.

forceDetachVolumes boolean

Delete device even if it has volumes attached. Only applies for destroy action.

hardwareReservationId string

The ID of hardware reservation which this device occupies * hostname- The hostname of the device

hostname string

The device name

ipAddresses DeviceIpAddress[]

A list of IP address types for the device (structure is documented below).

ipxeScriptUrl string

URL pointing to a hosted iPXE script. More information is in the Custom iPXE doc.

locked boolean

Whether the device is locked

networkType NetworkType

Deprecated: You should handle Network Type with the new packet_device_network_type resource.

networks DeviceNetwork[]

The device’s private and public IP (v4 and v6) network details. When a device is run without any special network configuration, it will have 3 networks: * Public IPv4 at packet_device.name.network.0 * IPv6 at packet_device.name.network.1 * Private IPv4 at packet_device.name.network.2 Elastic addresses then stack by type - an assigned public IPv4 will go after the management public IPv4 (to index 1), and will then shift the indices of the IPv6 and private IPv4. Assigned private IPv4 will go after the management private IPv4 (to the end of the network list). The fields of the network attributes are:

operatingSystem OperatingSystem

The operating system slug. To find the slug, or visit Operating Systems API docs, set your API auth token in the top of the page and see JSON from the API response.

plan Plan

The device plan slug. To find the plan slug, visit Device plans API docs, set your auth token in the top of the page and see JSON from the API response.

ports DevicePort[]

Ports assigned to the device

projectId string

The ID of the project in which to create the device

projectSshKeyIds string[]
rootPassword string

Root password to the server (disabled after 24 hours)

sshKeyIds string[]

List of IDs of SSH keys deployed in the device, can be both user and project SSH keys

state string

The status of the device

storage string

JSON for custom partitioning. Only usable on reserved hardware. More information in in the Custom Partitioning and RAID doc. * Please note that the disks.partitions.size attribute must be a string, not an integer. It can be a number string, or size notation string, e.g. “4G” or “8M” (for gigabytes and megabytes).

tags string[]

Tags attached to the device

updated string

The timestamp for the last time the device was updated

userData string

A string of the desired User Data for the device.

waitForReservationDeprovision boolean

Only used for devices in reserved hardware. If set, the deletion of this device will block until the hardware reservation is marked provisionable (about 4 minutes in August 2019).

access_private_ipv4 str

The ipv4 private IP assigned to the device

access_public_ipv4 str

The ipv4 maintenance IP assigned to the device

access_public_ipv6 str

The ipv6 maintenance IP assigned to the device

always_pxe bool

If true, a device with OS custom_ipxe will continue to boot via iPXE on reboots.

billing_cycle str

monthly or hourly

created str

The timestamp for when the device was created

deployed_facility str

The facility where the device is deployed.

description str

Description string for the device

facilities Sequence[str]

List of facility codes with deployment preferences. Packet API will go through the list and will deploy your device to first facility with free capacity. List items must be facility codes or any (a wildcard). To find the facility code, visit Facilities API docs, set your API auth token in the top of the page and see JSON from the API response.

force_detach_volumes bool

Delete device even if it has volumes attached. Only applies for destroy action.

hardware_reservation_id str

The ID of hardware reservation which this device occupies * hostname- The hostname of the device

hostname str

The device name

ip_addresses Sequence[DeviceIpAddressArgs]

A list of IP address types for the device (structure is documented below).

ipxe_script_url str

URL pointing to a hosted iPXE script. More information is in the Custom iPXE doc.

locked bool

Whether the device is locked

network_type str

Deprecated: You should handle Network Type with the new packet_device_network_type resource.

networks Sequence[DeviceNetworkArgs]

The device’s private and public IP (v4 and v6) network details. When a device is run without any special network configuration, it will have 3 networks: * Public IPv4 at packet_device.name.network.0 * IPv6 at packet_device.name.network.1 * Private IPv4 at packet_device.name.network.2 Elastic addresses then stack by type - an assigned public IPv4 will go after the management public IPv4 (to index 1), and will then shift the indices of the IPv6 and private IPv4. Assigned private IPv4 will go after the management private IPv4 (to the end of the network list). The fields of the network attributes are:

operating_system str

The operating system slug. To find the slug, or visit Operating Systems API docs, set your API auth token in the top of the page and see JSON from the API response.

plan str

The device plan slug. To find the plan slug, visit Device plans API docs, set your auth token in the top of the page and see JSON from the API response.

ports Sequence[DevicePortArgs]

Ports assigned to the device

project_id str

The ID of the project in which to create the device

project_ssh_key_ids Sequence[str]
root_password str

Root password to the server (disabled after 24 hours)

ssh_key_ids Sequence[str]

List of IDs of SSH keys deployed in the device, can be both user and project SSH keys

state str

The status of the device

storage str

JSON for custom partitioning. Only usable on reserved hardware. More information in in the Custom Partitioning and RAID doc. * Please note that the disks.partitions.size attribute must be a string, not an integer. It can be a number string, or size notation string, e.g. “4G” or “8M” (for gigabytes and megabytes).

tags Sequence[str]

Tags attached to the device

updated str

The timestamp for the last time the device was updated

user_data str

A string of the desired User Data for the device.

wait_for_reservation_deprovision bool

Only used for devices in reserved hardware. If set, the deletion of this device will block until the hardware reservation is marked provisionable (about 4 minutes in August 2019).

Supporting Types

DeviceIpAddress

Type string

One of [private_ipv4, public_ipv4, public_ipv6]

Cidr int

CIDR suffix for IP address block to be assigned, i.e. amount of addresses.

ReservationIds List<string>
Type string

One of [private_ipv4, public_ipv4, public_ipv6]

Cidr int

CIDR suffix for IP address block to be assigned, i.e. amount of addresses.

ReservationIds []string
type string

One of [private_ipv4, public_ipv4, public_ipv6]

cidr number

CIDR suffix for IP address block to be assigned, i.e. amount of addresses.

reservationIds string[]
type str

One of [private_ipv4, public_ipv4, public_ipv6]

cidr int

CIDR suffix for IP address block to be assigned, i.e. amount of addresses.

reservation_ids Sequence[str]

DeviceNetwork

Address string

IPv4 or IPv6 address string

Cidr int

CIDR suffix for IP address block to be assigned, i.e. amount of addresses.

Family int

IP version - “4” or “6” * network_type Network type of a device, used in Layer 2 networking. Will be one of layer3, hybrid, layer2-individual and layer2-bonded.

Gateway string

address of router

Public bool

whether the address is routable from the Internet

Address string

IPv4 or IPv6 address string

Cidr int

CIDR suffix for IP address block to be assigned, i.e. amount of addresses.

Family int

IP version - “4” or “6” * network_type Network type of a device, used in Layer 2 networking. Will be one of layer3, hybrid, layer2-individual and layer2-bonded.

Gateway string

address of router

Public bool

whether the address is routable from the Internet

address string

IPv4 or IPv6 address string

cidr number

CIDR suffix for IP address block to be assigned, i.e. amount of addresses.

family number

IP version - “4” or “6” * network_type Network type of a device, used in Layer 2 networking. Will be one of layer3, hybrid, layer2-individual and layer2-bonded.

gateway string

address of router

public boolean

whether the address is routable from the Internet

address str

IPv4 or IPv6 address string

cidr int

CIDR suffix for IP address block to be assigned, i.e. amount of addresses.

family int

IP version - “4” or “6” * network_type Network type of a device, used in Layer 2 networking. Will be one of layer3, hybrid, layer2-individual and layer2-bonded.

gateway str

address of router

public bool

whether the address is routable from the Internet

DevicePort

Bonded bool

Whether this port is part of a bond in bonded network setup * project_id- The ID of the project the device belongs to

Id string

ID of the port

Mac string

MAC address assigned to the port

Name string

Name of the port (e.g. eth0, or bond0)

Type string

One of [private_ipv4, public_ipv4, public_ipv6]

Bonded bool

Whether this port is part of a bond in bonded network setup * project_id- The ID of the project the device belongs to

Id string

ID of the port

Mac string

MAC address assigned to the port

Name string

Name of the port (e.g. eth0, or bond0)

Type string

One of [private_ipv4, public_ipv4, public_ipv6]

bonded boolean

Whether this port is part of a bond in bonded network setup * project_id- The ID of the project the device belongs to

id string

ID of the port

mac string

MAC address assigned to the port

name string

Name of the port (e.g. eth0, or bond0)

type string

One of [private_ipv4, public_ipv4, public_ipv6]

bonded bool

Whether this port is part of a bond in bonded network setup * project_id- The ID of the project the device belongs to

id str

ID of the port

mac str

MAC address assigned to the port

name str

Name of the port (e.g. eth0, or bond0)

type str

One of [private_ipv4, public_ipv4, public_ipv6]

Package Details

Repository
https://github.com/pulumi/pulumi-packet
License
Apache-2.0
Notes
This Pulumi package is based on the packet Terraform Provider.