Namespace Pulumi.Packet
Classes
BgpSession
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.
BgpSessionArgs
BgpSessionState
Config
Device
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. Read more about sensitive data in state.
DeviceArgs
DeviceState
GetDevice
GetDeviceArgs
GetDeviceBgpNeighbors
GetDeviceBgpNeighborsArgs
GetDeviceBgpNeighborsResult
GetDeviceResult
GetIpBlockRanges
GetIpBlockRangesArgs
GetIpBlockRangesResult
GetOperatingSystem
GetOperatingSystemArgs
GetOperatingSystemResult
GetOrganization
GetOrganizationArgs
GetOrganizationResult
GetPrecreatedIpBlock
GetPrecreatedIpBlockArgs
GetPrecreatedIpBlockResult
GetProject
GetProjectArgs
GetProjectResult
GetSpotMarketPrice
GetSpotMarketPriceArgs
GetSpotMarketPriceResult
GetSpotMarketRequest
GetSpotMarketRequestArgs
GetSpotMarketRequestResult
GetVolume
GetVolumeArgs
GetVolumeResult
IpAttachment
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.
IpAttachmentArgs
IpAttachmentState
Organization
Provides a resource to manage organization resource in Packet.
Example Usage
using Pulumi;
using Packet = Pulumi.Packet;
class MyStack : Stack
{
public MyStack()
{
// Create a new Project
var tfOrganization1 = new Packet.Organization("tfOrganization1", new Packet.OrganizationArgs
{
Description = "quux",
Name = "foobar",
});
}
}
OrganizationArgs
OrganizationState
PortVlanAttachment
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/
Example Usage
using Pulumi;
using Packet = Pulumi.Packet;
class MyStack : Stack
{
public MyStack()
{
// Hybrid network type
var testVlan = new Packet.Vlan("testVlan", new Packet.VlanArgs
{
Description = "VLAN in New Jersey",
Facility = "ewr1",
ProjectId = local.Project_id,
});
var testDevice = new Packet.Device("testDevice", new Packet.DeviceArgs
{
Hostname = "test",
Plan = "m1.xlarge.x86",
Facilities =
{
"ewr1",
},
OperatingSystem = "ubuntu_16_04",
BillingCycle = "hourly",
ProjectId = local.Project_id,
NetworkType = "hybrid",
});
var testPortVlanAttachment = new Packet.PortVlanAttachment("testPortVlanAttachment", new Packet.PortVlanAttachmentArgs
{
DeviceId = testDevice.Id,
PortName = "eth1",
VlanVnid = testVlan.Vxlan,
});
// Layer 2 network
var testIndex_deviceDevice = new Packet.Device("testIndex/deviceDevice", new Packet.DeviceArgs
{
Hostname = "test",
Plan = "m1.xlarge.x86",
Facilities =
{
"ewr1",
},
OperatingSystem = "ubuntu_16_04",
BillingCycle = "hourly",
ProjectId = local.Project_id,
NetworkType = "layer2-individual",
});
var test1Vlan = new Packet.Vlan("test1Vlan", new Packet.VlanArgs
{
Description = "VLAN in New Jersey",
Facility = "ewr1",
ProjectId = local.Project_id,
});
var test2Vlan = new Packet.Vlan("test2Vlan", new Packet.VlanArgs
{
Description = "VLAN in New Jersey",
Facility = "ewr1",
ProjectId = local.Project_id,
});
var test1PortVlanAttachment = new Packet.PortVlanAttachment("test1PortVlanAttachment", new Packet.PortVlanAttachmentArgs
{
DeviceId = testDevice.Id,
VlanVnid = test1Vlan.Vxlan,
PortName = "eth1",
});
var test2PortVlanAttachment = new Packet.PortVlanAttachment("test2PortVlanAttachment", new Packet.PortVlanAttachmentArgs
{
DeviceId = testDevice.Id,
VlanVnid = test2Vlan.Vxlan,
PortName = "eth1",
Native = true,
});
}
}
Attribute Referece
id- UUID of device port used in the assignmentvlan_id- UUID of VLAN API resourceport_id- UUID of device port
PortVlanAttachmentArgs
PortVlanAttachmentState
Project
ProjectArgs
ProjectSshKey
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.
Example Usage
using Pulumi;
using Packet = Pulumi.Packet;
class MyStack : Stack
{
public MyStack()
{
var projectId = "<UUID_of_your_project>";
var testProjectSshKey = new Packet.ProjectSshKey("testProjectSshKey", new Packet.ProjectSshKeyArgs
{
Name = "test",
PublicKey = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDM/unxJeFqxsTJcu6mhqsMHSaVlpu+Jj/P+44zrm6X/MAoHSX3X9oLgujEjjZ74yLfdfe0bJrbL2YgJzNaEkIQQ1VPMHB5EhTKUBGnzlPP0hHTnxsjAm9qDHgUPgvgFDQSAMzdJRJ0Cexo16Ph9VxCoLh3dxiE7s2gaM2FdVg7P8aSxKypsxAhYV3D0AwqzoOyT6WWhBoQ0xZ85XevOTnJCpImSemEGs6nVGEsWcEc1d1YvdxFjAK4SdsKUMkj4Dsy/leKsdi/DEAf356vbMT1UHsXXvy5TlHu/Pa6qF53v32Enz+nhKy7/8W2Yt2yWx8HnQcT2rug9lvCXagJO6oauqRTO77C4QZn13ZLMZgLT66S/tNh2EX0gi6vmIs5dth8uF+K6nxIyKJXbcA4ASg7F1OJrHKFZdTc5v1cPeq6PcbqGgc+8SrPYQmzvQqLoMBuxyos2hUkYOmw3aeWJj9nFa8Wu5WaN89mUeOqSkU4S5cgUzWUOmKey56B/j/s1sVys9rMhZapVs0wL4L9GBBM48N5jAQZnnpo85A8KsZq5ME22bTLqnxsDXqDYZvS7PSI6Dxi7eleOFE/NYYDkrgDLHTQri8ucDMVeVWHgoMY2bPXdn7KKy5jW5jKsf8EPARXg77A4gRYmgKrcwIKqJEUPqyxJBe0CPoGTqgXPRsUiQ== tomk@hp2",
ProjectId = projectId,
});
var testDevice = new Packet.Device("testDevice", new Packet.DeviceArgs
{
Hostname = "test",
Plan = "baremetal_0",
Facilities =
{
"ewr1",
},
OperatingSystem = "ubuntu_16_04",
BillingCycle = "hourly",
ProjectSshKeyIds =
{
testProjectSshKey.Id,
},
ProjectId = projectId,
});
}
}
ProjectSshKeyArgs
ProjectSshKeyState
ProjectState
Provider
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.
ProviderArgs
ReservedIpBlock
Provides a resource to create and manage blocks of reserved IP addresses in a project.
When a user provisions first device in a facility, Packet API automatically allocates IPv6/56 and private IPv4/25 blocks. The new device then gets IPv6 and private IPv4 addresses from those block. It also gets a public IPv4/31 address. Every new device in the project and facility will automatically get IPv6 and private IPv4 addresses from these pre-allocated blocks. The IPv6 and private IPv4 blocks can't be created, only imported. With this resource, it's possible to create either public IPv4 blocks or global IPv4 blocks.
Public blocks are allocated in a facility. Addresses from public blocks can only be assigned to devices in the facility. Public blocks can have mask from /24 (256 addresses) to /32 (1 address). If you create public block with this resource, you must fill the facility argmument.
Addresses from global blocks can be assigned in any facility. Global blocks can have mask from /30 (4 addresses), to /32 (1 address). If you create global block with this resource, you must specify type = "global_ipv4" and you must omit the facility argument.
Once IP block is allocated or imported, an address from it can be assigned to device with the packet..IpAttachment resource.
ReservedIpBlockArgs
ReservedIpBlockState
SpotMarketRequest
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.
SpotMarketRequestArgs
SpotMarketRequestState
SshKey
SshKeyArgs
SshKeyState
Vlan
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/
Example Usage
using Pulumi;
using Packet = Pulumi.Packet;
class MyStack : Stack
{
public MyStack()
{
// Create a new VLAN in datacenter "ewr1"
var vlan1 = new Packet.Vlan("vlan1", new Packet.VlanArgs
{
Description = "VLAN in New Jersey",
Facility = "ewr1",
ProjectId = local.Project_id,
});
}
}