2.0 KiB
2.0 KiB
layout | page_title | sidebar_current | description |
---|---|---|---|
packet | Packet: packet_volume | docs-packet-resource-volume | Provides a Packet Block Storage Volume Resource. |
packet_volume
Provides a Packet Block Storage Volume resource to allow you to
manage block volumes on your account.
Once created by Terraform, they must then be attached and mounted
using the api and packet_block_attach
and packet_block_detach
scripts.
Example Usage
# Create a new block volume
resource "packet_volume" "volume1" {
description = "terraform-volume-1"
facility = "ewr1"
project_id = "${packet_project.cool_project.id}"
plan = 'storage_1'
size = 100
billing_cycle = "hourly"
snapshot_policies = { snapshot_frequency = "1day", snapshot_count = 7 }
snapshot_policies = { snapshot_frequency = "1month", snapshot_count = 6 }
}
Argument Reference
The following arguments are supported:
plan
- (Required) The service plan slug of the volumefacility
- (Required) The facility to create the volume inproject_id
- (Required) The packet project ID to deploy the volume insize
- (Required) The size in GB to make the volumebilling_cycle
- The billing cycle, defaults to "hourly"description
- Optional description for the volumesnapshot_policies
- Optional list of snapshot policies
Attributes Reference
The following attributes are exported:
id
- The unique ID of the volumename
- The name of the volumedescription
- The description of the volumesize
- The size in GB of the volumeplan
- Performance plan the volume is onbilling_cycle
- The billing cycle, defaults to hourlyfacility
- The facility slug the volume resides instate
- The state of the volumelocked
- Whether the volume is locked or notproject_id
- The project id the volume is increated
- The timestamp for when the volume was createdupdated
- The timestamp for the last time the volume was updated