This page documents the language specification for the packet package. If you're looking for help working with the inputs, outputs, or functions of packet resources in a Pulumi program, please see the resource documentation for examples and API reference.
Pulumi Packet¶
This provider is a derived work of the Terraform Provider distributed under MPL 2.0. If you encounter a bug or missing feature, first check the pulumi/pulumi-packet repo; however, if that doesn’t turn up anything, please consult the source terraform-providers/terraform-provider-packet repo.
- class
pulumi_packet.AwaitableGetDeviceBgpNeighborsResult(bgp_neighbors=None, device_id=None, id=None)¶
- class
pulumi_packet.AwaitableGetDeviceResult(access_private_ipv4=None, access_public_ipv4=None, access_public_ipv6=None, always_pxe=None, billing_cycle=None, description=None, device_id=None, facility=None, hardware_reservation_id=None, hostname=None, id=None, ipxe_script_url=None, network_type=None, networks=None, operating_system=None, plan=None, ports=None, project_id=None, root_password=None, ssh_key_ids=None, state=None, storage=None, tags=None)¶
- class
pulumi_packet.AwaitableGetIpBlockRangesResult(facility=None, global_ipv4s=None, id=None, ipv6s=None, private_ipv4s=None, project_id=None, public_ipv4s=None)¶
- class
pulumi_packet.AwaitableGetOperatingSystemResult(distro=None, id=None, name=None, provisionable_on=None, slug=None, version=None)¶
- class
pulumi_packet.AwaitableGetOrganizationResult(description=None, id=None, logo=None, name=None, organization_id=None, project_ids=None, twitter=None, website=None)¶
- class
pulumi_packet.AwaitableGetPrecreatedIpBlockResult(address=None, address_family=None, cidr=None, cidr_notation=None, facility=None, gateway=None, global_=None, id=None, manageable=None, management=None, netmask=None, network=None, project_id=None, public=None, quantity=None)¶
- class
pulumi_packet.AwaitableGetProjectResult(backend_transfer=None, bgp_config=None, created=None, id=None, name=None, organization_id=None, payment_method_id=None, project_id=None, updated=None, user_ids=None)¶
- class
pulumi_packet.AwaitableGetSpotMarketPriceResult(facility=None, id=None, plan=None, price=None)¶
- class
pulumi_packet.AwaitableGetSpotMarketRequestResult(device_ids=None, id=None, request_id=None)¶
- class
pulumi_packet.AwaitableGetVolumeResult(billing_cycle=None, created=None, description=None, device_ids=None, facility=None, id=None, locked=None, name=None, plan=None, project_id=None, size=None, snapshot_policies=None, state=None, updated=None, volume_id=None)¶
- class
pulumi_packet.BgpSession(resource_name, opts=None, address_family=None, default_route=None, device_id=None, __props__=None, __name__=None, __opts__=None)¶ 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.
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
address_family (pulumi.Input[str]) –
ipv4oripv6default_route (pulumi.Input[bool]) – Boolean flag to set the default route policy. False by default.
device_id (pulumi.Input[str]) – ID of device
address_family: pulumi.Output[str] = None¶ipv4oripv6
default_route: pulumi.Output[bool] = None¶Boolean flag to set the default route policy. False by default.
device_id: pulumi.Output[str] = None¶ID of device
- static
get(resource_name, id, opts=None, address_family=None, default_route=None, device_id=None, status=None)¶ Get an existing BgpSession resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
address_family (pulumi.Input[str]) –
ipv4oripv6default_route (pulumi.Input[bool]) – Boolean flag to set the default route policy. False by default.
device_id (pulumi.Input[str]) – ID of 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.Device(resource_name, opts=None, always_pxe=None, billing_cycle=None, description=None, facilities=None, force_detach_volumes=None, hardware_reservation_id=None, hostname=None, ip_addresses=None, ipxe_script_url=None, network_type=None, operating_system=None, plan=None, project_id=None, project_ssh_key_ids=None, storage=None, tags=None, user_data=None, wait_for_reservation_deprovision=None, __props__=None, __name__=None, __opts__=None)¶ Provides a Packet device resource. This can be used to create, modify, and delete devices.
- Note: All arguments including the
root_passwordanduser_datawill be stored in the raw state as plain-text.
import pulumi import pulumi_packet as packet web1 = packet.Device("web1", hostname="tf.coreos2", plan="t1.small.x86", facilities=["ewr1"], operating_system="coreos_stable", billing_cycle="hourly", project_id=local["project_id"])
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
always_pxe (pulumi.Input[bool]) – If true, a device with OS
custom_ipxewill continue to boot via iPXE on reboots.billing_cycle (pulumi.Input[str]) – monthly or hourly
description (pulumi.Input[str]) – Description string for the device
facilities (pulumi.Input[list]) – List of facility codes with deployment preferences. Packet API will go through the list and will deploy your device to first facility with free capacity. List items must be facility codes or
any(a wildcard). To find the facility code, visit Facilities API docs, set your API auth token in the top of the page and see JSON from the API response.force_detach_volumes (pulumi.Input[bool]) – Delete device even if it has volumes attached. Only applies for destroy action.
hardware_reservation_id (pulumi.Input[str]) – The ID of hardware reservation which this device occupies
* `hostname`- The hostname of the device
- Parameters
hostname (pulumi.Input[str]) – The device name
ip_addresses (pulumi.Input[list]) – A list of IP address types for the device (structure is documented below).
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
storage (pulumi.Input[str]) – JSON for custom partitioning. Only usable on reserved hardware. More information in in the Custom Partitioning and RAID doc.
* Please note that the disks.partitions.size attribute must be a string, not an integer. It can be a number string, or size notation string, e.g. "4G" or "8M" (for gigabytes and megabytes).
- Parameters
tags (pulumi.Input[list]) – Tags attached to the device
user_data (pulumi.Input[str]) – A string of the desired User Data for the device.
wait_for_reservation_deprovision (pulumi.Input[bool]) – Only used for devices in reserved hardware. If set, the deletion of this device will block until the hardware reservation is marked provisionable (about 4 minutes in August 2019).
The ip_addresses object supports the following:
cidr(pulumi.Input[float]) - CIDR suffix for IP address block to be assigned, i.e. amount of addresses.reservationIds(pulumi.Input[list])type(pulumi.Input[str]) - One of [private_ipv4,public_ipv4,public_ipv6]
access_private_ipv4: pulumi.Output[str] = None¶The ipv4 private IP assigned to the device
access_public_ipv4: pulumi.Output[str] = None¶The ipv4 maintenance IP assigned to the device
access_public_ipv6: pulumi.Output[str] = None¶The ipv6 maintenance IP assigned to the device
always_pxe: pulumi.Output[bool] = None¶If true, a device with OS
custom_ipxewill continue to boot via iPXE on reboots.
billing_cycle: pulumi.Output[str] = None¶monthly or hourly
created: pulumi.Output[str] = None¶The timestamp for when the device was created
deployed_facility: pulumi.Output[str] = None¶The facility where the device is deployed.
description: pulumi.Output[str] = None¶Description string for the device
facilities: pulumi.Output[list] = None¶List of facility codes with deployment preferences. Packet API will go through the list and will deploy your device to first facility with free capacity. List items must be facility codes or
any(a wildcard). To find the facility code, visit Facilities API docs, set your API auth token in the top of the page and see JSON from the API response.
force_detach_volumes: pulumi.Output[bool] = None¶Delete device even if it has volumes attached. Only applies for destroy action.
hardware_reservation_id: pulumi.Output[str] = None¶The ID of hardware reservation which this device occupies
hostname- The hostname of the device
hostname: pulumi.Output[str] = None¶The device name
ip_addresses: pulumi.Output[list] = None¶A list of IP address types for the device (structure is documented below).
cidr(float) - CIDR suffix for IP address block to be assigned, i.e. amount of addresses.reservationIds(list)type(str) - One of [private_ipv4,public_ipv4,public_ipv6]
ipxe_script_url: pulumi.Output[str] = None¶URL pointing to a hosted iPXE script. More information is in the Custom iPXE doc.
locked: pulumi.Output[bool] = None¶Whether the device is locked
networks: pulumi.Output[list] = None¶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.0IPv6 at
packet_device.name.network.1Private IPv4 at
packet_device.name.network.2Elastic 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:address(str) - IPv4 or IPv6 address stringcidr(float) - CIDR suffix for IP address block to be assigned, i.e. amount of addresses.family(float) - IP version - “4” or “6”gateway(str) - address of routerpublic(bool) - whether the address is routable from the Internet
operating_system: pulumi.Output[str] = 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: pulumi.Output[str] = 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.
ports: pulumi.Output[list] = None¶Ports assigned to the device
bonded(bool) - Whether this port is part of a bond in bonded network setupproject_id- The ID of the project the device belongs to
id(str) - ID of the portmac(str) - MAC address assigned to the portname(str) - Name of the port (e.g.eth0, orbond0)type(str) - One of [private_ipv4,public_ipv4,public_ipv6]
project_id: pulumi.Output[str] = None¶The ID of the project in which to create the device
root_password: pulumi.Output[str] = None¶Root password to the server (disabled after 24 hours)
ssh_key_ids: pulumi.Output[list] = None¶List of IDs of SSH keys deployed in the device, can be both user and project SSH keys
state: pulumi.Output[str] = None¶The status of the device
storage: pulumi.Output[str] = None¶JSON for custom partitioning. Only usable on reserved hardware. More information in in the Custom Partitioning and RAID doc.
Please note that the disks.partitions.size attribute must be a string, not an integer. It can be a number string, or size notation string, e.g. “4G” or “8M” (for gigabytes and megabytes).
Tags attached to the device
updated: pulumi.Output[str] = None¶The timestamp for the last time the device was updated
user_data: pulumi.Output[str] = None¶A string of the desired User Data for the device.
wait_for_reservation_deprovision: pulumi.Output[bool] = None¶Only used for devices in reserved hardware. If set, the deletion of this device will block until the hardware reservation is marked provisionable (about 4 minutes in August 2019).
- static
get(resource_name, id, opts=None, access_private_ipv4=None, access_public_ipv4=None, access_public_ipv6=None, always_pxe=None, billing_cycle=None, created=None, deployed_facility=None, description=None, facilities=None, force_detach_volumes=None, hardware_reservation_id=None, hostname=None, ip_addresses=None, ipxe_script_url=None, locked=None, network_type=None, networks=None, operating_system=None, plan=None, ports=None, project_id=None, project_ssh_key_ids=None, root_password=None, ssh_key_ids=None, state=None, storage=None, tags=None, updated=None, user_data=None, wait_for_reservation_deprovision=None)¶ Get an existing Device resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
access_private_ipv4 (pulumi.Input[str]) – The ipv4 private IP assigned to the device
access_public_ipv4 (pulumi.Input[str]) – The ipv4 maintenance IP assigned to the device
access_public_ipv6 (pulumi.Input[str]) – The ipv6 maintenance IP assigned to the device
always_pxe (pulumi.Input[bool]) – If true, a device with OS
custom_ipxewill continue to boot via iPXE on reboots.billing_cycle (pulumi.Input[str]) – monthly or hourly
created (pulumi.Input[str]) – The timestamp for when the device was created
deployed_facility (pulumi.Input[str]) – The facility where the device is deployed.
description (pulumi.Input[str]) – Description string for the device
facilities (pulumi.Input[list]) –
List of facility codes with deployment preferences. Packet API will go through the list and will deploy your device to first facility with free capacity. List items must be facility codes or
any(a wildcard). To find the facility code, visit Facilities API docs, set your API auth token in the top of the page and see JSON from the API response.force_detach_volumes (pulumi.Input[bool]) – Delete device even if it has volumes attached. Only applies for destroy action.
hardware_reservation_id (pulumi.Input[str]) – The ID of hardware reservation which this device occupies
* `hostname`- The hostname of the device
- Parameters
hostname (pulumi.Input[str]) – The device name
ip_addresses (pulumi.Input[list]) – A list of IP address types for the device (structure is documented below).
ipxe_script_url (pulumi.Input[str]) –
URL pointing to a hosted iPXE script. More information is in the Custom iPXE doc.
locked (pulumi.Input[bool]) – Whether the device is locked
networks (pulumi.Input[list]) – 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:
- Parameters
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.
ports (pulumi.Input[list]) – Ports assigned to the device
project_id (pulumi.Input[str]) – The ID of the project in which to create the device
root_password (pulumi.Input[str]) – Root password to the server (disabled after 24 hours)
ssh_key_ids (pulumi.Input[list]) – List of IDs of SSH keys deployed in the device, can be both user and project SSH keys
state (pulumi.Input[str]) – The status of the device
storage (pulumi.Input[str]) –
JSON for custom partitioning. Only usable on reserved hardware. More information in in the Custom Partitioning and RAID doc.
* Please note that the disks.partitions.size attribute must be a string, not an integer. It can be a number string, or size notation string, e.g. "4G" or "8M" (for gigabytes and megabytes).
- Parameters
tags (pulumi.Input[list]) – Tags attached to the device
updated (pulumi.Input[str]) – The timestamp for the last time the device was updated
user_data (pulumi.Input[str]) – A string of the desired User Data for the device.
wait_for_reservation_deprovision (pulumi.Input[bool]) – Only used for devices in reserved hardware. If set, the deletion of this device will block until the hardware reservation is marked provisionable (about 4 minutes in August 2019).
The ip_addresses object supports the following:
cidr(pulumi.Input[float]) - CIDR suffix for IP address block to be assigned, i.e. amount of addresses.reservationIds(pulumi.Input[list])type(pulumi.Input[str]) - One of [private_ipv4,public_ipv4,public_ipv6]
The networks object supports the following:
address(pulumi.Input[str]) - IPv4 or IPv6 address stringcidr(pulumi.Input[float]) - CIDR suffix for IP address block to be assigned, i.e. amount of addresses.family(pulumi.Input[float]) - IP version - “4” or “6”gateway(pulumi.Input[str]) - address of routerpublic(pulumi.Input[bool]) - whether the address is routable from the Internet
The ports object supports the following:
bonded(pulumi.Input[bool]) - Whether this port is part of a bond in bonded network setupproject_id- The ID of the project the device belongs to
id(pulumi.Input[str]) - ID of the portmac(pulumi.Input[str]) - MAC address assigned to the portname(pulumi.Input[str]) - Name of the port (e.g.eth0, orbond0)type(pulumi.Input[str]) - One of [private_ipv4,public_ipv4,public_ipv6]
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
- Note: All arguments including the
- class
pulumi_packet.GetDeviceBgpNeighborsResult(bgp_neighbors=None, device_id=None, id=None)¶ A collection of values returned by getDeviceBgpNeighbors.
bgp_neighbors= None¶array of BGP neighbor records with attributes:
id= None¶The provider-assigned unique ID for this managed resource.
- class
pulumi_packet.GetDeviceResult(access_private_ipv4=None, access_public_ipv4=None, access_public_ipv6=None, always_pxe=None, billing_cycle=None, description=None, device_id=None, facility=None, hardware_reservation_id=None, hostname=None, id=None, ipxe_script_url=None, network_type=None, networks=None, operating_system=None, plan=None, ports=None, project_id=None, root_password=None, ssh_key_ids=None, state=None, storage=None, tags=None)¶ A collection of values returned by getDevice.
access_private_ipv4= None¶The ipv4 private IP assigned to the device
access_public_ipv4= None¶The ipv4 management IP assigned to the device
access_public_ipv6= None¶The ipv6 management IP assigned to the device
billing_cycle= None¶The billing cycle of the device (monthly or hourly)
description= None¶Description string for the device
facility= None¶The facility where the device is deployed.
hardware_reservation_id= None¶The id of hardware reservation which this device occupies
id= None¶The provider-assigned unique ID for this managed resource.
network_type= None¶L2 network type of the device, one of “layer3”, “layer2-bonded”, “layer2-individual”, “hybrid”
networks= None¶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.0IPv6 at
packet_device.name.network.1Private IPv4 at
packet_device.name.network.2Elastic addresses then stack by type - an assigned public IPv4 will go after the management public IPv4 (to index 1), and will then shift the indices of the IPv6 and private IPv4. Assigned private IPv4 will go after the management private IPv4 (to the end of the network list). The fields of the network attributes are:
operating_system= None¶The operating system running on the device
plan= None¶The hardware config of the device
ports= None¶Ports assigned to the device
root_password= None¶Root password to the server (if still available)
ssh_key_ids= None¶List of IDs of SSH keys deployed in the device, can be both user or project SSH keys
state= None¶The state of the device
Tags attached to the device
- class
pulumi_packet.GetIpBlockRangesResult(facility=None, global_ipv4s=None, id=None, ipv6s=None, private_ipv4s=None, project_id=None, public_ipv4s=None)¶ A collection of values returned by getIpBlockRanges.
global_ipv4s= None¶list of CIDR expressions for Global IPv4 blocks in the project
id= None¶The provider-assigned unique ID for this managed resource.
ipv6s= None¶list of CIDR expressions for IPv6 blocks in the project
private_ipv4s= None¶list of CIDR expressions for Private IPv4 blocks in the project
public_ipv4s= None¶list of CIDR expressions for Public IPv4 blocks in the project
- class
pulumi_packet.GetOperatingSystemResult(distro=None, id=None, name=None, provisionable_on=None, slug=None, version=None)¶ A collection of values returned by getOperatingSystem.
id= None¶The provider-assigned unique ID for this managed resource.
slug= None¶Operating system slug (same as
id)
- class
pulumi_packet.GetOrganizationResult(description=None, id=None, logo=None, name=None, organization_id=None, project_ids=None, twitter=None, website=None)¶ A collection of values returned by getOrganization.
description= None¶Description string
id= None¶The provider-assigned unique ID for this managed resource.
logo= None¶Logo URL
project_ids= None¶UUIDs of project resources which belong to this organization
twitter= None¶Twitter handle
website= None¶Website link
- class
pulumi_packet.GetPrecreatedIpBlockResult(address=None, address_family=None, cidr=None, cidr_notation=None, facility=None, gateway=None, global_=None, id=None, manageable=None, management=None, netmask=None, network=None, project_id=None, public=None, quantity=None)¶ A collection of values returned by getPrecreatedIpBlock.
cidr_notation= None¶CIDR notation of the looked up block.
id= None¶The provider-assigned unique ID for this managed resource.
- class
pulumi_packet.GetProjectResult(backend_transfer=None, bgp_config=None, created=None, id=None, name=None, organization_id=None, payment_method_id=None, project_id=None, updated=None, user_ids=None)¶ A collection of values returned by getProject.
backend_transfer= None¶Whether Backend Transfer is enabled for this project
bgp_config= None¶Optional BGP settings. Refer to Packet guide for BGP.
created= None¶The timestamp for when the project was created
id= None¶The provider-assigned unique ID for this managed resource.
organization_id= None¶The UUID of this project’s parent organization
payment_method_id= None¶The UUID of payment method for this project
updated= None¶The timestamp for the last time the project was updated
user_ids= None¶List of UUIDs of user accounts which beling to this project
- class
pulumi_packet.GetSpotMarketPriceResult(facility=None, id=None, plan=None, price=None)¶ A collection of values returned by getSpotMarketPrice.
id= None¶The provider-assigned unique ID for this managed resource.
price= None¶Current spot market price for given plan in given facility.
- class
pulumi_packet.GetSpotMarketRequestResult(device_ids=None, id=None, request_id=None)¶ A collection of values returned by getSpotMarketRequest.
device_ids= None¶List of IDs of devices spawned by the referenced Spot Market Request
id= None¶The provider-assigned unique ID for this managed resource.
- class
pulumi_packet.GetVolumeResult(billing_cycle=None, created=None, description=None, device_ids=None, facility=None, id=None, locked=None, name=None, plan=None, project_id=None, size=None, snapshot_policies=None, state=None, updated=None, volume_id=None)¶ A collection of values returned by getVolume.
billing_cycle= None¶The billing cycle, defaults to hourly
device_ids= None¶UUIDs of devices to which this volume is attached
facility= None¶The facility slug the volume resides in
id= None¶The provider-assigned unique ID for this managed resource.
locked= None¶Whether the volume is locked or not
name= None¶The name of the volume
project_id- The project id the volume is in
plan= None¶Performance plan the volume is on
size= None¶The size in GB of the volume
state= None¶The state of the volume
- class
pulumi_packet.IpAttachment(resource_name, opts=None, cidr_notation=None, device_id=None, __props__=None, __name__=None, __opts__=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.
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
cidr_notation (pulumi.Input[str]) – CIDR notation of subnet from block reserved in the same project and facility as the device
device_id (pulumi.Input[str]) – ID of device to which to assign the subnet
address_family: pulumi.Output[float] = None¶Address family as integer (4 or 6)
cidr: pulumi.Output[float] = None¶length of CIDR prefix of the subnet as integer
cidr_notation: pulumi.Output[str] = None¶CIDR notation of subnet from block reserved in the same project and facility as the device
device_id: pulumi.Output[str] = None¶ID of device to which to assign the subnet
gateway: pulumi.Output[str] = None¶IP address of gateway for the subnet
netmask: pulumi.Output[str] = None¶Subnet mask in decimal notation, e.g. “255.255.255.0”
network: pulumi.Output[str] = None¶Subnet network address
public: pulumi.Output[bool] = None¶boolean flag whether subnet is reachable from the Internet
- static
get(resource_name, id, opts=None, address=None, address_family=None, cidr=None, cidr_notation=None, device_id=None, gateway=None, global_=None, manageable=None, management=None, netmask=None, network=None, public=None)¶ Get an existing IpAttachment resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
address_family (pulumi.Input[float]) – Address family as integer (4 or 6)
cidr (pulumi.Input[float]) – length of CIDR prefix of the subnet as integer
cidr_notation (pulumi.Input[str]) – CIDR notation of subnet from block reserved in the same project and facility as the device
device_id (pulumi.Input[str]) – ID of device to which to assign the subnet
gateway (pulumi.Input[str]) – IP address of gateway for the subnet
netmask (pulumi.Input[str]) – Subnet mask in decimal notation, e.g. “255.255.255.0”
network (pulumi.Input[str]) – Subnet network address
public (pulumi.Input[bool]) – 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(resource_name, opts=None, description=None, logo=None, name=None, twitter=None, website=None, __props__=None, __name__=None, __opts__=None)¶ Provides a resource to manage organization resource in Packet.
import pulumi import pulumi_packet as packet # Create a new Project tf_organization1 = packet.Organization("tfOrganization1", description="quux", name="foobar")
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
description (pulumi.Input[str]) – Description string.
logo (pulumi.Input[str]) – Logo URL.
name (pulumi.Input[str]) – The name of the Organization.
twitter (pulumi.Input[str]) – Twitter handle.
website (pulumi.Input[str]) – Website link.
description: pulumi.Output[str] = None¶Description string.
logo: pulumi.Output[str] = None¶Logo URL.
name: pulumi.Output[str] = None¶The name of the Organization.
twitter: pulumi.Output[str] = None¶Twitter handle.
website: pulumi.Output[str] = None¶Website link.
- static
get(resource_name, id, opts=None, created=None, description=None, logo=None, name=None, twitter=None, updated=None, website=None)¶ Get an existing Organization resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
description (pulumi.Input[str]) – Description string.
logo (pulumi.Input[str]) – Logo URL.
name (pulumi.Input[str]) – The name of the Organization.
twitter (pulumi.Input[str]) – Twitter handle.
website (pulumi.Input[str]) – 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.PortVlanAttachment(resource_name, opts=None, device_id=None, force_bond=None, native=None, port_name=None, vlan_vnid=None, __props__=None, __name__=None, __opts__=None)¶ Provides a resource to attach device ports to VLANs.
Device and VLAN must be in the same facility.
If you need this resource to add the port back to bond on removal, set
force_bond = true.To learn more about Layer 2 networking in Packet, refer to
https://www.packet.com/resources/guides/layer-2-configurations/
https://www.packet.com/developers/docs/network/advanced/layer-2/
import pulumi import pulumi_packet as packet # Hybrid network type test_vlan = packet.Vlan("testVlan", description="VLAN in New Jersey", facility="ewr1", project_id=local["project_id"]) test_device = packet.Device("testDevice", hostname="test", plan="m1.xlarge.x86", facilities=["ewr1"], operating_system="ubuntu_16_04", billing_cycle="hourly", project_id=local["project_id"], network_type="hybrid") test_port_vlan_attachment = packet.PortVlanAttachment("testPortVlanAttachment", device_id=test_device.id, port_name="eth1", vlan_vnid=test_vlan.vxlan) # Layer 2 network test_index_device_device = packet.Device("testIndex/deviceDevice", hostname="test", plan="m1.xlarge.x86", facilities=["ewr1"], operating_system="ubuntu_16_04", billing_cycle="hourly", project_id=local["project_id"], network_type="layer2-individual") test1_vlan = packet.Vlan("test1Vlan", description="VLAN in New Jersey", facility="ewr1", project_id=local["project_id"]) test2_vlan = packet.Vlan("test2Vlan", description="VLAN in New Jersey", facility="ewr1", project_id=local["project_id"]) test1_port_vlan_attachment = packet.PortVlanAttachment("test1PortVlanAttachment", device_id=test_device.id, vlan_vnid=test1_vlan.vxlan, port_name="eth1") test2_port_vlan_attachment = packet.PortVlanAttachment("test2PortVlanAttachment", device_id=test_device.id, vlan_vnid=test2_vlan.vxlan, port_name="eth1", native=True)
id- UUID of device port used in the assignmentvlan_id- UUID of VLAN API resourceport_id- UUID of device port
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
device_id (pulumi.Input[str]) – ID of device to be assigned to the VLAN
force_bond (pulumi.Input[bool]) – Add port back to the bond when this resource is removed. Default is false.
native (pulumi.Input[bool]) – Mark this VLAN a native VLAN on the port. This can be used only if this assignment assigns second or further VLAN to the port. To ensure that this attachment is not first on a port, you can use
depends_onpointing to another packet_port_vlan_attachment, just like in the layer2-individual example above.port_name (pulumi.Input[str]) – Name of network port to be assigned to the VLAN
vlan_vnid (pulumi.Input[float]) – VXLAN Network Identifier, integer
device_id: pulumi.Output[str] = None¶ID of device to be assigned to the VLAN
force_bond: pulumi.Output[bool] = None¶Add port back to the bond when this resource is removed. Default is false.
native: pulumi.Output[bool] = None¶Mark this VLAN a native VLAN on the port. This can be used only if this assignment assigns second or further VLAN to the port. To ensure that this attachment is not first on a port, you can use
depends_onpointing to another packet_port_vlan_attachment, just like in the layer2-individual example above.
port_name: pulumi.Output[str] = None¶Name of network port to be assigned to the VLAN
vlan_vnid: pulumi.Output[float] = None¶VXLAN Network Identifier, integer
- static
get(resource_name, id, opts=None, device_id=None, force_bond=None, native=None, port_id=None, port_name=None, vlan_id=None, vlan_vnid=None)¶ Get an existing PortVlanAttachment resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
device_id (pulumi.Input[str]) – ID of device to be assigned to the VLAN
force_bond (pulumi.Input[bool]) – Add port back to the bond when this resource is removed. Default is false.
native (pulumi.Input[bool]) – Mark this VLAN a native VLAN on the port. This can be used only if this assignment assigns second or further VLAN to the port. To ensure that this attachment is not first on a port, you can use
depends_onpointing to another packet_port_vlan_attachment, just like in the layer2-individual example above.port_name (pulumi.Input[str]) – Name of network port to be assigned to the VLAN
vlan_vnid (pulumi.Input[float]) – VXLAN Network Identifier, integer
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(resource_name, opts=None, backend_transfer=None, bgp_config=None, name=None, organization_id=None, payment_method_id=None, __props__=None, __name__=None, __opts__=None)¶ Create a Project resource with the given unique name, props, and options. :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[bool] backend_transfer: Enable or disable Backend Transfer, default is false :param pulumi.Input[dict] bgp_config: Optional BGP settings. Refer to Packet guide for BGP. :param pulumi.Input[str] name: The name of the project :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. The payment method and the project need to belong to the same organization (passed with
organization_id, or default).The bgp_config object supports the following:
asn(pulumi.Input[float]) - Autonomous System Number for local BGP deploymentdeploymentType(pulumi.Input[str]) -privateorpublic, theprivateis likely to be usable immediately, thepublicwill need to be review by Packet engineersmaxPrefix(pulumi.Input[float]) - The maximum number of route filters allowed per servermd5(pulumi.Input[str]) - Password for BGP session in plaintext (not a checksum)status(pulumi.Input[str]) - status of BGP configuration in the project
backend_transfer: pulumi.Output[bool] = None¶Enable or disable Backend Transfer, default is false
bgp_config: pulumi.Output[dict] = None¶Optional BGP settings. Refer to Packet guide for BGP.
asn(float) - Autonomous System Number for local BGP deploymentdeploymentType(str) -privateorpublic, theprivateis likely to be usable immediately, thepublicwill need to be review by Packet engineersmaxPrefix(float) - The maximum number of route filters allowed per servermd5(str) - Password for BGP session in plaintext (not a checksum)status(str) - status of BGP configuration in the project
created: pulumi.Output[str] = None¶The timestamp for when the project was created
name: pulumi.Output[str] = None¶The name of the project
organization_id: pulumi.Output[str] = 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: pulumi.Output[str] = None¶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).
updated: pulumi.Output[str] = None¶The timestamp for the last time the project was updated
- static
get(resource_name, id, opts=None, backend_transfer=None, bgp_config=None, created=None, name=None, organization_id=None, payment_method_id=None, updated=None)¶ Get an existing Project resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
backend_transfer (pulumi.Input[bool]) –
Enable or disable Backend Transfer, default is false
bgp_config (pulumi.Input[dict]) –
Optional BGP settings. Refer to Packet guide for BGP.
created (pulumi.Input[str]) – The timestamp for when the project was created
name (pulumi.Input[str]) – The name of the project
organization_id (pulumi.Input[str]) – 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 (pulumi.Input[str]) – 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).updated (pulumi.Input[str]) – The timestamp for the last time the project was updated
The bgp_config object supports the following:
asn(pulumi.Input[float]) - Autonomous System Number for local BGP deploymentdeploymentType(pulumi.Input[str]) -privateorpublic, theprivateis likely to be usable immediately, thepublicwill need to be review by Packet engineersmaxPrefix(pulumi.Input[float]) - The maximum number of route filters allowed per servermd5(pulumi.Input[str]) - Password for BGP session in plaintext (not a checksum)status(pulumi.Input[str]) - status of BGP configuration in the project
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.ProjectSshKey(resource_name, opts=None, name=None, project_id=None, public_key=None, __props__=None, __name__=None, __opts__=None)¶ Provides a Packet project SSH key resource to manage project-specific SSH keys. Project SSH keys will only be populated onto servers that belong to that project, in contrast to User SSH Keys.
import pulumi import pulumi_packet as packet project_id = "<UUID_of_your_project>" test_project_ssh_key = packet.ProjectSshKey("testProjectSshKey", name="test", public_key="ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDM/unxJeFqxsTJcu6mhqsMHSaVlpu+Jj/P+44zrm6X/MAoHSX3X9oLgujEjjZ74yLfdfe0bJrbL2YgJzNaEkIQQ1VPMHB5EhTKUBGnzlPP0hHTnxsjAm9qDHgUPgvgFDQSAMzdJRJ0Cexo16Ph9VxCoLh3dxiE7s2gaM2FdVg7P8aSxKypsxAhYV3D0AwqzoOyT6WWhBoQ0xZ85XevOTnJCpImSemEGs6nVGEsWcEc1d1YvdxFjAK4SdsKUMkj4Dsy/leKsdi/DEAf356vbMT1UHsXXvy5TlHu/Pa6qF53v32Enz+nhKy7/8W2Yt2yWx8HnQcT2rug9lvCXagJO6oauqRTO77C4QZn13ZLMZgLT66S/tNh2EX0gi6vmIs5dth8uF+K6nxIyKJXbcA4ASg7F1OJrHKFZdTc5v1cPeq6PcbqGgc+8SrPYQmzvQqLoMBuxyos2hUkYOmw3aeWJj9nFa8Wu5WaN89mUeOqSkU4S5cgUzWUOmKey56B/j/s1sVys9rMhZapVs0wL4L9GBBM48N5jAQZnnpo85A8KsZq5ME22bTLqnxsDXqDYZvS7PSI6Dxi7eleOFE/NYYDkrgDLHTQri8ucDMVeVWHgoMY2bPXdn7KKy5jW5jKsf8EPARXg77A4gRYmgKrcwIKqJEUPqyxJBe0CPoGTqgXPRsUiQ== tomk@hp2", project_id=project_id) test_device = packet.Device("testDevice", hostname="test", plan="baremetal_0", facilities=["ewr1"], operating_system="ubuntu_16_04", billing_cycle="hourly", project_ssh_key_ids=[test_project_ssh_key.id], project_id=project_id)
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
name (pulumi.Input[str]) – The name of the SSH key for identification
project_id (pulumi.Input[str]) – The ID of parent project
public_key (pulumi.Input[str]) – The public key. If this is a file, it can be read using the file interpolation function
created: pulumi.Output[str] = None¶The timestamp for when the SSH key was created
fingerprint: pulumi.Output[str] = None¶The fingerprint of the SSH key
name: pulumi.Output[str] = None¶The name of the SSH key for identification
owner_id: pulumi.Output[str] = None¶The ID of parent project (same as project_id)
project_id: pulumi.Output[str] = None¶The ID of parent project
public_key: pulumi.Output[str] = None¶The public key. If this is a file, it can be read using the file interpolation function
updated: pulumi.Output[str] = None¶The timestamp for the last time the SSH key was updated
- static
get(resource_name, id, opts=None, created=None, fingerprint=None, name=None, owner_id=None, project_id=None, public_key=None, updated=None)¶ Get an existing ProjectSshKey resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
created (pulumi.Input[str]) – The timestamp for when the SSH key was created
fingerprint (pulumi.Input[str]) – The fingerprint of the SSH key
name (pulumi.Input[str]) – The name of the SSH key for identification
owner_id (pulumi.Input[str]) – The ID of parent project (same as project_id)
project_id (pulumi.Input[str]) – The ID of parent project
public_key (pulumi.Input[str]) – The public key. If this is a file, it can be read using the file interpolation function
updated (pulumi.Input[str]) – 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.Provider(resource_name, opts=None, auth_token=None, __props__=None, __name__=None, __opts__=None)¶ The provider type for the packet package. By default, resources use package-wide configuration settings, however an explicit
Providerinstance may be created and passed during resource construction to achieve fine-grained programmatic control over provider settings. See the documentation for more information.- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
auth_token (pulumi.Input[str]) – The API auth key for API operations.
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(resource_name, opts=None, description=None, facility=None, project_id=None, quantity=None, type=None, __props__=None, __name__=None, __opts__=None)¶ 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
.IpAttachmentresource.- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
description (pulumi.Input[str]) – Arbitrary description
facility (pulumi.Input[str]) – Facility where to allocate the public IP address block, makes sense only for type==public_ipv4, must be empty for type==global_ipv4
project_id (pulumi.Input[str]) – The packet project ID where to allocate the address block
quantity (pulumi.Input[float]) – The number of allocated /32 addresses, a power of 2
type (pulumi.Input[str]) – Either “global_ipv4” or “public_ipv4”, defaults to “public_ipv4” for backward compatibility
address_family: pulumi.Output[float] = None¶Address family as integer (4 or 6)
cidr: pulumi.Output[float] = None¶length of CIDR prefix of the block as integer
cidr_notation: pulumi.Output[str] = None¶Address and mask in CIDR notation, e.g. “147.229.15.30/31”
description: pulumi.Output[str] = None¶Arbitrary description
facility: pulumi.Output[str] = None¶Facility where to allocate the public IP address block, makes sense only for type==public_ipv4, must be empty for type==global_ipv4
global_: pulumi.Output[bool] = None¶boolean flag whether addresses from a block are global (i.e. can be assigned in any facility)
netmask: pulumi.Output[str] = None¶Mask in decimal notation, e.g. “255.255.255.0”
network: pulumi.Output[str] = None¶Network IP address portion of the block specification
project_id: pulumi.Output[str] = None¶The packet project ID where to allocate the address block
public: pulumi.Output[bool] = None¶boolean flag whether addresses from a block are public
quantity: pulumi.Output[float] = None¶The number of allocated /32 addresses, a power of 2
type: pulumi.Output[str] = None¶Either “global_ipv4” or “public_ipv4”, defaults to “public_ipv4” for backward compatibility
- static
get(resource_name, id, opts=None, address=None, address_family=None, cidr=None, cidr_notation=None, description=None, facility=None, gateway=None, global_=None, manageable=None, management=None, netmask=None, network=None, project_id=None, public=None, quantity=None, type=None)¶ Get an existing ReservedIpBlock resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
address_family (pulumi.Input[float]) – Address family as integer (4 or 6)
cidr (pulumi.Input[float]) – length of CIDR prefix of the block as integer
cidr_notation (pulumi.Input[str]) – Address and mask in CIDR notation, e.g. “147.229.15.30/31”
description (pulumi.Input[str]) – Arbitrary description
facility (pulumi.Input[str]) – Facility where to allocate the public IP address block, makes sense only for type==public_ipv4, must be empty for type==global*ipv4
:param pulumi.Input[bool] global*: boolean flag whether addresses from a block are global (i.e. can be assigned in any facility) :param pulumi.Input[str] netmask: Mask in decimal notation, e.g. “255.255.255.0” :param pulumi.Input[str] network: Network IP address portion of the block specification :param pulumi.Input[str] project_id: The packet project ID where to allocate the address block :param pulumi.Input[bool] public: boolean flag whether addresses from a block are public :param pulumi.Input[float] quantity: The number of allocated /32 addresses, a power of 2 :param pulumi.Input[str] type: Either “global_ipv4” or “public_ipv4”, defaults to “public_ipv4” for backward compatibility
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(resource_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, __props__=None, __name__=None, __opts__=None)¶ Provides a Packet Spot Market Request resource to allow you to manage spot market requests on your account. For more detail on Spot Market, see this article in Packet documentaion.
import pulumi import pulumi_packet as packet # Create a spot market request req = packet.SpotMarketRequest("req", project_id=local["project_id"], max_bid_price=0.03, facilities=["ewr1"], devices_min=1, devices_max=1, instance_parameters={ "hostname": "testspot", "billing_cycle": "hourly", "operating_system": "coreos_stable", "plan": "t1.small.x86", })
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
devices_max (pulumi.Input[float]) – Maximum number devices to be created
devices_min (pulumi.Input[float]) – Miniumum number devices to be created
facilities (pulumi.Input[list]) – Facility IDs where devices should be created
instance_parameters (pulumi.Input[dict]) – Device parameters. See device resource for details
max_bid_price (pulumi.Input[float]) – Maximum price user is willing to pay per hour per device
project_id (pulumi.Input[str]) – Project ID
wait_for_devices (pulumi.Input[bool]) – On resource creation - wait until all desired devices are active, on resource destruction - wait until devices are removed
The instance_parameters object supports the following:
always_pxe(pulumi.Input[str])billing_cycle(pulumi.Input[str])description(pulumi.Input[str])features(pulumi.Input[list])hostname(pulumi.Input[str])locked(pulumi.Input[str])operating_system(pulumi.Input[str])plan(pulumi.Input[str])projectSshKeys(pulumi.Input[list])termintationTime(pulumi.Input[str])userSshKeys(pulumi.Input[list])userdata(pulumi.Input[str])
devices_max: pulumi.Output[float] = None¶Maximum number devices to be created
devices_min: pulumi.Output[float] = None¶Miniumum number devices to be created
facilities: pulumi.Output[list] = None¶Facility IDs where devices should be created
instance_parameters: pulumi.Output[dict] = None¶Device parameters. See device resource for details
always_pxe(str)billing_cycle(str)description(str)features(list)hostname(str)locked(str)operating_system(str)plan(str)projectSshKeys(list)termintationTime(str)userSshKeys(list)userdata(str)
max_bid_price: pulumi.Output[float] = None¶Maximum price user is willing to pay per hour per device
project_id: pulumi.Output[str] = None¶Project ID
wait_for_devices: pulumi.Output[bool] = None¶On resource creation - wait until all desired devices are active, on resource destruction - wait until devices are removed
- static
get(resource_name, id, opts=None, devices_max=None, devices_min=None, facilities=None, instance_parameters=None, max_bid_price=None, project_id=None, wait_for_devices=None)¶ Get an existing SpotMarketRequest resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
devices_max (pulumi.Input[float]) – Maximum number devices to be created
devices_min (pulumi.Input[float]) – Miniumum number devices to be created
facilities (pulumi.Input[list]) – Facility IDs where devices should be created
instance_parameters (pulumi.Input[dict]) – Device parameters. See device resource for details
max_bid_price (pulumi.Input[float]) – Maximum price user is willing to pay per hour per device
project_id (pulumi.Input[str]) – Project ID
wait_for_devices (pulumi.Input[bool]) – On resource creation - wait until all desired devices are active, on resource destruction - wait until devices are removed
The instance_parameters object supports the following:
always_pxe(pulumi.Input[str])billing_cycle(pulumi.Input[str])description(pulumi.Input[str])features(pulumi.Input[list])hostname(pulumi.Input[str])locked(pulumi.Input[str])operating_system(pulumi.Input[str])plan(pulumi.Input[str])projectSshKeys(pulumi.Input[list])termintationTime(pulumi.Input[str])userSshKeys(pulumi.Input[list])userdata(pulumi.Input[str])
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(resource_name, opts=None, name=None, public_key=None, __props__=None, __name__=None, __opts__=None)¶ Create a SshKey resource with the given unique name, props, and options. :param str resource_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: pulumi.Output[str] = None¶The timestamp for when the SSH key was created
fingerprint: pulumi.Output[str] = None¶The fingerprint of the SSH key
name: pulumi.Output[str] = None¶The name of the SSH key for identification
owner_id: pulumi.Output[str] = None¶The UUID of the Packet API User who owns this key
public_key: pulumi.Output[str] = None¶The public key. If this is a file, it can be read using the file interpolation function
updated: pulumi.Output[str] = None¶The timestamp for the last time the SSH key was updated
- static
get(resource_name, id, opts=None, created=None, fingerprint=None, name=None, owner_id=None, public_key=None, updated=None)¶ Get an existing SshKey resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
created (pulumi.Input[str]) – The timestamp for when the SSH key was created
fingerprint (pulumi.Input[str]) – The fingerprint of the SSH key
name (pulumi.Input[str]) – The name of the SSH key for identification
owner_id (pulumi.Input[str]) – The UUID of the Packet API User who owns this key
public_key (pulumi.Input[str]) – The public key. If this is a file, it can be read using the file interpolation function
updated (pulumi.Input[str]) – 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.Vlan(resource_name, opts=None, description=None, facility=None, project_id=None, __props__=None, __name__=None, __opts__=None)¶ Provides a resource to allow users to manage Virtual Networks in their projects.
To learn more about Layer 2 networking in Packet, refer to
https://www.packet.com/resources/guides/layer-2-configurations/
https://www.packet.com/developers/docs/network/advanced/layer-2/
import pulumi import pulumi_packet as packet # Create a new VLAN in datacenter "ewr1" vlan1 = packet.Vlan("vlan1", description="VLAN in New Jersey", facility="ewr1", project_id=local["project_id"])
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
description (pulumi.Input[str]) – Description string
facility (pulumi.Input[str]) – Facility where to create the VLAN
project_id (pulumi.Input[str]) – ID of parent project
description: pulumi.Output[str] = None¶Description string
facility: pulumi.Output[str] = None¶Facility where to create the VLAN
project_id: pulumi.Output[str] = None¶ID of parent project
vxlan: pulumi.Output[float] = None¶VXLAN segment ID
- static
get(resource_name, id, opts=None, description=None, facility=None, project_id=None, vxlan=None)¶ Get an existing Vlan resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
description (pulumi.Input[str]) – Description string
facility (pulumi.Input[str]) – Facility where to create the VLAN
project_id (pulumi.Input[str]) – ID of parent project
vxlan (pulumi.Input[float]) – VXLAN segment ID
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(resource_name, opts=None, billing_cycle=None, description=None, facility=None, locked=None, plan=None, project_id=None, size=None, snapshot_policies=None, __props__=None, __name__=None, __opts__=None)¶ Create a Volume resource with the given unique name, props, and options. :param str resource_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[float] size: The size in GB to make the volume :param pulumi.Input[list] snapshot_policies: Optional list of snapshot policies
The snapshot_policies object supports the following:
snapshotCount(pulumi.Input[float])snapshotFrequency(pulumi.Input[str])
attachments: pulumi.Output[list] = None¶A list of attachments, each with it’s own
hrefattributehref(str)
billing_cycle: pulumi.Output[str] = None¶The billing cycle, defaults to “hourly”
created: pulumi.Output[str] = None¶The timestamp for when the volume was created
description: pulumi.Output[str] = None¶Optional description for the volume
facility: pulumi.Output[str] = None¶The facility to create the volume in
locked: pulumi.Output[bool] = None¶Lock or unlock the volume
name: pulumi.Output[str] = None¶The name of the volume
plan: pulumi.Output[str] = None¶The service plan slug of the volume
project_id: pulumi.Output[str] = None¶The packet project ID to deploy the volume in
size: pulumi.Output[float] = None¶The size in GB to make the volume
snapshot_policies: pulumi.Output[list] = None¶Optional list of snapshot policies
snapshotCount(float)snapshotFrequency(str)
state: pulumi.Output[str] = None¶The state of the volume
updated: pulumi.Output[str] = None¶The timestamp for the last time the volume was updated
- static
get(resource_name, id, opts=None, attachments=None, billing_cycle=None, created=None, description=None, facility=None, locked=None, name=None, plan=None, project_id=None, size=None, snapshot_policies=None, state=None, updated=None)¶ Get an existing Volume resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
attachments (pulumi.Input[list]) – A list of attachments, each with it’s own
hrefattributebilling_cycle (pulumi.Input[str]) – The billing cycle, defaults to “hourly”
created (pulumi.Input[str]) – The timestamp for when the volume was created
description (pulumi.Input[str]) – Optional description for the volume
facility (pulumi.Input[str]) – The facility to create the volume in
locked (pulumi.Input[bool]) – Lock or unlock the volume
name (pulumi.Input[str]) – The name of the volume
plan (pulumi.Input[str]) – The service plan slug of the volume
project_id (pulumi.Input[str]) – The packet project ID to deploy the volume in
size (pulumi.Input[float]) – The size in GB to make the volume
snapshot_policies (pulumi.Input[list]) – Optional list of snapshot policies
state (pulumi.Input[str]) – The state of the volume
updated (pulumi.Input[str]) – The timestamp for the last time the volume was updated
The attachments object supports the following:
href(pulumi.Input[str])
The snapshot_policies object supports the following:
snapshotCount(pulumi.Input[float])snapshotFrequency(pulumi.Input[str])
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(resource_name, opts=None, device_id=None, volume_id=None, __props__=None, __name__=None, __opts__=None)¶ Create a VolumeAttachment resource with the given unique name, props, and options. :param str resource_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: pulumi.Output[str] = None¶The ID of the device to which the volume should be attached
volume_id: pulumi.Output[str] = None¶The ID of the volume to attach
- static
get(resource_name, id, opts=None, device_id=None, volume_id=None)¶ Get an existing VolumeAttachment resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
device_id (pulumi.Input[str]) – The ID of the device to which the volume should be attached
volume_id (pulumi.Input[str]) – 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_device(device_id=None, hostname=None, project_id=None, opts=None)¶Provides a Packet device datasource.
- Note: All arguments including the
root_passwordanduser_datawill be stored in the raw state as plain-text.
- Parameters
device_id (str) – Device ID
hostname (str) – The device name
project_id (str) – The id of the project in which the devices exists
- Note: All arguments including the
pulumi_packet.get_device_bgp_neighbors(device_id=None, opts=None)¶Use this datasource to retrieve list of BGP neighbors of a device in the Packet host.
To have any BGP neighbors listed, the device must be in BGP-enabled project and have a BGP session assigned.
To learn more about using BGP in Packet, see the .BgpSession resource documentation.
import pulumi import pulumi_packet as packet test = packet.get_device_bgp_neighbors(device_id="4c641195-25e5-4c3c-b2b7-4cd7a42c7b40") pulumi.export("bgpNeighborsListing", test.bgp_neighbors)
- Parameters
device_id (str) – UUID of BGP-enabled device whose neighbors to list
pulumi_packet.get_ip_block_ranges(facility=None, project_id=None, opts=None)¶Use this datasource to get CIDR expressions for allocated IP blocks of all the types in a project, optionally filtered by facility.
There are four types of IP blocks in Packet: global IPv4, public IPv4, private IPv4 and IPv6. Both global and public IPv4 are routable from the Internet. Public IPv4 block is allocated in a facility, and addresses from it can only be assigned to devices in that facility. Addresses from Global IPv4 block can be assigned to a device in any facility.
The datasource has 4 list attributes:
global_ipv4,public_ipv4,private_ipv4andipv6, each listing CIDR notation (<network>/<mask>) of respective blocks from the project.import pulumi import pulumi_packet as packet project_id = "<UUID_of_your_project>" test = packet.get_ip_block_ranges(project_id=project_id) pulumi.export("out", test)
- Parameters
facility (str) – Facility code filtering the IP blocks. Global IPv4 blcoks will be listed anyway. If you omit this, all the block from the project will be listed.
project_id (str) – ID of the project from which to list the blocks.
pulumi_packet.get_operating_system(distro=None, name=None, provisionable_on=None, version=None, opts=None)¶Use this data source to get Packet Operating System image.
import pulumi import pulumi_packet as packet example = packet.get_operating_system(name="Container Linux", distro="coreos", version="alpha", provisionable_on="c1.small.x86") server = packet.Device("server", hostname="tf.coreos2", plan="c1.small.x86", facilities=["ewr1"], operating_system=example.id, billing_cycle="hourly", project_id=local["project_id"])
- Parameters
distro (str) – Name of the OS distribution.
name (str) – Name or part of the name of the distribution. Case insensitive.
provisionable_on (str) – Plan name.
version (str) – Version of the distribution
pulumi_packet.get_organization(name=None, organization_id=None, opts=None)¶Provides a Packet organization datasource.
- Parameters
name (str) – The organization name
organization_id (str) – The UUID of the organization resource
pulumi_packet.get_precreated_ip_block(address_family=None, facility=None, global_=None, project_id=None, public=None, opts=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.
- Parameters
address*family (float) –
4 or 6, depending on which block you are looking for.
facility (str) – Facility of the searched block. (Optional) Only allowed for non-global blocks.
:param bool global*: Whether to look for global block. Default is false for backward compatibility. :param str project_id: ID of the project where the searched block should be. :param bool public: Whether to look for public or private block.
pulumi_packet.get_project(name=None, project_id=None, opts=None)¶Use this data source to access information about an existing resource.
- Parameters
name (str) – The name which is used to look up the project
project_id (str) – The UUID by which to look up the project
pulumi_packet.get_spot_market_price(facility=None, plan=None, opts=None)¶Use this data source to get Packet Spot Market Price.
import pulumi import pulumi_packet as packet example = packet.get_spot_market_price(facility="ewr1", plan="c1.small.x86")
- Parameters
facility (str) – Name of the facility.
plan (str) – Name of the plan.
pulumi_packet.get_spot_market_request(request_id=None, opts=None)¶Provides a Packet spot_market_request datasource. The datasource will contain list of device IDs created by referenced Spot Market Request.
- Parameters
request_id (str) – The id of the Spot Market Request
pulumi_packet.get_volume(name=None, project_id=None, volume_id=None, opts=None)¶Use this data source to access information about an existing resource.
- Parameters
name (str) – Name of volume for lookup
project_id (str) – The ID the parent Packet project (for lookup by name)
volume_id (str) – ID of volume for lookup