Package @pulumi/packet

var packet = require("@pulumi/packet");
import * as packet from "@pulumi/packet";

Modules ▾

class Device

extends CustomResource

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.

constructor

new Device(name: string, args: DeviceArgs, opts?: pulumi.CustomResourceOptions)

Create a Device resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: DeviceState, opts?: pulumi.CustomResourceOptions): Device

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

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

static isInstance(obj: any): boolean

Returns true if the given object is an instance of CustomResource. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property accessPrivateIpv4

public accessPrivateIpv4: pulumi.Output<string>;

The ipv4 private IP assigned to the device

property accessPublicIpv4

public accessPublicIpv4: pulumi.Output<string>;

The ipv4 maintenance IP assigned to the device

property accessPublicIpv6

public accessPublicIpv6: pulumi.Output<string>;

The ipv6 maintenance IP assigned to the device

property alwaysPxe

public alwaysPxe: pulumi.Output<boolean | undefined>;

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

property billingCycle

public billingCycle: pulumi.Output<string>;

monthly or hourly

property created

public created: pulumi.Output<string>;

The timestamp for when the device was created

property description

public description: pulumi.Output<string | undefined>;

Description string for the device

property facility

public facility: pulumi.Output<string>;

The facility in which to create the device. 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.

property hardwareReservationId

public hardwareReservationId: pulumi.Output<string>;

The id of hardware reservation where you want this device deployed, or next-available if you want to pick your next available reservation automatically.

property hostname

public hostname: pulumi.Output<string>;

The device name

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property ipxeScriptUrl

public ipxeScriptUrl: pulumi.Output<string | undefined>;

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

property locked

public locked: pulumi.Output<boolean>;

Whether the device is locked

property networks

public networks: pulumi.Output<{
    address: string;
    cidr: number;
    family: number;
    gateway: string;
    public: boolean;
}[]>;

The device’s private and public IP (v4 and v6) network details

property operatingSystem

public operatingSystem: pulumi.Output<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.

property plan

public plan: pulumi.Output<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.

property projectId

public projectId: pulumi.Output<string>;

The id of the project in which to create the device

property publicIpv4SubnetSize

public publicIpv4SubnetSize: pulumi.Output<number>;

Size of allocated subnet, more information is in the Custom Subnet Size doc.

property rootPassword

public rootPassword: pulumi.Output<string>;

Root password to the server (disabled after 24 hours)

property state

public state: pulumi.Output<string>;

The status of the device

property storage

public storage: pulumi.Output<string | undefined>;

JSON for custom partitioning. Only usable on reserved hardware. More information in in the Custom Partitioning and RAID doc.

property tags

public tags: pulumi.Output<string[] | undefined>;

Tags attached to the device

property updated

public updated: pulumi.Output<string>;

The timestamp for the last time the device was updated

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

property userData

public userData: pulumi.Output<string | undefined>;

A string of the desired User Data for the device.

class IpAttachment

extends CustomResource

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.

constructor

new IpAttachment(name: string, args: IpAttachmentArgs, opts?: pulumi.CustomResourceOptions)

Create a IpAttachment resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: IpAttachmentState, opts?: pulumi.CustomResourceOptions): IpAttachment

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

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

static isInstance(obj: any): boolean

Returns true if the given object is an instance of CustomResource. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property address

public address: pulumi.Output<string>;

property addressFamily

public addressFamily: pulumi.Output<number>;

Address family as integer (4 or 6)

property cidr

public cidr: pulumi.Output<number>;

length of CIDR prefix of the subnet as integer

property cidrNotation

public cidrNotation: pulumi.Output<string>;

CIDR notation of subnet from block reserved in the same project and facility as the device

property deviceId

public deviceId: pulumi.Output<string>;

ID of device to which to assign the subnet

property gateway

public gateway: pulumi.Output<string>;

IP address of gateway for the subnet

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property manageable

public manageable: pulumi.Output<boolean>;

property management

public management: pulumi.Output<boolean>;

property netmask

public netmask: pulumi.Output<string>;

Subnet mask in decimal notation, e.g. “255.255.255.0”

property network

public network: pulumi.Output<string>;

Subnet network address

property public

public public: pulumi.Output<boolean>;

boolean flag whether subnet is reachable from the Internet

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

class Organization

extends CustomResource

