Package @pulumi/packet

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

Index ▾

bgpSession.ts device.ts getOperatingSystem.ts getPrecreatedIpBlock.ts getSpotMarketPrice.ts ipAttachment.ts organization.ts project.ts projectSshKey.ts provider.ts reservedIpBlock.ts spotMarketRequest.ts sshKey.ts utilities.ts vlan.ts volume.ts volumeAttachment.ts

Modules ▾

class BgpSession

extends CustomResource

Provides a resource to manage BGP sessions in Packet Host. Refer to Packet BGP documentation for more details.

You need to have BGP config enabled in your project.

BGP session must be linked to a device running BIRD or other BGP routing daemon which will control route advertisements via the session to Packet’s upstream routers.

constructor

new BgpSession(name: string, args: BgpSessionArgs, opts?: pulumi.CustomResourceOptions)

Create a BgpSession 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?: BgpSessionState, opts?: pulumi.CustomResourceOptions): BgpSession

Get an existing BgpSession 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 addressFamily

public addressFamily: pulumi.Output<string>;

ipv4 or ipv6

property deviceId

public deviceId: pulumi.Output<string>;

ID of device

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 status

public status: 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.

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.

Example Usage

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

// Create a device and add it to cool_project
const web1 = new packet.Device("web1", {
    billingCycle: "hourly",
    facility: "ewr1",
    hostname: "tf.coreos2",
    operatingSystem: "coreos_stable",
    plan: "t1.small.x86",
    projectId: packet_project_cool_project.id,
});
import * as pulumi from "@pulumi/pulumi";
import * as packet from "@pulumi/packet";

// Same as above, but boot via iPXE initially, using the Ignition Provider for provisioning
const pxe1 = new packet.Device("pxe1", {
    alwaysPxe: false,
    billingCycle: "hourly",
    facility: "ewr1",
    hostname: "tf.coreos2-pxe",
    ipxeScriptUrl: "https://rawgit.com/cloudnativelabs/pxe/master/packet/coreos-stable-packet.ipxe",
    operatingSystem: "custom_ipxe",
    plan: "t1.small.x86",
    projectId: packet_project_cool_project.id,
    userData: ignition_config_example.rendered.apply(rendered => rendered),
});
import * as pulumi from "@pulumi/pulumi";
import * as packet from "@pulumi/packet";

// Deploy device on next-available reserved hardware and do custom partitioning.
const web1 = new packet.Device("web1", {
    billingCycle: "hourly",
    facility: "sjc1",
    hardwareReservationId: "next-available",
    hostname: "tftest",
    operatingSystem: "ubuntu_16_04",
    plan: "t1.small.x86",
    projectId: packet_project_cool_project.id,
    storage: `{
  "disks": [
    {
      "device": "/dev/sda",
      "wipeTable": true,
      "partitions": [
        {
          "label": "BIOS",
          "number": 1,
          "size": 4096
        },
        {
          "label": "SWAP",
          "number": 2,
          "size": "3993600"
        },
        {
          "label": "ROOT",
          "number": 3,
          "size": 0
        }
      ]
    }
  ],
  "filesystems": [
    {
      "mount": {
        "device": "/dev/sda3",
        "format": "ext4",
        "point": "/",
        "create": {
          "options": [
            "-L",
            "ROOT"
          ]
        }
      }
    },
    {
      "mount": {
        "device": "/dev/sda2",
        "format": "swap",
        "point": "none",
        "create": {
          "options": [
            "-L",
            "SWAP"
          ]
        }
      }
    }
  ]
}
  `,
});

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 facilities

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

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.

property facility

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

The facility in which to create the device.

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. 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:

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 projectSshKeyIds

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

Array of IDs of the project SSH keys which should be added to the device. If you omit this, SSH keys of all the members of the parent project will be added to the device. If you specify this array, only the listed project SSH keys will be added. Project SSH keys can be created with the [packet_project_ssh_key][packet_project_ssh_key.html] resource.

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 sshKeyIds

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

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

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.

Example Usage

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

// Reserve /30 block of max 2 public IPv4 addresses in Parsippany, NJ (ewr1) for myproject
const myblock = new packet.ReservedIpBlock("myblock", {
    facility: "ewr1",
    projectId: packet_project_myproject.id,
    quantity: 2,
});
// Assign /32 subnet (single address) from reserved block to a device
const firstAddressAssingment = new packet.IpAttachment("first_address_assingment", {
    cidrNotation: myblock.cidrNotation.apply(cidrNotation => `${(() => { throw "NYI: call to cidrhost"; })()}/32`),
    deviceId: packet_device_mydevice.id,
});

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 global

public global: pulumi.Output<boolean>;

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";

// Create a new Project
const tfOrganization1 = new packet.Organization("tf_organization_1", {
    description: "quux",
});

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";

