Skip to content

Resource: awsLightsailBucket

Provides a lightsail bucket.

Example Usage

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
new aws.lightsailBucket.LightsailBucket(this, "test", {
  bundleId: "small_1_0",
  name: "mytestbucket",
});

Argument Reference

The following arguments are supported:

  • name - (Required) The name for the bucket.
  • bundleId - (Required) - The ID of the bundle to use for the bucket. A bucket bundle specifies the monthly cost, storage space, and data transfer quota for a bucket. Use the get-bucket-bundles cli command to get a list of bundle IDs that you can specify.
  • tags - (Optional) A map of tags to assign to the resource. To create a key-only tag, use an empty string as the value. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

Attributes Reference

In addition to all arguments above, the following attributes are exported:

  • id - The name used for this bucket (matches name).
  • arn - The ARN of the lightsail bucket.
  • availabilityZone - The resource Availability Zone. Follows the format us-east-2a (case-sensitive).
  • createdAt - The timestamp when the bucket was created.
  • region - The Amazon Web Services Region name.
  • supportCode - The support code for the resource. Include this code in your email to support when you have questions about a resource in Lightsail. This code enables our support team to look up your Lightsail information more easily.
  • tagsAll - A map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.

Import

awsLightsailBucket can be imported by using the name attribute, e.g.,

$ terraform import aws_lightsail_bucket.test example-bucket