@lbrlabs/pulumi-scaleway
Version:
A Pulumi package for creating and managing scaleway cloud resources.
284 lines (283 loc) • 10.6 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "./types/input";
import * as outputs from "./types/output";
/**
* Creates and manages Scaleway object storage buckets.
* For more information, see [the documentation](https://www.scaleway.com/en/docs/object-storage-feature/).
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@lbrlabs/pulumi-scaleway";
*
* const someBucket = new scaleway.ObjectBucket("someBucket", {tags: {
* key: "value",
* }});
* ```
* ### Creating the bucket in a specific project
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@lbrlabs/pulumi-scaleway";
*
* const someBucket = new scaleway.ObjectBucket("someBucket", {projectId: "11111111-1111-1111-1111-111111111111"});
* ```
* ### Using object lifecycle
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@lbrlabs/pulumi-scaleway";
*
* const main = new scaleway.ObjectBucket("main", {
* lifecycleRules: [
* {
* enabled: true,
* expiration: {
* days: 365,
* },
* id: "id1",
* prefix: "path1/",
* transitions: [{
* days: 120,
* storageClass: "GLACIER",
* }],
* },
* {
* enabled: true,
* expiration: {
* days: 50,
* },
* id: "id2",
* prefix: "path2/",
* },
* {
* enabled: false,
* expiration: {
* days: 1,
* },
* id: "id3",
* prefix: "path3/",
* tags: {
* tagKey: "tagValue",
* terraform: "hashicorp",
* },
* },
* {
* enabled: true,
* id: "id4",
* tags: {
* tag1: "value1",
* },
* transitions: [{
* days: 0,
* storageClass: "GLACIER",
* }],
* },
* {
* abortIncompleteMultipartUploadDays: 30,
* enabled: true,
* },
* ],
* region: "fr-par",
* });
* ```
*
* ## Import
*
* Buckets can be imported using the `{region}/{bucketName}` identifier, e.g. bash
*
* ```sh
* $ pulumi import scaleway:index/objectBucket:ObjectBucket some_bucket fr-par/some-bucket
* ```
*
* If you are importing a bucket from a specific project (that is not your default project), you can use the following syntaxbash
*
* ```sh
* $ pulumi import scaleway:index/objectBucket:ObjectBucket some_bucket fr-par/some-bucket@11111111-1111-1111-1111-111111111111
* ```
*/
export declare class ObjectBucket extends pulumi.CustomResource {
/**
* Get an existing ObjectBucket resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ObjectBucketState, opts?: pulumi.CustomResourceOptions): ObjectBucket;
/**
* Returns true if the given object is an instance of ObjectBucket. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is ObjectBucket;
/**
* (Deprecated) The canned ACL you want to apply to the bucket.
*
* @deprecated ACL attribute is deprecated. Please use the resource scaleway_object_bucket_acl instead.
*/
readonly acl: pulumi.Output<string | undefined>;
/**
* A rule of [Cross-Origin Resource Sharing](https://docs.aws.amazon.com/AmazonS3/latest/dev/cors.html) (documented below).
*/
readonly corsRules: pulumi.Output<outputs.ObjectBucketCorsRule[] | undefined>;
/**
* The endpoint URL of the bucket
*/
readonly endpoint: pulumi.Output<string>;
/**
* Enable deletion of objects in bucket before destroying, locked objects or under legal hold are also deleted and **not** recoverable
*/
readonly forceDestroy: pulumi.Output<boolean | undefined>;
/**
* Lifecycle configuration is a set of rules that define actions that Scaleway Object Storage applies to a group of objects
*/
readonly lifecycleRules: pulumi.Output<outputs.ObjectBucketLifecycleRule[] | undefined>;
/**
* The name of the bucket.
*/
readonly name: pulumi.Output<string>;
/**
* Enable object lock
*/
readonly objectLockEnabled: pulumi.Output<boolean | undefined>;
/**
* `projectId`) The ID of the project the bucket is associated with.
*
* The `acl` attribute is deprecated. See scaleway.ObjectBucketAcl resource documentation.
* Please check the [canned ACL](https://docs.aws.amazon.com/AmazonS3/latest/userguide/acl_overview.html#canned-acl) documentation for supported values.
*/
readonly projectId: pulumi.Output<string>;
/**
* The [region](https://developers.scaleway.com/en/quickstart/#region-definition) in which the bucket should be created.
*/
readonly region: pulumi.Output<string>;
/**
* A list of tags (key / value) for the bucket.
*/
readonly tags: pulumi.Output<{
[key: string]: string;
} | undefined>;
/**
* A state of [versioning](https://docs.aws.amazon.com/AmazonS3/latest/dev/Versioning.html) (documented below)
*/
readonly versioning: pulumi.Output<outputs.ObjectBucketVersioning>;
/**
* Create a ObjectBucket resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args?: ObjectBucketArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering ObjectBucket resources.
*/
export interface ObjectBucketState {
/**
* (Deprecated) The canned ACL you want to apply to the bucket.
*
* @deprecated ACL attribute is deprecated. Please use the resource scaleway_object_bucket_acl instead.
*/
acl?: pulumi.Input<string>;
/**
* A rule of [Cross-Origin Resource Sharing](https://docs.aws.amazon.com/AmazonS3/latest/dev/cors.html) (documented below).
*/
corsRules?: pulumi.Input<pulumi.Input<inputs.ObjectBucketCorsRule>[]>;
/**
* The endpoint URL of the bucket
*/
endpoint?: pulumi.Input<string>;
/**
* Enable deletion of objects in bucket before destroying, locked objects or under legal hold are also deleted and **not** recoverable
*/
forceDestroy?: pulumi.Input<boolean>;
/**
* Lifecycle configuration is a set of rules that define actions that Scaleway Object Storage applies to a group of objects
*/
lifecycleRules?: pulumi.Input<pulumi.Input<inputs.ObjectBucketLifecycleRule>[]>;
/**
* The name of the bucket.
*/
name?: pulumi.Input<string>;
/**
* Enable object lock
*/
objectLockEnabled?: pulumi.Input<boolean>;
/**
* `projectId`) The ID of the project the bucket is associated with.
*
* The `acl` attribute is deprecated. See scaleway.ObjectBucketAcl resource documentation.
* Please check the [canned ACL](https://docs.aws.amazon.com/AmazonS3/latest/userguide/acl_overview.html#canned-acl) documentation for supported values.
*/
projectId?: pulumi.Input<string>;
/**
* The [region](https://developers.scaleway.com/en/quickstart/#region-definition) in which the bucket should be created.
*/
region?: pulumi.Input<string>;
/**
* A list of tags (key / value) for the bucket.
*/
tags?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* A state of [versioning](https://docs.aws.amazon.com/AmazonS3/latest/dev/Versioning.html) (documented below)
*/
versioning?: pulumi.Input<inputs.ObjectBucketVersioning>;
}
/**
* The set of arguments for constructing a ObjectBucket resource.
*/
export interface ObjectBucketArgs {
/**
* (Deprecated) The canned ACL you want to apply to the bucket.
*
* @deprecated ACL attribute is deprecated. Please use the resource scaleway_object_bucket_acl instead.
*/
acl?: pulumi.Input<string>;
/**
* A rule of [Cross-Origin Resource Sharing](https://docs.aws.amazon.com/AmazonS3/latest/dev/cors.html) (documented below).
*/
corsRules?: pulumi.Input<pulumi.Input<inputs.ObjectBucketCorsRule>[]>;
/**
* Enable deletion of objects in bucket before destroying, locked objects or under legal hold are also deleted and **not** recoverable
*/
forceDestroy?: pulumi.Input<boolean>;
/**
* Lifecycle configuration is a set of rules that define actions that Scaleway Object Storage applies to a group of objects
*/
lifecycleRules?: pulumi.Input<pulumi.Input<inputs.ObjectBucketLifecycleRule>[]>;
/**
* The name of the bucket.
*/
name?: pulumi.Input<string>;
/**
* Enable object lock
*/
objectLockEnabled?: pulumi.Input<boolean>;
/**
* `projectId`) The ID of the project the bucket is associated with.
*
* The `acl` attribute is deprecated. See scaleway.ObjectBucketAcl resource documentation.
* Please check the [canned ACL](https://docs.aws.amazon.com/AmazonS3/latest/userguide/acl_overview.html#canned-acl) documentation for supported values.
*/
projectId?: pulumi.Input<string>;
/**
* The [region](https://developers.scaleway.com/en/quickstart/#region-definition) in which the bucket should be created.
*/
region?: pulumi.Input<string>;
/**
* A list of tags (key / value) for the bucket.
*/
tags?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* A state of [versioning](https://docs.aws.amazon.com/AmazonS3/latest/dev/Versioning.html) (documented below)
*/
versioning?: pulumi.Input<inputs.ObjectBucketVersioning>;
}