Pulumi Packet

class pulumi_packet.Device(__name__, __opts__=None, always_pxe=None, billing_cycle=None, description=None, facility=None, hardware_reservation_id=None, hostname=None, ipxe_script_url=None, operating_system=None, plan=None, project_id=None, public_ipv4_subnet_size=None, storage=None, tags=None, user_data=None)

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.

:param str name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[bool] always_pxe: If true, a device with OS custom_ipxe will

continue to boot via iPXE on reboots.
Parameters:
  • billing_cycle (pulumi.Input[str]) – monthly or hourly
  • description (pulumi.Input[str]) – Description string for the device
  • facility (pulumi.Input[str]) – 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.
  • hardware_reservation_id (pulumi.Input[str]) – The id of hardware reservation where you want this device deployed, or next-available if you want to pick your next available reservation automatically.
  • hostname (pulumi.Input[str]) – The device name
  • ipxe_script_url (pulumi.Input[str]) – URL pointing to a hosted iPXE script. More information is in the Custom iPXE doc.
  • operating_system (pulumi.Input[str]) – The operating system slug. To find the slug, or visit Operating Systems API docs, set your API auth token in the top of the page and see JSON from the API response.
  • plan (pulumi.Input[str]) – The device plan slug. To find the plan slug, visit Device plans API docs, set your auth token in the top of the page and see JSON from the API response.
  • project_id (pulumi.Input[str]) – The id of the project in which to create the device
  • public_ipv4_subnet_size (pulumi.Input[int]) – Size of allocated subnet, more information is in the Custom Subnet Size doc.
  • storage (pulumi.Input[str]) – JSON for custom partitioning. Only usable on reserved hardware. More information in in the Custom Partitioning and RAID doc.
  • tags (pulumi.Input[list]) – Tags attached to the device
  • user_data (pulumi.Input[str]) – A string of the desired User Data for the device.
access_private_ipv4 = None

The ipv4 private IP assigned to the device

access_public_ipv4 = None

The ipv4 maintenance IP assigned to the device

access_public_ipv6 = None

The ipv6 maintenance IP assigned to the device

always_pxe = None

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

billing_cycle = None

monthly or hourly

created = None

The timestamp for when the device was created

description = None

Description string for the device

facility = None

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.

hardware_reservation_id = None

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

hostname = None

The device name

ipxe_script_url = None

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

locked = None

Whether the device is locked

networks = None

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

operating_system = None

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

plan = None

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

project_id = None

The id of the project in which to create the device

public_ipv4_subnet_size = None

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

root_password = None

Root password to the server (disabled after 24 hours)

state = None

The status of the device

storage = None

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

tags = None

Tags attached to the device

updated = None

The timestamp for the last time the device was updated

user_data = None

A string of the desired User Data for the device.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
class pulumi_packet.GetOperatingSystemResult(slug=None, id=None)

A collection of values returned by getOperatingSystem.

id = None

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

class pulumi_packet.GetPrecreatedIpBlockResult(address=None, cidr=None, cidr_notation=None, gateway=None, manageable=None, management=None, netmask=None, network=None, quantity=None, id=None)

A collection of values returned by getPrecreatedIpBlock.

cidr_notation = None

CIDR notation of the looked up block.

id = None

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

class pulumi_packet.GetSpotMarketPriceResult(price=None, id=None)

A collection of values returned by getSpotMarketPrice.

price = None

Current spot market price for given plan in given facility.

id = None

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

class pulumi_packet.IpAttachment(__name__, __opts__=None, cidr_notation=None, device_id=None)

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.

:param str name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[str] cidr_notation: CIDR notation of subnet from block reserved in the same

project and facility as the device
Parameters:device_id (pulumi.Input[str]) – ID of device to which to assign the subnet
address_family = None

Address family as integer (4 or 6)

cidr = None

length of CIDR prefix of the subnet as integer

cidr_notation = None

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

device_id = None

ID of device to which to assign the subnet

gateway = None

IP address of gateway for the subnet

netmask = None

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

network = None

Subnet network address

public = None

boolean flag whether subnet is reachable from the Internet

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
class pulumi_packet.Organization(__name__, __opts__=None, description=None, logo=None, name=None, twitter=None, website=None)

Provides a resource to manage organization resource in Packet.

:param str name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[str] description: Description string. :param pulumi.Input[str] logo: Logo URL. :param pulumi.Input[str] name: The name of the Organization. :param pulumi.Input[str] twitter: Twitter handle. :param pulumi.Input[str] website: Website link.

description = None

Description string.

Logo URL.

name = None

The name of the Organization.

twitter = None

Twitter handle.

website = None

Website link.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
class pulumi_packet.Project(__name__, __opts__=None, name=None, organization_id=None, payment_method_id=None)

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

