Packet v3.2.2 published on Thursday, Nov 12, 2020 by Pulumi
packet.getDevice
Explore with Pulumi AI
Provides a Packet device datasource.
Note: All arguments including the
root_password
anduser_data
will be stored in the raw state as plain-text. Read more about sensitive data in state.
Using getDevice
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getDevice(args: GetDeviceArgs, opts?: InvokeOptions): Promise<GetDeviceResult>
function getDeviceOutput(args: GetDeviceOutputArgs, opts?: InvokeOptions): Output<GetDeviceResult>
def get_device(device_id: Optional[str] = None,
hostname: Optional[str] = None,
project_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetDeviceResult
def get_device_output(device_id: Optional[pulumi.Input[str]] = None,
hostname: Optional[pulumi.Input[str]] = None,
project_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetDeviceResult]
func LookupDevice(ctx *Context, args *LookupDeviceArgs, opts ...InvokeOption) (*LookupDeviceResult, error)
func LookupDeviceOutput(ctx *Context, args *LookupDeviceOutputArgs, opts ...InvokeOption) LookupDeviceResultOutput
> Note: This function is named LookupDevice
in the Go SDK.
public static class GetDevice
{
public static Task<GetDeviceResult> InvokeAsync(GetDeviceArgs args, InvokeOptions? opts = null)
public static Output<GetDeviceResult> Invoke(GetDeviceInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetDeviceResult> getDevice(GetDeviceArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: packet:index/getDevice:getDevice
arguments:
# arguments dictionary
The following arguments are supported:
- device_
id str - Device ID
- hostname str
- The device name
- project_
id str - The id of the project in which the devices exists
getDevice Result
The following output properties are available:
- Access
Private stringIpv4 - The ipv4 private IP assigned to the device
- Access
Public stringIpv4 - The ipv4 management IP assigned to the device
- Access
Public stringIpv6 - The ipv6 management IP assigned to the device
- Always
Pxe bool - Billing
Cycle string - The billing cycle of the device (monthly or hourly)
- Description string
- Description string for the device
- Device
Id string - Facility string
- The facility where the device is deployed.
- Hardware
Reservation stringId - The id of hardware reservation which this device occupies
- Hostname string
- Id string
- The provider-assigned unique ID for this managed resource.
- Ipxe
Script stringUrl - Network
Type string - L2 network type of the device, one of "layer3", "layer2-bonded", "layer2-individual", "hybrid"
- Networks
List<Get
Device Network> - 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:
- Public IPv4 at
- Operating
System string - The operating system running on the device
- Plan string
- The hardware config of the device
- Ports
List<Get
Device Port> - Ports assigned to the device
- Project
Id string - Root
Password string - Root password to the server (if still available)
- Ssh
Key List<string>Ids - List of IDs of SSH keys deployed in the device, can be both user or project SSH keys
- State string
- The state of the device
- Storage string
- List<string>
- Tags attached to the device
- Access
Private stringIpv4 - The ipv4 private IP assigned to the device
- Access
Public stringIpv4 - The ipv4 management IP assigned to the device
- Access
Public stringIpv6 - The ipv6 management IP assigned to the device
- Always
Pxe bool - Billing
Cycle string - The billing cycle of the device (monthly or hourly)
- Description string
- Description string for the device
- Device
Id string - Facility string
- The facility where the device is deployed.
- Hardware
Reservation stringId - The id of hardware reservation which this device occupies
- Hostname string
- Id string
- The provider-assigned unique ID for this managed resource.
- Ipxe
Script stringUrl - Network
Type string - L2 network type of the device, one of "layer3", "layer2-bonded", "layer2-individual", "hybrid"
- Networks
[]Get
Device Network - 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:
- Public IPv4 at
- Operating
System string - The operating system running on the device
- Plan string
- The hardware config of the device
- Ports
[]Get
Device Port - Ports assigned to the device
- Project
Id string - Root
Password string - Root password to the server (if still available)
- Ssh
Key []stringIds - List of IDs of SSH keys deployed in the device, can be both user or project SSH keys
- State string
- The state of the device
- Storage string
- []string
- Tags attached to the device
- access
Private StringIpv4 - The ipv4 private IP assigned to the device
- access
Public StringIpv4 - The ipv4 management IP assigned to the device
- access
Public StringIpv6 - The ipv6 management IP assigned to the device
- always
Pxe Boolean - billing
Cycle String - The billing cycle of the device (monthly or hourly)
- description String
- Description string for the device
- device
Id String - facility String
- The facility where the device is deployed.
- hardware
Reservation StringId - The id of hardware reservation which this device occupies
- hostname String
- id String
- The provider-assigned unique ID for this managed resource.
- ipxe
Script StringUrl - network
Type String - L2 network type of the device, one of "layer3", "layer2-bonded", "layer2-individual", "hybrid"
- networks
List<Get
Device Network> - 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:
- Public IPv4 at
- operating
System String - The operating system running on the device
- plan String
- The hardware config of the device
- ports
List<Get
Device Port> - Ports assigned to the device
- project
Id String - root
Password String - Root password to the server (if still available)
- ssh
Key List<String>Ids - List of IDs of SSH keys deployed in the device, can be both user or project SSH keys
- state String
- The state of the device
- storage String
- List<String>
- Tags attached to the device
- access
Private stringIpv4 - The ipv4 private IP assigned to the device
- access
Public stringIpv4 - The ipv4 management IP assigned to the device
- access
Public stringIpv6 - The ipv6 management IP assigned to the device
- always
Pxe boolean - billing
Cycle string - The billing cycle of the device (monthly or hourly)
- description string
- Description string for the device
- device
Id string - facility string
- The facility where the device is deployed.
- hardware
Reservation stringId - The id of hardware reservation which this device occupies
- hostname string
- id string
- The provider-assigned unique ID for this managed resource.
- ipxe
Script stringUrl - network
Type string - L2 network type of the device, one of "layer3", "layer2-bonded", "layer2-individual", "hybrid"
- networks
Get
Device Network[] - 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:
- Public IPv4 at
- operating
System string - The operating system running on the device
- plan string
- The hardware config of the device
- ports
Get
Device Port[] - Ports assigned to the device
- project
Id string - root
Password string - Root password to the server (if still available)
- ssh
Key string[]Ids - List of IDs of SSH keys deployed in the device, can be both user or project SSH keys
- state string
- The state of the device
- storage string
- string[]
- Tags attached to the device
- access_
private_ stripv4 - The ipv4 private IP assigned to the device
- access_
public_ stripv4 - The ipv4 management IP assigned to the device
- access_
public_ stripv6 - The ipv6 management IP assigned to the device
- always_
pxe bool - billing_
cycle str - The billing cycle of the device (monthly or hourly)
- description str
- Description string for the device
- device_
id str - facility str
- The facility where the device is deployed.
- hardware_
reservation_ strid - The id of hardware reservation which this device occupies
- hostname str
- id str
- The provider-assigned unique ID for this managed resource.
- ipxe_
script_ strurl - network_
type str - L2 network type of the device, one of "layer3", "layer2-bonded", "layer2-individual", "hybrid"
- networks
Sequence[Get
Device Network] - 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:
- Public IPv4 at
- operating_
system str - The operating system running on the device
- plan str
- The hardware config of the device
- ports
Sequence[Get
Device Port] - Ports assigned to the device
- project_
id str - root_
password str - Root password to the server (if still available)
- ssh_
key_ Sequence[str]ids - List of IDs of SSH keys deployed in the device, can be both user or project SSH keys
- state str
- The state of the device
- storage str
- Sequence[str]
- Tags attached to the device
- access
Private StringIpv4 - The ipv4 private IP assigned to the device
- access
Public StringIpv4 - The ipv4 management IP assigned to the device
- access
Public StringIpv6 - The ipv6 management IP assigned to the device
- always
Pxe Boolean - billing
Cycle String - The billing cycle of the device (monthly or hourly)
- description String
- Description string for the device
- device
Id String - facility String
- The facility where the device is deployed.
- hardware
Reservation StringId - The id of hardware reservation which this device occupies
- hostname String
- id String
- The provider-assigned unique ID for this managed resource.
- ipxe
Script StringUrl - network
Type String - L2 network type of the device, one of "layer3", "layer2-bonded", "layer2-individual", "hybrid"
- networks List<Property Map>
- 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:
- Public IPv4 at
- operating
System String - The operating system running on the device
- plan String
- The hardware config of the device
- ports List<Property Map>
- Ports assigned to the device
- project
Id String - root
Password String - Root password to the server (if still available)
- ssh
Key List<String>Ids - List of IDs of SSH keys deployed in the device, can be both user or project SSH keys
- state String
- The state of the device
- storage String
- List<String>
- Tags attached to the device
Supporting Types
GetDeviceNetwork
GetDevicePort
Package Details
- Repository
- Packet pulumi/pulumi-packet
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
packet
Terraform Provider.