// Create a new project
const tfProject1 = new packet.Project("tf_project_1", {});

Example with BGP config

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

// Create a new Project
const tfProject1 = new packet.Project("tf_project_1", {
    bgpConfig: {
        asn: 65000,
        deploymentType: "local",
        md5: "C179c28c41a85b",
    },
});

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 bgpConfig

public bgpConfig: pulumi.Output<{
    asn: number;
    deploymentType: string;
    maxPrefix: number;
    md5: string;
    status: string;
} | undefined>;

Optional BGP settings. Refer to Packet guide for BGP.

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. The payment method and the project need to belong to the same organization (passed with organization_id, or default).

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 ProjectSshKey

extends CustomResource

Provides a Packet project SSH key resource to manage project-specific SSH keys. On contrary to user SSH keys, project SSH keys are used to exclusively populate authorized_keys in new devices.

If you supply a list of project SSH keys when creating a new device, only the listed keys are used; user SSH keys are ignored.

Example Usage

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

const testProject = new packet.Project("test", {});
const testProjectSshKey = new packet.ProjectSshKey("test", {
    projectId: testProject.id,
    publicKey: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDM/unxJeFqxsTJcu6mhqsMHSaVlpu+Jj/P+44zrm6X/MAoHSX3X9oLgujEjjZ74yLfdfe0bJrbL2YgJzNaEkIQQ1VPMHB5EhTKUBGnzlPP0hHTnxsjAm9qDHgUPgvgFDQSAMzdJRJ0Cexo16Ph9VxCoLh3dxiE7s2gaM2FdVg7P8aSxKypsxAhYV3D0AwqzoOyT6WWhBoQ0xZ85XevOTnJCpImSemEGs6nVGEsWcEc1d1YvdxFjAK4SdsKUMkj4Dsy/leKsdi/DEAf356vbMT1UHsXXvy5TlHu/Pa6qF53v32Enz+nhKy7/8W2Yt2yWx8HnQcT2rug9lvCXagJO6oauqRTO77C4QZn13ZLMZgLT66S/tNh2EX0gi6vmIs5dth8uF+K6nxIyKJXbcA4ASg7F1OJrHKFZdTc5v1cPeq6PcbqGgc+8SrPYQmzvQqLoMBuxyos2hUkYOmw3aeWJj9nFa8Wu5WaN89mUeOqSkU4S5cgUzWUOmKey56B/j/s1sVys9rMhZapVs0wL4L9GBBM48N5jAQZnnpo85A8KsZq5ME22bTLqnxsDXqDYZvS7PSI6Dxi7eleOFE/NYYDkrgDLHTQri8ucDMVeVWHgoMY2bPXdn7KKy5jW5jKsf8EPARXg77A4gRYmgKrcwIKqJEUPqyxJBe0CPoGTqgXPRsUiQ== tomk@hp2",
});
const testDevice = new packet.Device("test", {
    billingCycle: "hourly",
    facility: "ewr1",
    hostname: "test",
    operatingSystem: "ubuntu_16_04",
    plan: "baremetal_0",
    projectId: testProject.id,
    projectSshKeyIds: [testProjectSshKey.id],
});

constructor

new ProjectSshKey(name: string, args: ProjectSshKeyArgs, opts?: pulumi.CustomResourceOptions)

Create a ProjectSshKey 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?: ProjectSshKeyState, opts?: pulumi.CustomResourceOptions): ProjectSshKey

Get an existing ProjectSshKey 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 projectId

public projectId: pulumi.Output<string>;

The ID of parent project

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 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 a user provisions first device in a facility, Packet API 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 these pre-allocated blocks. The IPv6 and private IPv4 blocks can’t be created, only imported. With this resource, it’s possible to create either public IPv4 blocks or global IPv4 blocks.

Public blocks are allocated in a facility. Addresses from public blocks can only be assigned to devices in the facility. Public blocks can have mask from /24 (256 addresses) to /32 (1 address). If you create public block with this resource, you must fill the facility argmument.

Addresses from global blocks can be assigned in any facility. Global blocks can have mask from /30 (4 addresses), to /32 (1 address). If you create global block with this resource, you must specify type = “global_ipv4” and you must omit the facility argument.

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 | undefined>;

Facility where to allocate the public IP address block, makes sense only for type==public_ipv4, must be empty for type==global_ipv4

property gateway

public gateway: pulumi.Output<string>;

property global

public global: pulumi.Output<boolean>;

boolean flag whether addresses from a block are global (i.e. can be assigned in any facility)

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 type

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

Either “global_ipv4” or “public_ipv4”, defaults to “public_ipv4” for backward compatibility

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

Example Usage

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

