1.8 KiB
1.8 KiB
layout | page_title | sidebar_current | description |
---|---|---|---|
packet | Packet: packet_device | docs-packet-resource-device | Provides a Packet device resource. This can be used to create, modify, and delete devices. |
packet_device
Provides a Packet device resource. This can be used to create, modify, and delete devices.
Example Usage
# Create a device and add it to tf_project_1
resource "packet_device" "web1" {
hostname = "tf.coreos2"
plan = "baremetal_1"
facility = "ewr1"
operating_system = "coreos_stable"
billing_cycle = "hourly"
project_id = "${packet_project.tf_project_1.id}"
}
Argument Reference
The following arguments are supported:
hostname
- (Required) The device nameproject_id
- (Required) The id of the project in which to create the deviceoperating_system
- (Required) The operating system slugfacility
- (Required) The facility in which to create the deviceplan
- (Required) The config type slugbilling_cycle
- (Required) monthly or hourlyuser_data
(Optional) - A string of the desired User Data for the device.
Attributes Reference
The following attributes are exported:
id
- The ID of the devicehostname
- The hostname of the deviceproject_id
- The Id of the project the device belonds tofacility
- The facility the device is inplan
- The config type of the devicenetwork
- The private and public v4 and v6 IPs assigned to the devicelocked
- Is the device lockedbilling_cycle
- The billing cycle of the device (monthly or hourly)operating_system
- The operating system running on the devicestatus
- The status of the devicecreated
- The timestamp for when the device was createdupdated
- The timestamp for the last time the device was udpated