Provides a resource to manage organization resource in Packet.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as packet from "@pulumi/packet";

const packet_organization_tf_organization_1 = new packet.Organization("tf_organization_1", {
    description: "quux",
    name: "foobar",
});

constructor

new Organization(name: string, args: OrganizationArgs, opts?: pulumi.CustomResourceOptions)

Create a Organization resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: OrganizationState, opts?: pulumi.CustomResourceOptions): Organization

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

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

static isInstance(obj: any): boolean

Returns true if the given object is an instance of CustomResource. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property created

public created: pulumi.Output<string>;

property description

public description: pulumi.Output<string | undefined>;

Description string.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

public logo: pulumi.Output<string | undefined>;

Logo URL.

property name

public name: pulumi.Output<string>;

The name of the Organization.

property twitter

public twitter: pulumi.Output<string | undefined>;

Twitter handle.

property updated

public updated: pulumi.Output<string>;

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

property website

public website: pulumi.Output<string | undefined>;

Website link.

class Project

extends CustomResource

Provides a Packet Project resource to allow you manage devices in your projects.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as packet from "@pulumi/packet";

const packet_project_tf_project_1 = new packet.Project("tf_project_1", {
    name: "Terraform Fun",
});

constructor

new Project(name: string, args: ProjectArgs, opts?: pulumi.CustomResourceOptions)

Create a Project resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ProjectState, opts?: pulumi.CustomResourceOptions): Project

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

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

static isInstance(obj: any): boolean

Returns true if the given object is an instance of CustomResource. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property created

public created: pulumi.Output<string>;

The timestamp for when the Project was created

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property name

public name: pulumi.Output<string>;

The name of the Project on Packet.net

property organizationId

public organizationId: pulumi.Output<string>;

The UUID of Organization under which you want to create the project. If you leave it out, the project will be create under your the default Organization of your account.

property paymentMethodId

public paymentMethodId: pulumi.Output<string>;

The UUID of payment method for this project. If you keep it empty, Packet API will pick your default Payment Method.

property updated

public updated: pulumi.Output<string>;

The timestamp for the last time the Project was updated

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

class Provider

extends ProviderResource

The provider type for the packet package. By default, resources use package-wide configuration settings, however an explicit Provider instance may be created and passed during resource construction to achieve fine-grained programmatic control over provider settings. See the documentation for more information.

constructor

new Provider(name: string, args?: ProviderArgs, opts?: pulumi.ResourceOptions)

Create a Provider resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

static isInstance(obj: any): boolean

Returns true if the given object is an instance of CustomResource. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

class ReservedIpBlock

extends CustomResource

Provides a resource to create and manage blocks of reserved IP addresses in a project.

When user provision first device in a facility, Packet automatically allocates IPv6/56 and private IPv4/25 blocks. The new device then gets IPv6 and private IPv4 addresses from those block. It also gets a public IPv4/31 address. Every new device in the project and facility will automatically get IPv6 and private IPv4 addresses from pre-allocated i blocks. The IPv6 and private IPv4 blocks can’t be created, only imported.

It is only possible to create public IPv4 blocks, with masks from /24 (256 addresses) to /32 (1 address).

Once IP block is allocated or imported, an address from it can be assigned to device with the packet_ip_attachment resource.

constructor

new ReservedIpBlock(name: string, args: ReservedIpBlockArgs, opts?: pulumi.CustomResourceOptions)

Create a ReservedIpBlock resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ReservedIpBlockState, opts?: pulumi.CustomResourceOptions): ReservedIpBlock

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

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

static isInstance(obj: any): boolean

Returns true if the given object is an instance of CustomResource. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property address

public address: pulumi.Output<string>;

property addressFamily

public addressFamily: pulumi.Output<number>;

Address family as integer (4 or 6)

property cidr

public cidr: pulumi.Output<number>;

length of CIDR prefix of the block as integer

property cidrNotation

public cidrNotation: pulumi.Output<string>;

Address and mask in CIDR notation, e.g. “147.229.15.30/31”

property facility

public facility: pulumi.Output<string>;

The facility where to allocate the address block

property gateway

public gateway: pulumi.Output<string>;

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property manageable

public manageable: pulumi.Output<boolean>;

property management

public management: pulumi.Output<boolean>;

property netmask

