Bucket
Provides a lightsail bucket.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const test = new aws.lightsail.Bucket("test", {
name: "mytestbucket",
bundleId: "small_1_0",
});
import pulumi
import pulumi_aws as aws
test = aws.lightsail.Bucket("test",
name="mytestbucket",
bundle_id="small_1_0")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var test = new Aws.LightSail.Bucket("test", new()
{
Name = "mytestbucket",
BundleId = "small_1_0",
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lightsail"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := lightsail.NewBucket(ctx, "test", &lightsail.BucketArgs{
Name: pulumi.String("mytestbucket"),
BundleId: pulumi.String("small_1_0"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.lightsail.Bucket;
import com.pulumi.aws.lightsail.BucketArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var test = new Bucket("test", BucketArgs.builder()
.name("mytestbucket")
.bundleId("small_1_0")
.build());
}
}
resources:
test:
type: aws:lightsail:Bucket
properties:
name: mytestbucket
bundleId: small_1_0
Import
Using pulumi import
, import aws_lightsail_bucket
using the name
attribute. For example:
$ pulumi import aws:lightsail/bucket:Bucket test example-bucket
Properties
The resource Availability Zone. Follows the format us-east-2a (case-sensitive).
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.
Force Delete non-empty buckets using pulumi destroy
. AWS by default will not delete an s3 bucket which is not empty, to prevent losing bucket data and affecting other resources in lightsail. If force_delete
is set to true
the bucket will be deleted even when not empty.
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.