// Create a spot market request
const req = new packet.SpotMarketRequest("req", {
    devicesMax: 1,
    devicesMin: 1,
    facilities: ["ewr1"],
    instanceParameters: {
        billingCycle: "hourly",
        hostname: "testspot",
        operatingSystem: "coreos_stable",
        plan: "t1.small.x86",
    },
    maxBidPrice: 0.03,
    projectId: packet_project_cool_project.id,
});

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 SshKey

extends CustomResource

Provides a resource to manage User SSH keys on your Packet user account. If you create a new device in a project, all the keys of the project’s collaborators will be injected to the device.

The link between User SSH key and device is implicit. If you want to make sure that a key will be copied to a device, you must ensure that the device resource depends_on the key resource.

Example Usage

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

// Create a new SSH key
const key1 = new packet.SshKey("key1", {
    publicKey: fs.readFileSync("/home/terraform/.ssh/id_rsa.pub", "utf-8"),
});
// Create new device with "key1" included. The device resource "depends_on" the
// key, in order to make sure the key is created before the device.
const test = new packet.Device("test", {
    billingCycle: "hourly",
    facility: "sjc1",
    hostname: "test-device",
    operatingSystem: "ubuntu_16_04",
    plan: "t1.small.x86",
    projectId: packet_project_test.id,
}, {dependsOn: [key1]});

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 Vlan

extends CustomResource

Provides a resource to allow users to manage Virtual Networks in their projects. VLANs are used in Layer 2 networking setup.

Example Usage

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

const dev = new packet.Project("dev", {});
const vlan1 = new packet.Vlan("vlan1", {
    description: "VLAN in New Jersey",
    facility: "ewr1",
    projectId: dev.id,
});

constructor

new Vlan(name: string, args: VlanArgs, opts?: pulumi.CustomResourceOptions)

Create a Vlan 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?: VlanState, opts?: pulumi.CustomResourceOptions): Vlan

Get an existing Vlan 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 description

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

Description string

property facility

public facility: pulumi.Output<string>;

Facility where to create the VLAN

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 projectId

public projectId: pulumi.Output<string>;

ID of parent project

property urn

urn: Output<URN>;

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

property vxlan

public vxlan: pulumi.Output<number>;

VXLAN segment ID

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.

Example Usage

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