public netmask: pulumi.Output<string>;

Mask in decimal notation, e.g. “255.255.255.0”

property network

public network: pulumi.Output<string>;

Network IP address portion of the block specification

property projectId

public projectId: pulumi.Output<string>;

The packet project ID where to allocate the address block

property public

public public: pulumi.Output<boolean>;

boolean flag whether addresses from a block are public

property quantity

public quantity: pulumi.Output<number>;

The number of allocated /32 addresses, a power of 2

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

class SSHKey

extends CustomResource

Provides a Packet SSH key resource to allow you manage SSH keys on your account. All SSH keys on your account are loaded on all new devices, they do not have to be explicitly declared on device creation.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as fs from "fs";
import * as packet from "@pulumi/packet";

const packet_ssh_key_key1 = new packet.SSHKey("key1", {
    name: "terraform-1",
    publicKey: fs.readFileSync("/home/terraform/.ssh/id_rsa.pub", "utf-8"),
});

constructor

new SSHKey(name: string, args: SSHKeyArgs, opts?: pulumi.CustomResourceOptions)

Create a SSHKey resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: SSHKeyState, opts?: pulumi.CustomResourceOptions): SSHKey

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

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

static isInstance(obj: any): boolean

Returns true if the given object is an instance of CustomResource. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property created

public created: pulumi.Output<string>;

The timestamp for when the SSH key was created

property fingerprint

public fingerprint: pulumi.Output<string>;

The fingerprint of the SSH key

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property name

public name: pulumi.Output<string>;

The name of the SSH key for identification

property publicKey

public publicKey: pulumi.Output<string>;

The public key. If this is a file, it can be read using the file interpolation function

property updated

public updated: pulumi.Output<string>;

The timestamp for the last time the SSH key was updated

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

class SpotMarketRequest

extends CustomResource

Provides a Packet Spot Market Request resource to allow you to manage spot market requests on your account. https://help.packet.net/en-us/article/20-spot-market

constructor

new SpotMarketRequest(name: string, args: SpotMarketRequestArgs, opts?: pulumi.CustomResourceOptions)

Create a SpotMarketRequest resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: SpotMarketRequestState, opts?: pulumi.CustomResourceOptions): SpotMarketRequest

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

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

static isInstance(obj: any): boolean

Returns true if the given object is an instance of CustomResource. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property devicesMax

public devicesMax: pulumi.Output<number>;

Maximum number devices to be created

property devicesMin

public devicesMin: pulumi.Output<number>;

Miniumum number devices to be created

property facilities

public facilities: pulumi.Output<string[]>;

Facility IDs where devices should be created

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property instanceParameters

public instanceParameters: pulumi.Output<{
    alwaysPxe: string;
    billingCycle: string;
    description: string;
    features: string[];
    hostname: string;
    locked: string;
    operatingSystem: string;
    plan: string;
    projectSshKeys: string[];
    termintationTime: string;
    userSshKeys: string[];
    userdata: string;
}>;

Device parameters. See device resource for details

property maxBidPrice

public maxBidPrice: pulumi.Output<number>;

Maximum price user is willing to pay per hour per device

property projectId

public projectId: pulumi.Output<string>;

Project ID

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

property waitForDevices

public waitForDevices: pulumi.Output<boolean | undefined>;

On resource creation - wait until all desired devices are active, on resource destruction - wait until devices are removed

class Volume

extends CustomResource

Provides a Packet Block Storage Volume resource to allow you to manage block volumes on your account. Once created by Terraform, they must then be attached and mounted using the api and packet_block_attach and packet_block_detach scripts.

constructor

new Volume(name: string, args: VolumeArgs, opts?: pulumi.CustomResourceOptions)

Create a Volume resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: VolumeState, opts?: pulumi.CustomResourceOptions): Volume

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

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

static isInstance(obj: any): boolean

Returns true if the given object is an instance of CustomResource. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property attachments

public attachments: pulumi.Output<{
    href: string;
}[]>;

A list of attachments, each with it’s own href attribute

property billingCycle

public billingCycle: pulumi.Output<string>;

The billing cycle, defaults to “hourly”

property created

public created: pulumi.Output<string>;

The timestamp for when the volume was created

property description

public description: pulumi.Output<string | undefined>;

Optional description for the volume

property facility