:param str name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[str] name: The name of the Project on Packet.net :param pulumi.Input[str] organization_id: 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. :param pulumi.Input[str] payment_method_id: The UUID of payment method for this project. If you keep it empty, Packet API will pick your default Payment Method.

created = None

The timestamp for when the Project was created

name = None

The name of the Project on Packet.net

organization_id = None

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.

payment_method_id = None

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

updated = None

The timestamp for the last time the Project was updated

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
class pulumi_packet.Provider(__name__, __opts__=None, auth_token=None)

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.

:param str name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[str] auth_token

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
class pulumi_packet.ReservedIpBlock(__name__, __opts__=None, facility=None, project_id=None, quantity=None)

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.

:param str name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[str] facility: The facility where to allocate the address block :param pulumi.Input[str] project_id: The packet project ID where to allocate the address block :param pulumi.Input[int] quantity: The number of allocated /32 addresses, a power of 2

address_family = None

Address family as integer (4 or 6)

cidr = None

length of CIDR prefix of the block as integer

cidr_notation = None

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

facility = None

The facility where to allocate the address block

netmask = None

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

network = None

Network IP address portion of the block specification

project_id = None

The packet project ID where to allocate the address block

public = None

boolean flag whether addresses from a block are public

quantity = None

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

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
class pulumi_packet.SSHKey(__name__, __opts__=None, name=None, public_key=None)

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.

:param str name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[str] name: The name of the SSH key for identification :param pulumi.Input[str] public_key: The public key. If this is a file, it

can be read using the file interpolation function
created = None

The timestamp for when the SSH key was created

fingerprint = None

The fingerprint of the SSH key

name = None

The name of the SSH key for identification

public_key = None

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

updated = None

The timestamp for the last time the SSH key was updated

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
class pulumi_packet.SpotMarketRequest(__name__, __opts__=None, devices_max=None, devices_min=None, facilities=None, instance_parameters=None, max_bid_price=None, project_id=None, wait_for_devices=None)

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

:param str name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[int] devices_max: Maximum number devices to be created :param pulumi.Input[int] devices_min: Miniumum number devices to be created :param pulumi.Input[list] facilities: Facility IDs where devices should be created :param pulumi.Input[dict] instance_parameters: Device parameters. See device resource for details :param pulumi.Input[float] max_bid_price: Maximum price user is willing to pay per hour per device :param pulumi.Input[str] project_id: Project ID :param pulumi.Input[bool] wait_for_devices: On resource creation - wait until all desired devices are active, on resource destruction - wait until devices are removed

devices_max = None

Maximum number devices to be created

devices_min = None

Miniumum number devices to be created

facilities = None

Facility IDs where devices should be created

instance_parameters = None

Device parameters. See device resource for details

max_bid_price = None

Maximum price user is willing to pay per hour per device

project_id = None

Project ID

wait_for_devices = None

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

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
class pulumi_packet.Volume(__name__, __opts__=None, billing_cycle=None, description=None, facility=None, locked=None, plan=None, project_id=None, size=None, snapshot_policies=None)

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.

:param str name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[str] billing_cycle: The billing cycle, defaults to “hourly” :param pulumi.Input[str] description: Optional description for the volume :param pulumi.Input[str] facility: The facility to create the volume in :param pulumi.Input[bool] locked: Lock or unlock the volume :param pulumi.Input[str] plan: The service plan slug of the volume :param pulumi.Input[str] project_id: The packet project ID to deploy the volume in :param pulumi.Input[int] size: The size in GB to make the volume :param pulumi.Input[list] snapshot_policies: Optional list of snapshot policies

attachments = None

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

billing_cycle = None

The billing cycle, defaults to “hourly”

created = None

The timestamp for when the volume was created

description = None

Optional description for the volume

facility = None

The facility to create the volume in

locked = None

Lock or unlock the volume

name = None

The name of the volume

plan = None

The service plan slug of the volume

project_id = None

The packet project ID to deploy the volume in

size = None

The size in GB to make the volume

snapshot_policies = None

Optional list of snapshot policies

state = None

The state of the volume

updated = None

The timestamp for the last time the volume was updated

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
class pulumi_packet.VolumeAttachment(__name__, __opts__=None, device_id=None, volume_id=None)

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.

:param str name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[str] device_id: The ID of the device to which the volume should be attached :param pulumi.Input[str] volume_id: The ID of the volume to attach

device_id = None

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

volume_id = None

The ID of the volume to attach

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
pulumi_packet.get_operating_system(distro=None, name=None, provisionable_on=None, version=None)

Use this data source to get Packet Operating System image.

pulumi_packet.get_precreated_ip_block(address_family=None, facility=None, project_id=None, public=None)

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.

pulumi_packet.get_spot_market_price(facility=None, plan=None)

Use this data source to get Packet Spot Market Price.