// Create a new block volume
const volume1 = new packet.Volume("volume1", {
    billingCycle: "hourly",
    description: "terraform-volume-1",
    facility: "ewr1",
    plan: "storage_1",
    projectId: packet_project_cool_project.id,
    size: 100,
    snapshotPolicies: [
        {
            snapshotCount: 7,
            snapshotFrequency: "1day",
        },
        {
            snapshotCount: 6,
            snapshotFrequency: "1month",
        },
    ],
});

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 testProject = new packet.Project("test_project", {});
const testDeviceVa = new packet.Device("test_device_va", {
    billingCycle: "hourly",
    facility: "ewr1",
    hostname: "terraform-test-device-va",
    operatingSystem: "ubuntu_16_04",
    plan: "t1.small.x86",
    projectId: testProject.id,
});
const testVolumeVa = new packet.Volume("test_volume_va", {
    billingCycle: "hourly",
    facility: "ewr1",
    plan: "storage_1",
    projectId: testProject.id,
    size: 100,
    snapshotPolicies: [{
        snapshotCount: 7,
        snapshotFrequency: "1day",
    }],
});
const testVolumeAttachment = new packet.VolumeAttachment("test_volume_attachment", {
    deviceId: testDeviceVa.id,
    volumeId: testVolumeVa.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.

Example Usage

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

const example = pulumi.output(packet.getOperatingSystem({
    distro: "coreos",
    name: "Container Linux",
    provisionableOn: "c1.small.x86",
    version: "alpha",
}));
const server = new packet.Device("server", {
    billingCycle: "hourly",
    facility: "ewr1",
    hostname: "tf.coreos2",
    operatingSystem: example.apply(example => example.id),
    plan: "c1.small.x86",
    projectId: packet_project_cool_project.id,
});

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.

Example Usage

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

// we have to make the datasource depend on the device. Here I do it implicitly
// with the project_id param, because an explicity "depends_on" attribute in
// a datasource taints the state:
// https://github.com/hashicorp/terraform/issues/11806
const testPrecreatedIpBlock = packet_device_test.projectId.apply(projectId => packet.getPrecreatedIpBlock({
    addressFamily: 6,
    facility: "ewr1",
    projectId: projectId,
    public: true,
}));
const testProject = new packet.Project("test", {});
const web1 = new packet.Device("web1", {
    billingCycle: "hourly",
    facility: "ewr1",
    hostname: "tftest",
    operatingSystem: "ubuntu_16_04",
    plan: "t1.small.x86",
    projectId: testProject.id,
});
const fromIpv6Block = new packet.IpAttachment("from_ipv6_block", {
    cidrNotation: testPrecreatedIpBlock.apply(testPrecreatedIpBlock => (() => {
        throw "tf2pulumi error: NYI: call to cidrsubnet";
        return (() => { throw "NYI: call to cidrsubnet"; })();
    })()),
    deviceId: web1.id,
});

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 example = pulumi.output(packet.getSpotMarketPrice({
    facility: "ewr1",
    plan: "c1.small.x86",
}));

function requireWithDefault

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

interface BgpSessionArgs

The set of arguments for constructing a BgpSession resource.

property addressFamily

addressFamily: pulumi.Input<string>;

ipv4 or ipv6

property deviceId

deviceId: pulumi.Input<string>;

ID of device

interface BgpSessionState

Input properties used for looking up and filtering BgpSession resources.

property addressFamily

addressFamily?: pulumi.Input<string>;

ipv4 or ipv6

property deviceId

deviceId?: pulumi.Input<string>;

ID of device

property status

status?: pulumi.Input<string>;

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 facilities

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

property facility

facility?: pulumi.Input<string>;

The facility in which to create the device.

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 projectSshKeyIds

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

Array of IDs of the project SSH keys which should be added to the device. If you omit this, SSH keys of all the members of the parent project will be added to the device. If you specify this array, only the listed project SSH keys will be added. Project SSH keys can be created with the [packet_project_ssh_key][packet_project_ssh_key.html] resource.

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 facilities

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

property facility

facility?: pulumi.Input<string>;

The facility in which to create the device.

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. 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:

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 projectSshKeyIds

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

Array of IDs of the project SSH keys which should be added to the device. If you omit this, SSH keys of all the members of the parent project will be added to the device. If you specify this array, only the listed project SSH keys will be added. Project SSH keys can be created with the [packet_project_ssh_key][packet_project_ssh_key.html] resource.

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 sshKeyIds

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

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

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;

Operating system slug (same as id)

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. (Optional) Only allowed for non-global blocks.

property global

global?: boolean;

Whether to look for global block. Default is false for backward compatibility.

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 global

global?: pulumi.Input<boolean>;

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 bgpConfig

bgpConfig?: pulumi.Input<{
    asn: pulumi.Input<number>;
    deploymentType: pulumi.Input<string>;
    maxPrefix: pulumi.Input<number>;
    md5: pulumi.Input<string>;
    status: pulumi.Input<string>;
}>;

Optional BGP settings. Refer to Packet guide for BGP.

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. The payment method and the project need to belong to the same organization (passed with organization_id, or default).

interface ProjectSshKeyArgs

The set of arguments for constructing a ProjectSshKey resource.

property name

name: pulumi.Input<string>;

The name of the SSH key for identification

property projectId

projectId: pulumi.Input<string>;

The ID of parent project

property publicKey

publicKey: pulumi.Input<string>;

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

interface ProjectSshKeyState

Input properties used for looking up and filtering ProjectSshKey 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 projectId

projectId?: pulumi.Input<string>;

The ID of parent project

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 ProjectState

Input properties used for looking up and filtering Project resources.

property bgpConfig

bgpConfig?: pulumi.Input<{
    asn: pulumi.Input<number>;
    deploymentType: pulumi.Input<string>;
    maxPrefix: pulumi.Input<number>;
    md5: pulumi.Input<string>;
    status: pulumi.Input<string>;
}>;

Optional BGP settings. Refer to Packet guide for BGP.

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. The payment method and the project need to belong to the same organization (passed with organization_id, or default).

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>;

Facility where to allocate the public IP address block, makes sense only for type==public_ipv4, must be empty for type==global_ipv4

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

property type

type?: pulumi.Input<string>;

Either “global_ipv4” or “public_ipv4”, defaults to “public_ipv4” for backward compatibility

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>;

Facility where to allocate the public IP address block, makes sense only for type==public_ipv4, must be empty for type==global_ipv4

property gateway

gateway?: pulumi.Input<string>;

property global

global?: pulumi.Input<boolean>;

boolean flag whether addresses from a block are global (i.e. can be assigned in any facility)

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

property type

type?: pulumi.Input<string>;

Either “global_ipv4” or “public_ipv4”, defaults to “public_ipv4” for backward compatibility

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 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 VlanArgs

The set of arguments for constructing a Vlan resource.

property description

description?: pulumi.Input<string>;

Description string

property facility

facility: pulumi.Input<string>;

Facility where to create the VLAN

property projectId

projectId: pulumi.Input<string>;

ID of parent project

interface VlanState

Input properties used for looking up and filtering Vlan resources.

property description

description?: pulumi.Input<string>;

Description string

property facility

facility?: pulumi.Input<string>;

Facility where to create the VLAN

property projectId

projectId?: pulumi.Input<string>;

ID of parent project

property vxlan

vxlan?: pulumi.Input<number>;

VXLAN segment ID

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