public facility: pulumi.Output<string>;

The facility to create the volume in

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property locked

public locked: pulumi.Output<boolean | undefined>;

Lock or unlock the volume

property name

public name: pulumi.Output<string>;

The name of the volume

property plan

public plan: pulumi.Output<string>;

The service plan slug of the volume

property projectId

public projectId: pulumi.Output<string>;

The packet project ID to deploy the volume in

property size

public size: pulumi.Output<number>;

The size in GB to make the volume

property snapshotPolicies

public snapshotPolicies: pulumi.Output<{
    snapshotCount: number;
    snapshotFrequency: string;
}[] | undefined>;

Optional list of snapshot policies

property state

public state: pulumi.Output<string>;

The state of the volume

property updated

public updated: pulumi.Output<string>;

The timestamp for the last time the volume was updated

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

class VolumeAttachment

extends CustomResource

Provides attachment of Packet Block Storage Volume to Devices.

Device and volume must be in the same location (facility).

Once attached by Terraform, they must then be mounted using the packet_block_attach and packet_block_detach scripts.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as packet from "@pulumi/packet";

const packet_project_test_project = new packet.Project("test_project", {
    name: "test-project",
});
const packet_device_test_device_va = new packet.Device("test_device_va", {
    billingCycle: "hourly",
    facility: "ewr1",
    hostname: "terraform-test-device-va",
    operatingSystem: "ubuntu_16_04",
    plan: "baremetal_0",
    projectId: packet_project_test_project.id,
});
const packet_volume_test_volume_va = new packet.Volume("test_volume_va", {
    billingCycle: "hourly",
    facility: "ewr1",
    plan: "storage_1",
    projectId: packet_project_test_project.id,
    size: 100,
    snapshotPolicies: [{
        snapshotCount: 7,
        snapshotFrequency: "1day",
    }],
});
const packet_volume_attachment_test_volume_attachment = new packet.VolumeAttachment("test_volume_attachment", {
    deviceId: packet_device_test_device_va.id,
    volumeId: packet_volume_test_volume_va.id,
});

constructor

new VolumeAttachment(name: string, args: VolumeAttachmentArgs, opts?: pulumi.CustomResourceOptions)

Create a VolumeAttachment resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: VolumeAttachmentState, opts?: pulumi.CustomResourceOptions): VolumeAttachment

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

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

static isInstance(obj: any): boolean

Returns true if the given object is an instance of CustomResource. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property deviceId

public deviceId: pulumi.Output<string>;

The ID of the device to which the volume should be attached

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

property volumeId

public volumeId: pulumi.Output<string>;

The ID of the volume to attach

function getEnv

getEnv(vars: string[]): string | undefined

function getEnvBoolean

getEnvBoolean(vars: string[]): boolean | undefined

function getEnvNumber

getEnvNumber(vars: string[]): number | undefined

function getOperatingSystem

getOperatingSystem(args?: GetOperatingSystemArgs, opts?: pulumi.InvokeOptions): Promise<GetOperatingSystemResult>

Use this data source to get Packet Operating System image.

function getPrecreatedIpBlock

getPrecreatedIpBlock(args: GetPrecreatedIpBlockArgs, opts?: pulumi.InvokeOptions): Promise<GetPrecreatedIpBlockResult>

Use this data source to get CIDR expression for precreated IPv6 and IPv4 blocks in Packet. You can then use the cidrsubnet TF builtin function to derive subnets.

function getSpotMarketPrice

getSpotMarketPrice(args: GetSpotMarketPriceArgs, opts?: pulumi.InvokeOptions): Promise<GetSpotMarketPriceResult>

Use this data source to get Packet Spot Market Price.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as packet from "@pulumi/packet";

const packet_spot_market_price_example = pulumi.output(packet.getSpotMarketPrice({
    facility: "ewr1",
    plan: "baremetal_1",
}));

function requireWithDefault

requireWithDefault<T>(req: () => T, def: T | undefined): T

interface DeviceArgs

The set of arguments for constructing a Device resource.

property alwaysPxe

alwaysPxe?: pulumi.Input<boolean>;

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

property billingCycle

billingCycle: pulumi.Input<string>;

monthly or hourly

property description

description?: pulumi.Input<string>;

Description string for the device

property facility

facility: pulumi.Input<string>;

