Resource: aws_lightsail_disk

Provides a Lightsail Disk resource.

Example Usage

data "aws_availability_zones" "available" {
  state = "available"

  filter {
    name   = "opt-in-status"
    values = ["opt-in-not-required"]
  }
}

resource "aws_lightsail_disk" "test" {
  name              = "test"
  size_in_gb        = 8
  availability_zone = data.aws_availability_zones.available.names[0]
}

Argument Reference

This resource supports the following arguments:

Attribute Reference

This resource exports the following attributes in addition to the arguments above:

Import

In Terraform v1.5.0 and later, use an import block to import aws_lightsail_disk using the name attribute. For example:

import {
  to = aws_lightsail_disk.test
  id = "test"
}

Using terraform import, import aws_lightsail_disk using the name attribute. For example:

% terraform import aws_lightsail_disk.test test