Skip to content

Resource: awsLightsailBucketResourceAccess

Provides a lightsail resource access to a 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",
});
const awsLightsailInstanceTest = new aws.lightsailInstance.LightsailInstance(
  this,
  "test_1",
  {
    availabilityZone: "us-east-1b",
    blueprintId: "amazon_linux_2",
    bundleId: "nano_1_0",
    name: "mytestinstance",
  }
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
awsLightsailInstanceTest.overrideLogicalId("test");

Argument Reference

The following arguments are supported:

  • bucketName - (Required) The name of the bucket to grant access to.
  • resourceName - (Required) The name of the resource to be granted bucket access.

Attributes Reference

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

  • id - A combination of attributes separated by a , to create a unique id: bucketName,resourceName

Import

awsLightsailBucketResourceAccess can be imported by using the id attribute, e.g.,

$ terraform import aws_lightsail_bucket_resource_access.test example-bucket,example-instance