The facility in which to create the device. 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.

property hardwareReservationId

hardwareReservationId?: pulumi.Input<string>;

The id of hardware reservation where you want this device deployed, or next-available if you want to pick your next available reservation automatically.

property hostname

hostname: pulumi.Input<string>;

The device name

property ipxeScriptUrl

ipxeScriptUrl?: pulumi.Input<string>;

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

property operatingSystem

operatingSystem: pulumi.Input<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.

property plan

plan: pulumi.Input<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.

property projectId

projectId: pulumi.Input<string>;

The id of the project in which to create the device

property publicIpv4SubnetSize

publicIpv4SubnetSize?: pulumi.Input<number>;

Size of allocated subnet, more information is in the Custom Subnet Size doc.

property storage

storage?: pulumi.Input<string>;

JSON for custom partitioning. Only usable on reserved hardware. More information in in the Custom Partitioning and RAID doc.

property tags

tags?: pulumi.Input<pulumi.Input<string>[]>;

Tags attached to the device

property userData

userData?: pulumi.Input<string>;

A string of the desired User Data for the device.

interface DeviceState

Input properties used for looking up and filtering Device resources.

property accessPrivateIpv4

accessPrivateIpv4?: pulumi.Input<string>;

The ipv4 private IP assigned to the device

property accessPublicIpv4

accessPublicIpv4?: pulumi.Input<string>;

The ipv4 maintenance IP assigned to the device

property accessPublicIpv6

accessPublicIpv6?: pulumi.Input<string>;

The ipv6 maintenance IP assigned to the device

property alwaysPxe

alwaysPxe?: pulumi.Input<boolean>;

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

property billingCycle

billingCycle?: pulumi.Input<string>;

monthly or hourly

property created

created?: pulumi.Input<string>;

The timestamp for when the device was created

property description

description?: pulumi.Input<string>;

Description string for the device

property facility

facility?: pulumi.Input<string>;

The facility in which to create the device. 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.

property hardwareReservationId

hardwareReservationId?: pulumi.Input<string>;

The id of hardware reservation where you want this device deployed, or next-available if you want to pick your next available reservation automatically.

property hostname

hostname?: pulumi.Input<string>;

The device name

property ipxeScriptUrl

ipxeScriptUrl?: pulumi.Input<string>;

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

property locked

locked?: pulumi.Input<boolean>;

Whether the device is locked

property networks

networks?: pulumi.Input<pulumi.Input<{
    address: pulumi.Input<string>;
    cidr: pulumi.Input<number>;
    family: pulumi.Input<number>;
    gateway: pulumi.Input<string>;
    public: pulumi.Input<boolean>;
}>[]>;

The device’s private and public IP (v4 and v6) network details

property operatingSystem

operatingSystem?: pulumi.Input<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.

property plan

plan?: pulumi.Input<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.

property projectId

projectId?: pulumi.Input<string>;

The id of the project in which to create the device

property publicIpv4SubnetSize

publicIpv4SubnetSize?: pulumi.Input<number>;

Size of allocated subnet, more information is in the Custom Subnet Size doc.

property rootPassword

rootPassword?: pulumi.Input<string>;

Root password to the server (disabled after 24 hours)

property state

state?: pulumi.Input<string>;

The status of the device

property storage

storage?: pulumi.Input<string>;

JSON for custom partitioning. Only usable on reserved hardware. More information in in the Custom Partitioning and RAID doc.

property tags

tags?: pulumi.Input<pulumi.Input<string>[]>;

Tags attached to the device

property updated

updated?: pulumi.Input<string>;

The timestamp for the last time the device was updated

property userData

userData?: pulumi.Input<string>;

A string of the desired User Data for the device.

interface GetOperatingSystemArgs

A collection of arguments for invoking getOperatingSystem.

property distro

distro?: string;

Name of the OS distribution.

property name

name?: string;

Name or part of the name of the distribution. Case insensitive.

property provisionableOn

provisionableOn?: string;

Plan name.

property version

version?: string;

Version of the distribution

interface GetOperatingSystemResult

A collection of values returned by getOperatingSystem.

property id

id: string;

id is the provider-assigned unique ID for this managed resource.

property slug

slug: string;

interface GetPrecreatedIpBlockArgs

A collection of arguments for invoking getPrecreatedIpBlock.

property addressFamily

addressFamily: number;

4 or 6, depending on which block you are looking for.

property facility

facility: string;

Facility of the searched block.

property projectId

projectId: string;

ID of the project where the searched block should be.

property public

public: boolean;

Whether to look for public or private block.

interface GetPrecreatedIpBlockResult

A collection of values returned by getPrecreatedIpBlock.

property address

address: string;

property cidr

cidr: number;

property cidrNotation

cidrNotation: string;

CIDR notation of the looked up block.

property gateway

gateway: string;

property id

id: string;

id is the provider-assigned unique ID for this managed resource.

property manageable

manageable: boolean;

property management

management: boolean;

property netmask

netmask: string;

property network

network: string;

property quantity

quantity: number;

interface GetSpotMarketPriceArgs

A collection of arguments for invoking getSpotMarketPrice.

property facility

facility: string;

Name of the facility.

property plan

plan: string;

Name of the plan.

interface GetSpotMarketPriceResult

A collection of values returned by getSpotMarketPrice.

property id

id: string;

id is the provider-assigned unique ID for this managed resource.

property price

price: number;

Current spot market price for given plan in given facility.

interface IpAttachmentArgs

The set of arguments for constructing a IpAttachment resource.

property cidrNotation

cidrNotation: pulumi.Input<string>;

CIDR notation of subnet from block reserved in the same project and facility as the device

property deviceId

deviceId: pulumi.Input<string>;

ID of device to which to assign the subnet

interface IpAttachmentState

Input properties used for looking up and filtering IpAttachment resources.

property address

address?: pulumi.Input<string>;

property addressFamily

addressFamily?: pulumi.Input<number>;

Address family as integer (4 or 6)

property cidr

cidr?: pulumi.Input<number>;

length of CIDR prefix of the subnet as integer

property cidrNotation

cidrNotation?: pulumi.Input<string>;

CIDR notation of subnet from block reserved in the same project and facility as the device

property deviceId

deviceId?: pulumi.Input<string>;

ID of device to which to assign the subnet

property gateway

gateway?: pulumi.Input<string>;

IP address of gateway for the subnet

property manageable

manageable?: pulumi.Input<boolean>;

property management

management?: pulumi.Input<boolean>;

property netmask

netmask?: pulumi.Input<string>;

Subnet mask in decimal notation, e.g. “255.255.255.0”

property network

network?: pulumi.Input<string>;

Subnet network address

property public

public?: pulumi.Input<boolean>;

boolean flag whether subnet is reachable from the Internet

interface OrganizationArgs

The set of arguments for constructing a Organization resource.

property description

description?: pulumi.Input<string>;

Description string.

logo?: pulumi.Input<string>;

Logo URL.

property name

name: pulumi.Input<string>;

The name of the Organization.

property twitter

twitter?: pulumi.Input<string>;

Twitter handle.

property website

website?: pulumi.Input<string>;

Website link.

interface OrganizationState

Input properties used for looking up and filtering Organization resources.

property created

created?: pulumi.Input<string>;

property description

description?: pulumi.Input<string>;

Description string.

logo?: pulumi.Input<string>;

Logo URL.

property name

name?: pulumi.Input<string>;

The name of the Organization.

property twitter

twitter?: pulumi.Input<string>;

Twitter handle.

property updated

updated?: pulumi.Input<string>;

property website

website?: pulumi.Input<string>;

Website link.

interface ProjectArgs

The set of arguments for constructing a Project resource.

property name

name: pulumi.Input<string>;

The name of the Project on Packet.net

property organizationId

organizationId?: pulumi.Input<string>;

The UUID of Organization under which you want to create the project. If you leave it out, the project will be create under your the default Organization of your account.

property paymentMethodId

paymentMethodId?: pulumi.Input<string>;

The UUID of payment method for this project. If you keep it empty, Packet API will pick your default Payment Method.

interface ProjectState

Input properties used for looking up and filtering Project resources.

property created

created?: pulumi.Input<string>;

The timestamp for when the Project was created

property name

name?: pulumi.Input<string>;

The name of the Project on Packet.net

property organizationId

organizationId?: pulumi.Input<string>;

The UUID of Organization under which you want to create the project. If you leave it out, the project will be create under your the default Organization of your account.

property paymentMethodId

paymentMethodId?: pulumi.Input<string>;

The UUID of payment method for this project. If you keep it empty, Packet API will pick your default Payment Method.

property updated

updated?: pulumi.Input<string>;

The timestamp for the last time the Project was updated

interface ProviderArgs

The set of arguments for constructing a Provider resource.

property authToken

authToken?: pulumi.Input<string>;

The API auth key for API operations.

interface ReservedIpBlockArgs

The set of arguments for constructing a ReservedIpBlock resource.

property facility

facility: pulumi.Input<string>;

The facility where to allocate the address block

property projectId

projectId: pulumi.Input<string>;

The packet project ID where to allocate the address block

property quantity

quantity: pulumi.Input<number>;

The number of allocated /32 addresses, a power of 2

interface ReservedIpBlockState

Input properties used for looking up and filtering ReservedIpBlock resources.

property address

address?: pulumi.Input<string>;

property addressFamily

addressFamily?: pulumi.Input<number>;

Address family as integer (4 or 6)

property cidr

cidr?: pulumi.Input<number>;

length of CIDR prefix of the block as integer

property cidrNotation

cidrNotation?: pulumi.Input<string>;

Address and mask in CIDR notation, e.g. “147.229.15.30/31”

property facility

facility?: pulumi.Input<string>;

The facility where to allocate the address block

property gateway

gateway?: pulumi.Input<string>;

property manageable

manageable?: pulumi.Input<boolean>;

property management

management?: pulumi.Input<boolean>;

property netmask

netmask?: pulumi.Input<string>;

Mask in decimal notation, e.g. “255.255.255.0”

property network

network?: pulumi.Input<string>;

Network IP address portion of the block specification

property projectId

projectId?: pulumi.Input<string>;

The packet project ID where to allocate the address block

property public

public?: pulumi.Input<boolean>;

boolean flag whether addresses from a block are public

property quantity

quantity?: pulumi.Input<number>;

The number of allocated /32 addresses, a power of 2

interface SSHKeyArgs

The set of arguments for constructing a SSHKey resource.

property name

name: pulumi.Input<string>;

The name of the SSH key for identification

property publicKey

publicKey: pulumi.Input<string>;

The public key. If this is a file, it can be read using the file interpolation function

interface SSHKeyState

Input properties used for looking up and filtering SSHKey resources.

property created

created?: pulumi.Input<string>;

The timestamp for when the SSH key was created

property fingerprint

fingerprint?: pulumi.Input<string>;

The fingerprint of the SSH key

property name

name?: pulumi.Input<string>;

The name of the SSH key for identification

property publicKey

publicKey?: pulumi.Input<string>;

The public key. If this is a file, it can be read using the file interpolation function

property updated

updated?: pulumi.Input<string>;

The timestamp for the last time the SSH key was updated

interface SpotMarketRequestArgs

The set of arguments for constructing a SpotMarketRequest resource.

property devicesMax

devicesMax: pulumi.Input<number>;

Maximum number devices to be created

property devicesMin

devicesMin: pulumi.Input<number>;

Miniumum number devices to be created

property facilities

facilities: pulumi.Input<pulumi.Input<string>[]>;

Facility IDs where devices should be created

property instanceParameters

instanceParameters: pulumi.Input<{
    alwaysPxe: pulumi.Input<string>;
    billingCycle: pulumi.Input<string>;
    description: pulumi.Input<string>;
    features: pulumi.Input<pulumi.Input<string>[]>;
    hostname: pulumi.Input<string>;
    locked: pulumi.Input<string>;
    operatingSystem: pulumi.Input<string>;
    plan: pulumi.Input<string>;
    projectSshKeys: pulumi.Input<pulumi.Input<string>[]>;
    termintationTime: pulumi.Input<string>;
    userSshKeys: pulumi.Input<pulumi.Input<string>[]>;
    userdata: pulumi.Input<string>;
}>;

Device parameters. See device resource for details

property maxBidPrice

maxBidPrice: pulumi.Input<number>;

Maximum price user is willing to pay per hour per device

property projectId

projectId: pulumi.Input<string>;

Project ID

property waitForDevices

waitForDevices?: pulumi.Input<boolean>;

On resource creation - wait until all desired devices are active, on resource destruction - wait until devices are removed

interface SpotMarketRequestState

Input properties used for looking up and filtering SpotMarketRequest resources.

property devicesMax

devicesMax?: pulumi.Input<number>;

Maximum number devices to be created

property devicesMin

devicesMin?: pulumi.Input<number>;

Miniumum number devices to be created

property facilities

facilities?: pulumi.Input<pulumi.Input<string>[]>;

Facility IDs where devices should be created

property instanceParameters

instanceParameters?: pulumi.Input<{
    alwaysPxe: pulumi.Input<string>;
    billingCycle: pulumi.Input<string>;
    description: pulumi.Input<string>;
    features: pulumi.Input<pulumi.Input<string>[]>;
    hostname: pulumi.Input<string>;
    locked: pulumi.Input<string>;
    operatingSystem: pulumi.Input<string>;
    plan: pulumi.Input<string>;
    projectSshKeys: pulumi.Input<pulumi.Input<string>[]>;
    termintationTime: pulumi.Input<string>;
    userSshKeys: pulumi.Input<pulumi.Input<string>[]>;
    userdata: pulumi.Input<string>;
}>;

Device parameters. See device resource for details

property maxBidPrice

maxBidPrice?: pulumi.Input<number>;

Maximum price user is willing to pay per hour per device

property projectId

projectId?: pulumi.Input<string>;

Project ID

property waitForDevices

waitForDevices?: pulumi.Input<boolean>;

On resource creation - wait until all desired devices are active, on resource destruction - wait until devices are removed

interface VolumeArgs

The set of arguments for constructing a Volume resource.

property billingCycle

billingCycle?: pulumi.Input<string>;

The billing cycle, defaults to “hourly”

property description

description?: pulumi.Input<string>;

Optional description for the volume

property facility

facility: pulumi.Input<string>;

The facility to create the volume in

property locked

locked?: pulumi.Input<boolean>;

Lock or unlock the volume

property plan

plan: pulumi.Input<string>;

The service plan slug of the volume

property projectId

projectId: pulumi.Input<string>;

The packet project ID to deploy the volume in

property size

size: pulumi.Input<number>;

The size in GB to make the volume

property snapshotPolicies

snapshotPolicies?: pulumi.Input<pulumi.Input<{
    snapshotCount: pulumi.Input<number>;
    snapshotFrequency: pulumi.Input<string>;
}>[]>;

Optional list of snapshot policies

interface VolumeAttachmentArgs

The set of arguments for constructing a VolumeAttachment resource.

property deviceId

deviceId: pulumi.Input<string>;

The ID of the device to which the volume should be attached

property volumeId

volumeId: pulumi.Input<string>;

The ID of the volume to attach

interface VolumeAttachmentState

Input properties used for looking up and filtering VolumeAttachment resources.

property deviceId

deviceId?: pulumi.Input<string>;

The ID of the device to which the volume should be attached

property volumeId

volumeId?: pulumi.Input<string>;

The ID of the volume to attach

interface VolumeState

Input properties used for looking up and filtering Volume resources.

property attachments

attachments?: pulumi.Input<pulumi.Input<{
    href: pulumi.Input<string>;
}>[]>;

A list of attachments, each with it’s own href attribute

property billingCycle

billingCycle?: pulumi.Input<string>;

The billing cycle, defaults to “hourly”

property created

created?: pulumi.Input<string>;

The timestamp for when the volume was created

property description

description?: pulumi.Input<string>;

Optional description for the volume

property facility

facility?: pulumi.Input<string>;

The facility to create the volume in

property locked

locked?: pulumi.Input<boolean>;

Lock or unlock the volume

property name

name?: pulumi.Input<string>;

The name of the volume

property plan

plan?: pulumi.Input<string>;

The service plan slug of the volume

property projectId

projectId?: pulumi.Input<string>;

The packet project ID to deploy the volume in

property size

size?: pulumi.Input<number>;

The size in GB to make the volume

property snapshotPolicies

snapshotPolicies?: pulumi.Input<pulumi.Input<{
    snapshotCount: pulumi.Input<number>;
    snapshotFrequency: pulumi.Input<string>;
}>[]>;

Optional list of snapshot policies

property state

state?: pulumi.Input<string>;

The state of the volume

property updated

updated?: pulumi.Input<string>;

The timestamp for the last time the volume was updated