1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. storage
  5. Bucket
Google Cloud Classic v7.2.1 published on Wednesday, Nov 22, 2023 by Pulumi

gcp.storage.Bucket

Explore with Pulumi AI

gcp logo
Google Cloud Classic v7.2.1 published on Wednesday, Nov 22, 2023 by Pulumi

    Creates a new bucket in Google cloud storage service (GCS). Once a bucket has been created, its location can’t be changed.

    For more information see the official documentation and API.

    Note: If the project id is not set on the resource or in the provider block it will be dynamically determined which will require enabling the compute api.

    Example Usage

    Creating A Private Bucket In Standard Storage, In The EU Region. Bucket Configured As Static Website And CORS Configurations

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var static_site = new Gcp.Storage.Bucket("static-site", new()
        {
            Cors = new[]
            {
                new Gcp.Storage.Inputs.BucketCorArgs
                {
                    MaxAgeSeconds = 3600,
                    Methods = new[]
                    {
                        "GET",
                        "HEAD",
                        "PUT",
                        "POST",
                        "DELETE",
                    },
                    Origins = new[]
                    {
                        "http://image-store.com",
                    },
                    ResponseHeaders = new[]
                    {
                        "*",
                    },
                },
            },
            ForceDestroy = true,
            Location = "EU",
            UniformBucketLevelAccess = true,
            Website = new Gcp.Storage.Inputs.BucketWebsiteArgs
            {
                MainPageSuffix = "index.html",
                NotFoundPage = "404.html",
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/storage"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := storage.NewBucket(ctx, "static-site", &storage.BucketArgs{
    			Cors: storage.BucketCorArray{
    				&storage.BucketCorArgs{
    					MaxAgeSeconds: pulumi.Int(3600),
    					Methods: pulumi.StringArray{
    						pulumi.String("GET"),
    						pulumi.String("HEAD"),
    						pulumi.String("PUT"),
    						pulumi.String("POST"),
    						pulumi.String("DELETE"),
    					},
    					Origins: pulumi.StringArray{
    						pulumi.String("http://image-store.com"),
    					},
    					ResponseHeaders: pulumi.StringArray{
    						pulumi.String("*"),
    					},
    				},
    			},
    			ForceDestroy:             pulumi.Bool(true),
    			Location:                 pulumi.String("EU"),
    			UniformBucketLevelAccess: pulumi.Bool(true),
    			Website: &storage.BucketWebsiteArgs{
    				MainPageSuffix: pulumi.String("index.html"),
    				NotFoundPage:   pulumi.String("404.html"),
    			},
    		})
    		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.gcp.storage.Bucket;
    import com.pulumi.gcp.storage.BucketArgs;
    import com.pulumi.gcp.storage.inputs.BucketCorArgs;
    import com.pulumi.gcp.storage.inputs.BucketWebsiteArgs;
    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 static_site = new Bucket("static-site", BucketArgs.builder()        
                .cors(BucketCorArgs.builder()
                    .maxAgeSeconds(3600)
                    .methods(                
                        "GET",
                        "HEAD",
                        "PUT",
                        "POST",
                        "DELETE")
                    .origins("http://image-store.com")
                    .responseHeaders("*")
                    .build())
                .forceDestroy(true)
                .location("EU")
                .uniformBucketLevelAccess(true)
                .website(BucketWebsiteArgs.builder()
                    .mainPageSuffix("index.html")
                    .notFoundPage("404.html")
                    .build())
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_gcp as gcp
    
    static_site = gcp.storage.Bucket("static-site",
        cors=[gcp.storage.BucketCorArgs(
            max_age_seconds=3600,
            methods=[
                "GET",
                "HEAD",
                "PUT",
                "POST",
                "DELETE",
            ],
            origins=["http://image-store.com"],
            response_headers=["*"],
        )],
        force_destroy=True,
        location="EU",
        uniform_bucket_level_access=True,
        website=gcp.storage.BucketWebsiteArgs(
            main_page_suffix="index.html",
            not_found_page="404.html",
        ))
    
    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const static_site = new gcp.storage.Bucket("static-site", {
        cors: [{
            maxAgeSeconds: 3600,
            methods: [
                "GET",
                "HEAD",
                "PUT",
                "POST",
                "DELETE",
            ],
            origins: ["http://image-store.com"],
            responseHeaders: ["*"],
        }],
        forceDestroy: true,
        location: "EU",
        uniformBucketLevelAccess: true,
        website: {
            mainPageSuffix: "index.html",
            notFoundPage: "404.html",
        },
    });
    
    resources:
      static-site:
        type: gcp:storage:Bucket
        properties:
          cors:
            - maxAgeSeconds: 3600
              methods:
                - GET
                - HEAD
                - PUT
                - POST
                - DELETE
              origins:
                - http://image-store.com
              responseHeaders:
                - '*'
          forceDestroy: true
          location: EU
          uniformBucketLevelAccess: true
          website:
            mainPageSuffix: index.html
            notFoundPage: 404.html
    

    Life Cycle Settings For Storage Bucket Objects

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var auto_expire = new Gcp.Storage.Bucket("auto-expire", new()
        {
            ForceDestroy = true,
            LifecycleRules = new[]
            {
                new Gcp.Storage.Inputs.BucketLifecycleRuleArgs
                {
                    Action = new Gcp.Storage.Inputs.BucketLifecycleRuleActionArgs
                    {
                        Type = "Delete",
                    },
                    Condition = new Gcp.Storage.Inputs.BucketLifecycleRuleConditionArgs
                    {
                        Age = 3,
                    },
                },
                new Gcp.Storage.Inputs.BucketLifecycleRuleArgs
                {
                    Action = new Gcp.Storage.Inputs.BucketLifecycleRuleActionArgs
                    {
                        Type = "AbortIncompleteMultipartUpload",
                    },
                    Condition = new Gcp.Storage.Inputs.BucketLifecycleRuleConditionArgs
                    {
                        Age = 1,
                    },
                },
            },
            Location = "US",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/storage"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := storage.NewBucket(ctx, "auto-expire", &storage.BucketArgs{
    			ForceDestroy: pulumi.Bool(true),
    			LifecycleRules: storage.BucketLifecycleRuleArray{
    				&storage.BucketLifecycleRuleArgs{
    					Action: &storage.BucketLifecycleRuleActionArgs{
    						Type: pulumi.String("Delete"),
    					},
    					Condition: &storage.BucketLifecycleRuleConditionArgs{
    						Age: pulumi.Int(3),
    					},
    				},
    				&storage.BucketLifecycleRuleArgs{
    					Action: &storage.BucketLifecycleRuleActionArgs{
    						Type: pulumi.String("AbortIncompleteMultipartUpload"),
    					},
    					Condition: &storage.BucketLifecycleRuleConditionArgs{
    						Age: pulumi.Int(1),
    					},
    				},
    			},
    			Location: pulumi.String("US"),
    		})
    		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.gcp.storage.Bucket;
    import com.pulumi.gcp.storage.BucketArgs;
    import com.pulumi.gcp.storage.inputs.BucketLifecycleRuleArgs;
    import com.pulumi.gcp.storage.inputs.BucketLifecycleRuleActionArgs;
    import com.pulumi.gcp.storage.inputs.BucketLifecycleRuleConditionArgs;
    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 auto_expire = new Bucket("auto-expire", BucketArgs.builder()        
                .forceDestroy(true)
                .lifecycleRules(            
                    BucketLifecycleRuleArgs.builder()
                        .action(BucketLifecycleRuleActionArgs.builder()
                            .type("Delete")
                            .build())
                        .condition(BucketLifecycleRuleConditionArgs.builder()
                            .age(3)
                            .build())
                        .build(),
                    BucketLifecycleRuleArgs.builder()
                        .action(BucketLifecycleRuleActionArgs.builder()
                            .type("AbortIncompleteMultipartUpload")
                            .build())
                        .condition(BucketLifecycleRuleConditionArgs.builder()
                            .age(1)
                            .build())
                        .build())
                .location("US")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_gcp as gcp
    
    auto_expire = gcp.storage.Bucket("auto-expire",
        force_destroy=True,
        lifecycle_rules=[
            gcp.storage.BucketLifecycleRuleArgs(
                action=gcp.storage.BucketLifecycleRuleActionArgs(
                    type="Delete",
                ),
                condition=gcp.storage.BucketLifecycleRuleConditionArgs(
                    age=3,
                ),
            ),
            gcp.storage.BucketLifecycleRuleArgs(
                action=gcp.storage.BucketLifecycleRuleActionArgs(
                    type="AbortIncompleteMultipartUpload",
                ),
                condition=gcp.storage.BucketLifecycleRuleConditionArgs(
                    age=1,
                ),
            ),
        ],
        location="US")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const auto_expire = new gcp.storage.Bucket("auto-expire", {
        forceDestroy: true,
        lifecycleRules: [
            {
                action: {
                    type: "Delete",
                },
                condition: {
                    age: 3,
                },
            },
            {
                action: {
                    type: "AbortIncompleteMultipartUpload",
                },
                condition: {
                    age: 1,
                },
            },
        ],
        location: "US",
    });
    
    resources:
      auto-expire:
        type: gcp:storage:Bucket
        properties:
          forceDestroy: true
          lifecycleRules:
            - action:
                type: Delete
              condition:
                age: 3
            - action:
                type: AbortIncompleteMultipartUpload
              condition:
                age: 1
          location: US
    

    Enabling Public Access Prevention

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var auto_expire = new Gcp.Storage.Bucket("auto-expire", new()
        {
            ForceDestroy = true,
            Location = "US",
            PublicAccessPrevention = "enforced",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/storage"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := storage.NewBucket(ctx, "auto-expire", &storage.BucketArgs{
    			ForceDestroy:           pulumi.Bool(true),
    			Location:               pulumi.String("US"),
    			PublicAccessPrevention: pulumi.String("enforced"),
    		})
    		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.gcp.storage.Bucket;
    import com.pulumi.gcp.storage.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 auto_expire = new Bucket("auto-expire", BucketArgs.builder()        
                .forceDestroy(true)
                .location("US")
                .publicAccessPrevention("enforced")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_gcp as gcp
    
    auto_expire = gcp.storage.Bucket("auto-expire",
        force_destroy=True,
        location="US",
        public_access_prevention="enforced")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const auto_expire = new gcp.storage.Bucket("auto-expire", {
        forceDestroy: true,
        location: "US",
        publicAccessPrevention: "enforced",
    });
    
    resources:
      auto-expire:
        type: gcp:storage:Bucket
        properties:
          forceDestroy: true
          location: US
          publicAccessPrevention: enforced
    

    Create Bucket Resource

    new Bucket(name: string, args: BucketArgs, opts?: CustomResourceOptions);
    @overload
    def Bucket(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               autoclass: Optional[BucketAutoclassArgs] = None,
               cors: Optional[Sequence[BucketCorArgs]] = None,
               custom_placement_config: Optional[BucketCustomPlacementConfigArgs] = None,
               default_event_based_hold: Optional[bool] = None,
               enable_object_retention: Optional[bool] = None,
               encryption: Optional[BucketEncryptionArgs] = None,
               force_destroy: Optional[bool] = None,
               labels: Optional[Mapping[str, str]] = None,
               lifecycle_rules: Optional[Sequence[BucketLifecycleRuleArgs]] = None,
               location: Optional[str] = None,
               logging: Optional[BucketLoggingArgs] = None,
               name: Optional[str] = None,
               project: Optional[str] = None,
               public_access_prevention: Optional[str] = None,
               requester_pays: Optional[bool] = None,
               retention_policy: Optional[BucketRetentionPolicyArgs] = None,
               storage_class: Optional[str] = None,
               uniform_bucket_level_access: Optional[bool] = None,
               versioning: Optional[BucketVersioningArgs] = None,
               website: Optional[BucketWebsiteArgs] = None)
    @overload
    def Bucket(resource_name: str,
               args: BucketArgs,
               opts: Optional[ResourceOptions] = None)
    func NewBucket(ctx *Context, name string, args BucketArgs, opts ...ResourceOption) (*Bucket, error)
    public Bucket(string name, BucketArgs args, CustomResourceOptions? opts = null)
    public Bucket(String name, BucketArgs args)
    public Bucket(String name, BucketArgs args, CustomResourceOptions options)
    
    type: gcp:storage:Bucket
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args BucketArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args BucketArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args BucketArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args BucketArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args BucketArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Bucket Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The Bucket resource accepts the following input properties:

    Location string

    The GCS location.


    Autoclass BucketAutoclass

    The bucket's Autoclass configuration. Structure is documented below.

    Cors List<BucketCor>

    The bucket's Cross-Origin Resource Sharing (CORS) configuration. Multiple blocks of this type are permitted. Structure is documented below.

    CustomPlacementConfig BucketCustomPlacementConfig

    The bucket's custom location configuration, which specifies the individual regions that comprise a dual-region bucket. If the bucket is designated a single or multi-region, the parameters are empty. Structure is documented below.

    DefaultEventBasedHold bool

    Whether or not to automatically apply an eventBasedHold to new objects added to the bucket.

    EnableObjectRetention bool

    Enables object retention on a storage bucket.

    Encryption BucketEncryption

    The bucket's encryption configuration. Structure is documented below.

    ForceDestroy bool

    When deleting a bucket, this boolean option will delete all contained objects. If you try to delete a bucket that contains objects, the provider will fail that run.

    Labels Dictionary<string, string>

    A map of key/value label pairs to assign to the bucket.

    LifecycleRules List<BucketLifecycleRule>

    The bucket's Lifecycle Rules configuration. Multiple blocks of this type are permitted. Structure is documented below.

    Logging BucketLogging

    The bucket's Access & Storage Logs configuration. Structure is documented below.

    Name string

    The name of the bucket.

    Project string

    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

    PublicAccessPrevention string

    Prevents public access to a bucket. Acceptable values are "inherited" or "enforced". If "inherited", the bucket uses public access prevention. only if the bucket is subject to the public access prevention organization policy constraint. Defaults to "inherited".

    RequesterPays bool

    Enables Requester Pays on a storage bucket.

    RetentionPolicy BucketRetentionPolicy

    Configuration of the bucket's data retention policy for how long objects in the bucket should be retained. Structure is documented below.

    StorageClass string

    The Storage Class of the new bucket. Supported values include: STANDARD, MULTI_REGIONAL, REGIONAL, NEARLINE, COLDLINE, ARCHIVE.

    UniformBucketLevelAccess bool

    Enables Uniform bucket-level access access to a bucket.

    Versioning BucketVersioning

    The bucket's Versioning configuration. Structure is documented below.

    Website BucketWebsite

    Configuration if the bucket acts as a website. Structure is documented below.

    Location string

    The GCS location.


    Autoclass BucketAutoclassArgs

    The bucket's Autoclass configuration. Structure is documented below.

    Cors []BucketCorArgs

    The bucket's Cross-Origin Resource Sharing (CORS) configuration. Multiple blocks of this type are permitted. Structure is documented below.

    CustomPlacementConfig BucketCustomPlacementConfigArgs

    The bucket's custom location configuration, which specifies the individual regions that comprise a dual-region bucket. If the bucket is designated a single or multi-region, the parameters are empty. Structure is documented below.

    DefaultEventBasedHold bool

    Whether or not to automatically apply an eventBasedHold to new objects added to the bucket.

    EnableObjectRetention bool

    Enables object retention on a storage bucket.

    Encryption BucketEncryptionArgs

    The bucket's encryption configuration. Structure is documented below.

    ForceDestroy bool

    When deleting a bucket, this boolean option will delete all contained objects. If you try to delete a bucket that contains objects, the provider will fail that run.

    Labels map[string]string

    A map of key/value label pairs to assign to the bucket.

    LifecycleRules []BucketLifecycleRuleArgs

    The bucket's Lifecycle Rules configuration. Multiple blocks of this type are permitted. Structure is documented below.

    Logging BucketLoggingArgs

    The bucket's Access & Storage Logs configuration. Structure is documented below.

    Name string

    The name of the bucket.

    Project string

    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

    PublicAccessPrevention string

    Prevents public access to a bucket. Acceptable values are "inherited" or "enforced". If "inherited", the bucket uses public access prevention. only if the bucket is subject to the public access prevention organization policy constraint. Defaults to "inherited".

    RequesterPays bool

    Enables Requester Pays on a storage bucket.

    RetentionPolicy BucketRetentionPolicyArgs

    Configuration of the bucket's data retention policy for how long objects in the bucket should be retained. Structure is documented below.

    StorageClass string

    The Storage Class of the new bucket. Supported values include: STANDARD, MULTI_REGIONAL, REGIONAL, NEARLINE, COLDLINE, ARCHIVE.

    UniformBucketLevelAccess bool

    Enables Uniform bucket-level access access to a bucket.

    Versioning BucketVersioningArgs

    The bucket's Versioning configuration. Structure is documented below.

    Website BucketWebsiteArgs

    Configuration if the bucket acts as a website. Structure is documented below.

    location String

    The GCS location.


    autoclass BucketAutoclass

    The bucket's Autoclass configuration. Structure is documented below.

    cors List<BucketCor>

    The bucket's Cross-Origin Resource Sharing (CORS) configuration. Multiple blocks of this type are permitted. Structure is documented below.

    customPlacementConfig BucketCustomPlacementConfig

    The bucket's custom location configuration, which specifies the individual regions that comprise a dual-region bucket. If the bucket is designated a single or multi-region, the parameters are empty. Structure is documented below.

    defaultEventBasedHold Boolean

    Whether or not to automatically apply an eventBasedHold to new objects added to the bucket.

    enableObjectRetention Boolean

    Enables object retention on a storage bucket.

    encryption BucketEncryption

    The bucket's encryption configuration. Structure is documented below.

    forceDestroy Boolean

    When deleting a bucket, this boolean option will delete all contained objects. If you try to delete a bucket that contains objects, the provider will fail that run.

    labels Map<String,String>

    A map of key/value label pairs to assign to the bucket.

    lifecycleRules List<BucketLifecycleRule>

    The bucket's Lifecycle Rules configuration. Multiple blocks of this type are permitted. Structure is documented below.

    logging BucketLogging

    The bucket's Access & Storage Logs configuration. Structure is documented below.

    name String

    The name of the bucket.

    project String

    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

    publicAccessPrevention String

    Prevents public access to a bucket. Acceptable values are "inherited" or "enforced". If "inherited", the bucket uses public access prevention. only if the bucket is subject to the public access prevention organization policy constraint. Defaults to "inherited".

    requesterPays Boolean

    Enables Requester Pays on a storage bucket.

    retentionPolicy BucketRetentionPolicy

    Configuration of the bucket's data retention policy for how long objects in the bucket should be retained. Structure is documented below.

    storageClass String

    The Storage Class of the new bucket. Supported values include: STANDARD, MULTI_REGIONAL, REGIONAL, NEARLINE, COLDLINE, ARCHIVE.

    uniformBucketLevelAccess Boolean

    Enables Uniform bucket-level access access to a bucket.

    versioning BucketVersioning

    The bucket's Versioning configuration. Structure is documented below.

    website BucketWebsite

    Configuration if the bucket acts as a website. Structure is documented below.

    location string

    The GCS location.


    autoclass BucketAutoclass

    The bucket's Autoclass configuration. Structure is documented below.

    cors BucketCor[]

    The bucket's Cross-Origin Resource Sharing (CORS) configuration. Multiple blocks of this type are permitted. Structure is documented below.

    customPlacementConfig BucketCustomPlacementConfig

    The bucket's custom location configuration, which specifies the individual regions that comprise a dual-region bucket. If the bucket is designated a single or multi-region, the parameters are empty. Structure is documented below.

    defaultEventBasedHold boolean

    Whether or not to automatically apply an eventBasedHold to new objects added to the bucket.

    enableObjectRetention boolean

    Enables object retention on a storage bucket.

    encryption BucketEncryption

    The bucket's encryption configuration. Structure is documented below.

    forceDestroy boolean

    When deleting a bucket, this boolean option will delete all contained objects. If you try to delete a bucket that contains objects, the provider will fail that run.

    labels {[key: string]: string}

    A map of key/value label pairs to assign to the bucket.

    lifecycleRules BucketLifecycleRule[]

    The bucket's Lifecycle Rules configuration. Multiple blocks of this type are permitted. Structure is documented below.

    logging BucketLogging

    The bucket's Access & Storage Logs configuration. Structure is documented below.

    name string

    The name of the bucket.

    project string

    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

    publicAccessPrevention string

    Prevents public access to a bucket. Acceptable values are "inherited" or "enforced". If "inherited", the bucket uses public access prevention. only if the bucket is subject to the public access prevention organization policy constraint. Defaults to "inherited".

    requesterPays boolean

    Enables Requester Pays on a storage bucket.

    retentionPolicy BucketRetentionPolicy

    Configuration of the bucket's data retention policy for how long objects in the bucket should be retained. Structure is documented below.

    storageClass string

    The Storage Class of the new bucket. Supported values include: STANDARD, MULTI_REGIONAL, REGIONAL, NEARLINE, COLDLINE, ARCHIVE.

    uniformBucketLevelAccess boolean

    Enables Uniform bucket-level access access to a bucket.

    versioning BucketVersioning

    The bucket's Versioning configuration. Structure is documented below.

    website BucketWebsite

    Configuration if the bucket acts as a website. Structure is documented below.

    location str

    The GCS location.


    autoclass BucketAutoclassArgs

    The bucket's Autoclass configuration. Structure is documented below.

    cors Sequence[BucketCorArgs]

    The bucket's Cross-Origin Resource Sharing (CORS) configuration. Multiple blocks of this type are permitted. Structure is documented below.

    custom_placement_config BucketCustomPlacementConfigArgs

    The bucket's custom location configuration, which specifies the individual regions that comprise a dual-region bucket. If the bucket is designated a single or multi-region, the parameters are empty. Structure is documented below.

    default_event_based_hold bool

    Whether or not to automatically apply an eventBasedHold to new objects added to the bucket.

    enable_object_retention bool

    Enables object retention on a storage bucket.

    encryption BucketEncryptionArgs

    The bucket's encryption configuration. Structure is documented below.

    force_destroy bool

    When deleting a bucket, this boolean option will delete all contained objects. If you try to delete a bucket that contains objects, the provider will fail that run.

    labels Mapping[str, str]

    A map of key/value label pairs to assign to the bucket.

    lifecycle_rules Sequence[BucketLifecycleRuleArgs]

    The bucket's Lifecycle Rules configuration. Multiple blocks of this type are permitted. Structure is documented below.

    logging BucketLoggingArgs

    The bucket's Access & Storage Logs configuration. Structure is documented below.

    name str

    The name of the bucket.

    project str

    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

    public_access_prevention str

    Prevents public access to a bucket. Acceptable values are "inherited" or "enforced". If "inherited", the bucket uses public access prevention. only if the bucket is subject to the public access prevention organization policy constraint. Defaults to "inherited".

    requester_pays bool

    Enables Requester Pays on a storage bucket.

    retention_policy BucketRetentionPolicyArgs

    Configuration of the bucket's data retention policy for how long objects in the bucket should be retained. Structure is documented below.

    storage_class str

    The Storage Class of the new bucket. Supported values include: STANDARD, MULTI_REGIONAL, REGIONAL, NEARLINE, COLDLINE, ARCHIVE.

    uniform_bucket_level_access bool

    Enables Uniform bucket-level access access to a bucket.

    versioning BucketVersioningArgs

    The bucket's Versioning configuration. Structure is documented below.

    website BucketWebsiteArgs

    Configuration if the bucket acts as a website. Structure is documented below.

    location String

    The GCS location.


    autoclass Property Map

    The bucket's Autoclass configuration. Structure is documented below.

    cors List<Property Map>

    The bucket's Cross-Origin Resource Sharing (CORS) configuration. Multiple blocks of this type are permitted. Structure is documented below.

    customPlacementConfig Property Map

    The bucket's custom location configuration, which specifies the individual regions that comprise a dual-region bucket. If the bucket is designated a single or multi-region, the parameters are empty. Structure is documented below.

    defaultEventBasedHold Boolean

    Whether or not to automatically apply an eventBasedHold to new objects added to the bucket.

    enableObjectRetention Boolean

    Enables object retention on a storage bucket.

    encryption Property Map

    The bucket's encryption configuration. Structure is documented below.

    forceDestroy Boolean

    When deleting a bucket, this boolean option will delete all contained objects. If you try to delete a bucket that contains objects, the provider will fail that run.

    labels Map<String>

    A map of key/value label pairs to assign to the bucket.

    lifecycleRules List<Property Map>

    The bucket's Lifecycle Rules configuration. Multiple blocks of this type are permitted. Structure is documented below.

    logging Property Map

    The bucket's Access & Storage Logs configuration. Structure is documented below.

    name String

    The name of the bucket.

    project String

    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

    publicAccessPrevention String

    Prevents public access to a bucket. Acceptable values are "inherited" or "enforced". If "inherited", the bucket uses public access prevention. only if the bucket is subject to the public access prevention organization policy constraint. Defaults to "inherited".

    requesterPays Boolean

    Enables Requester Pays on a storage bucket.

    retentionPolicy Property Map

    Configuration of the bucket's data retention policy for how long objects in the bucket should be retained. Structure is documented below.

    storageClass String

    The Storage Class of the new bucket. Supported values include: STANDARD, MULTI_REGIONAL, REGIONAL, NEARLINE, COLDLINE, ARCHIVE.

    uniformBucketLevelAccess Boolean

    Enables Uniform bucket-level access access to a bucket.

    versioning Property Map

    The bucket's Versioning configuration. Structure is documented below.

    website Property Map

    Configuration if the bucket acts as a website. Structure is documented below.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Bucket resource produces the following output properties:

    EffectiveLabels Dictionary<string, string>

    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Terraform, other clients and services.

    Id string

    The provider-assigned unique ID for this managed resource.

    PulumiLabels Dictionary<string, string>

    The combination of labels configured directly on the resource and default labels configured on the provider.

    SelfLink string

    The URI of the created resource.

    Url string

    The base URL of the bucket, in the format gs://<bucket-name>.

    EffectiveLabels map[string]string

    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Terraform, other clients and services.

    Id string

    The provider-assigned unique ID for this managed resource.

    PulumiLabels map[string]string

    The combination of labels configured directly on the resource and default labels configured on the provider.

    SelfLink string

    The URI of the created resource.

    Url string

    The base URL of the bucket, in the format gs://<bucket-name>.

    effectiveLabels Map<String,String>

    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Terraform, other clients and services.

    id String

    The provider-assigned unique ID for this managed resource.

    pulumiLabels Map<String,String>

    The combination of labels configured directly on the resource and default labels configured on the provider.

    selfLink String

    The URI of the created resource.

    url String

    The base URL of the bucket, in the format gs://<bucket-name>.

    effectiveLabels {[key: string]: string}

    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Terraform, other clients and services.

    id string

    The provider-assigned unique ID for this managed resource.

    pulumiLabels {[key: string]: string}

    The combination of labels configured directly on the resource and default labels configured on the provider.

    selfLink string

    The URI of the created resource.

    url string

    The base URL of the bucket, in the format gs://<bucket-name>.

    effective_labels Mapping[str, str]

    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Terraform, other clients and services.

    id str

    The provider-assigned unique ID for this managed resource.

    pulumi_labels Mapping[str, str]

    The combination of labels configured directly on the resource and default labels configured on the provider.

    self_link str

    The URI of the created resource.

    url str

    The base URL of the bucket, in the format gs://<bucket-name>.

    effectiveLabels Map<String>

    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Terraform, other clients and services.

    id String

    The provider-assigned unique ID for this managed resource.

    pulumiLabels Map<String>

    The combination of labels configured directly on the resource and default labels configured on the provider.

    selfLink String

    The URI of the created resource.

    url String

    The base URL of the bucket, in the format gs://<bucket-name>.

    Look up Existing Bucket Resource

    Get an existing Bucket resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: BucketState, opts?: CustomResourceOptions): Bucket
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            autoclass: Optional[BucketAutoclassArgs] = None,
            cors: Optional[Sequence[BucketCorArgs]] = None,
            custom_placement_config: Optional[BucketCustomPlacementConfigArgs] = None,
            default_event_based_hold: Optional[bool] = None,
            effective_labels: Optional[Mapping[str, str]] = None,
            enable_object_retention: Optional[bool] = None,
            encryption: Optional[BucketEncryptionArgs] = None,
            force_destroy: Optional[bool] = None,
            labels: Optional[Mapping[str, str]] = None,
            lifecycle_rules: Optional[Sequence[BucketLifecycleRuleArgs]] = None,
            location: Optional[str] = None,
            logging: Optional[BucketLoggingArgs] = None,
            name: Optional[str] = None,
            project: Optional[str] = None,
            public_access_prevention: Optional[str] = None,
            pulumi_labels: Optional[Mapping[str, str]] = None,
            requester_pays: Optional[bool] = None,
            retention_policy: Optional[BucketRetentionPolicyArgs] = None,
            self_link: Optional[str] = None,
            storage_class: Optional[str] = None,
            uniform_bucket_level_access: Optional[bool] = None,
            url: Optional[str] = None,
            versioning: Optional[BucketVersioningArgs] = None,
            website: Optional[BucketWebsiteArgs] = None) -> Bucket
    func GetBucket(ctx *Context, name string, id IDInput, state *BucketState, opts ...ResourceOption) (*Bucket, error)
    public static Bucket Get(string name, Input<string> id, BucketState? state, CustomResourceOptions? opts = null)
    public static Bucket get(String name, Output<String> id, BucketState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Autoclass BucketAutoclass

    The bucket's Autoclass configuration. Structure is documented below.

    Cors List<BucketCor>

    The bucket's Cross-Origin Resource Sharing (CORS) configuration. Multiple blocks of this type are permitted. Structure is documented below.

    CustomPlacementConfig BucketCustomPlacementConfig

    The bucket's custom location configuration, which specifies the individual regions that comprise a dual-region bucket. If the bucket is designated a single or multi-region, the parameters are empty. Structure is documented below.

    DefaultEventBasedHold bool

    Whether or not to automatically apply an eventBasedHold to new objects added to the bucket.

    EffectiveLabels Dictionary<string, string>

    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Terraform, other clients and services.

    EnableObjectRetention bool

    Enables object retention on a storage bucket.

    Encryption BucketEncryption

    The bucket's encryption configuration. Structure is documented below.

    ForceDestroy bool

    When deleting a bucket, this boolean option will delete all contained objects. If you try to delete a bucket that contains objects, the provider will fail that run.

    Labels Dictionary<string, string>

    A map of key/value label pairs to assign to the bucket.

    LifecycleRules List<BucketLifecycleRule>

    The bucket's Lifecycle Rules configuration. Multiple blocks of this type are permitted. Structure is documented below.

    Location string

    The GCS location.


    Logging BucketLogging

    The bucket's Access & Storage Logs configuration. Structure is documented below.

    Name string

    The name of the bucket.

    Project string

    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

    PublicAccessPrevention string

    Prevents public access to a bucket. Acceptable values are "inherited" or "enforced". If "inherited", the bucket uses public access prevention. only if the bucket is subject to the public access prevention organization policy constraint. Defaults to "inherited".

    PulumiLabels Dictionary<string, string>

    The combination of labels configured directly on the resource and default labels configured on the provider.

    RequesterPays bool

    Enables Requester Pays on a storage bucket.

    RetentionPolicy BucketRetentionPolicy

    Configuration of the bucket's data retention policy for how long objects in the bucket should be retained. Structure is documented below.

    SelfLink string

    The URI of the created resource.

    StorageClass string

    The Storage Class of the new bucket. Supported values include: STANDARD, MULTI_REGIONAL, REGIONAL, NEARLINE, COLDLINE, ARCHIVE.

    UniformBucketLevelAccess bool

    Enables Uniform bucket-level access access to a bucket.

    Url string

    The base URL of the bucket, in the format gs://<bucket-name>.

    Versioning BucketVersioning

    The bucket's Versioning configuration. Structure is documented below.

    Website BucketWebsite

    Configuration if the bucket acts as a website. Structure is documented below.

    Autoclass BucketAutoclassArgs

    The bucket's Autoclass configuration. Structure is documented below.

    Cors []BucketCorArgs

    The bucket's Cross-Origin Resource Sharing (CORS) configuration. Multiple blocks of this type are permitted. Structure is documented below.

    CustomPlacementConfig BucketCustomPlacementConfigArgs

    The bucket's custom location configuration, which specifies the individual regions that comprise a dual-region bucket. If the bucket is designated a single or multi-region, the parameters are empty. Structure is documented below.

    DefaultEventBasedHold bool

    Whether or not to automatically apply an eventBasedHold to new objects added to the bucket.

    EffectiveLabels map[string]string

    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Terraform, other clients and services.

    EnableObjectRetention bool

    Enables object retention on a storage bucket.

    Encryption BucketEncryptionArgs

    The bucket's encryption configuration. Structure is documented below.

    ForceDestroy bool

    When deleting a bucket, this boolean option will delete all contained objects. If you try to delete a bucket that contains objects, the provider will fail that run.

    Labels map[string]string

    A map of key/value label pairs to assign to the bucket.

    LifecycleRules []BucketLifecycleRuleArgs

    The bucket's Lifecycle Rules configuration. Multiple blocks of this type are permitted. Structure is documented below.

    Location string

    The GCS location.


    Logging BucketLoggingArgs

    The bucket's Access & Storage Logs configuration. Structure is documented below.

    Name string

    The name of the bucket.

    Project string

    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

    PublicAccessPrevention string

    Prevents public access to a bucket. Acceptable values are "inherited" or "enforced". If "inherited", the bucket uses public access prevention. only if the bucket is subject to the public access prevention organization policy constraint. Defaults to "inherited".

    PulumiLabels map[string]string

    The combination of labels configured directly on the resource and default labels configured on the provider.

    RequesterPays bool

    Enables Requester Pays on a storage bucket.

    RetentionPolicy BucketRetentionPolicyArgs

    Configuration of the bucket's data retention policy for how long objects in the bucket should be retained. Structure is documented below.

    SelfLink string

    The URI of the created resource.

    StorageClass string

    The Storage Class of the new bucket. Supported values include: STANDARD, MULTI_REGIONAL, REGIONAL, NEARLINE, COLDLINE, ARCHIVE.

    UniformBucketLevelAccess bool

    Enables Uniform bucket-level access access to a bucket.

    Url string

    The base URL of the bucket, in the format gs://<bucket-name>.

    Versioning BucketVersioningArgs

    The bucket's Versioning configuration. Structure is documented below.

    Website BucketWebsiteArgs

    Configuration if the bucket acts as a website. Structure is documented below.

    autoclass BucketAutoclass

    The bucket's Autoclass configuration. Structure is documented below.

    cors List<BucketCor>

    The bucket's Cross-Origin Resource Sharing (CORS) configuration. Multiple blocks of this type are permitted. Structure is documented below.

    customPlacementConfig BucketCustomPlacementConfig

    The bucket's custom location configuration, which specifies the individual regions that comprise a dual-region bucket. If the bucket is designated a single or multi-region, the parameters are empty. Structure is documented below.

    defaultEventBasedHold Boolean

    Whether or not to automatically apply an eventBasedHold to new objects added to the bucket.

    effectiveLabels Map<String,String>

    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Terraform, other clients and services.

    enableObjectRetention Boolean

    Enables object retention on a storage bucket.

    encryption BucketEncryption

    The bucket's encryption configuration. Structure is documented below.

    forceDestroy Boolean

    When deleting a bucket, this boolean option will delete all contained objects. If you try to delete a bucket that contains objects, the provider will fail that run.

    labels Map<String,String>

    A map of key/value label pairs to assign to the bucket.

    lifecycleRules List<BucketLifecycleRule>

    The bucket's Lifecycle Rules configuration. Multiple blocks of this type are permitted. Structure is documented below.

    location String

    The GCS location.


    logging BucketLogging

    The bucket's Access & Storage Logs configuration. Structure is documented below.

    name String

    The name of the bucket.

    project String

    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

    publicAccessPrevention String

    Prevents public access to a bucket. Acceptable values are "inherited" or "enforced". If "inherited", the bucket uses public access prevention. only if the bucket is subject to the public access prevention organization policy constraint. Defaults to "inherited".

    pulumiLabels Map<String,String>

    The combination of labels configured directly on the resource and default labels configured on the provider.

    requesterPays Boolean

    Enables Requester Pays on a storage bucket.

    retentionPolicy BucketRetentionPolicy

    Configuration of the bucket's data retention policy for how long objects in the bucket should be retained. Structure is documented below.

    selfLink String

    The URI of the created resource.

    storageClass String

    The Storage Class of the new bucket. Supported values include: STANDARD, MULTI_REGIONAL, REGIONAL, NEARLINE, COLDLINE, ARCHIVE.

    uniformBucketLevelAccess Boolean

    Enables Uniform bucket-level access access to a bucket.

    url String

    The base URL of the bucket, in the format gs://<bucket-name>.

    versioning BucketVersioning

    The bucket's Versioning configuration. Structure is documented below.

    website BucketWebsite

    Configuration if the bucket acts as a website. Structure is documented below.

    autoclass BucketAutoclass

    The bucket's Autoclass configuration. Structure is documented below.

    cors BucketCor[]

    The bucket's Cross-Origin Resource Sharing (CORS) configuration. Multiple blocks of this type are permitted. Structure is documented below.

    customPlacementConfig BucketCustomPlacementConfig

    The bucket's custom location configuration, which specifies the individual regions that comprise a dual-region bucket. If the bucket is designated a single or multi-region, the parameters are empty. Structure is documented below.

    defaultEventBasedHold boolean

    Whether or not to automatically apply an eventBasedHold to new objects added to the bucket.

    effectiveLabels {[key: string]: string}

    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Terraform, other clients and services.

    enableObjectRetention boolean

    Enables object retention on a storage bucket.

    encryption BucketEncryption

    The bucket's encryption configuration. Structure is documented below.

    forceDestroy boolean

    When deleting a bucket, this boolean option will delete all contained objects. If you try to delete a bucket that contains objects, the provider will fail that run.

    labels {[key: string]: string}

    A map of key/value label pairs to assign to the bucket.

    lifecycleRules BucketLifecycleRule[]

    The bucket's Lifecycle Rules configuration. Multiple blocks of this type are permitted. Structure is documented below.

    location string

    The GCS location.


    logging BucketLogging

    The bucket's Access & Storage Logs configuration. Structure is documented below.

    name string

    The name of the bucket.

    project string

    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

    publicAccessPrevention string

    Prevents public access to a bucket. Acceptable values are "inherited" or "enforced". If "inherited", the bucket uses public access prevention. only if the bucket is subject to the public access prevention organization policy constraint. Defaults to "inherited".

    pulumiLabels {[key: string]: string}

    The combination of labels configured directly on the resource and default labels configured on the provider.

    requesterPays boolean

    Enables Requester Pays on a storage bucket.

    retentionPolicy BucketRetentionPolicy

    Configuration of the bucket's data retention policy for how long objects in the bucket should be retained. Structure is documented below.

    selfLink string

    The URI of the created resource.

    storageClass string

    The Storage Class of the new bucket. Supported values include: STANDARD, MULTI_REGIONAL, REGIONAL, NEARLINE, COLDLINE, ARCHIVE.

    uniformBucketLevelAccess boolean

    Enables Uniform bucket-level access access to a bucket.

    url string

    The base URL of the bucket, in the format gs://<bucket-name>.

    versioning BucketVersioning

    The bucket's Versioning configuration. Structure is documented below.

    website BucketWebsite

    Configuration if the bucket acts as a website. Structure is documented below.

    autoclass BucketAutoclassArgs

    The bucket's Autoclass configuration. Structure is documented below.

    cors Sequence[BucketCorArgs]

    The bucket's Cross-Origin Resource Sharing (CORS) configuration. Multiple blocks of this type are permitted. Structure is documented below.

    custom_placement_config BucketCustomPlacementConfigArgs

    The bucket's custom location configuration, which specifies the individual regions that comprise a dual-region bucket. If the bucket is designated a single or multi-region, the parameters are empty. Structure is documented below.

    default_event_based_hold bool

    Whether or not to automatically apply an eventBasedHold to new objects added to the bucket.

    effective_labels Mapping[str, str]

    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Terraform, other clients and services.

    enable_object_retention bool

    Enables object retention on a storage bucket.

    encryption BucketEncryptionArgs

    The bucket's encryption configuration. Structure is documented below.

    force_destroy bool

    When deleting a bucket, this boolean option will delete all contained objects. If you try to delete a bucket that contains objects, the provider will fail that run.

    labels Mapping[str, str]

    A map of key/value label pairs to assign to the bucket.

    lifecycle_rules Sequence[BucketLifecycleRuleArgs]

    The bucket's Lifecycle Rules configuration. Multiple blocks of this type are permitted. Structure is documented below.

    location str

    The GCS location.


    logging BucketLoggingArgs

    The bucket's Access & Storage Logs configuration. Structure is documented below.

    name str

    The name of the bucket.

    project str

    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

    public_access_prevention str

    Prevents public access to a bucket. Acceptable values are "inherited" or "enforced". If "inherited", the bucket uses public access prevention. only if the bucket is subject to the public access prevention organization policy constraint. Defaults to "inherited".

    pulumi_labels Mapping[str, str]

    The combination of labels configured directly on the resource and default labels configured on the provider.

    requester_pays bool

    Enables Requester Pays on a storage bucket.

    retention_policy BucketRetentionPolicyArgs

    Configuration of the bucket's data retention policy for how long objects in the bucket should be retained. Structure is documented below.

    self_link str

    The URI of the created resource.

    storage_class str

    The Storage Class of the new bucket. Supported values include: STANDARD, MULTI_REGIONAL, REGIONAL, NEARLINE, COLDLINE, ARCHIVE.

    uniform_bucket_level_access bool

    Enables Uniform bucket-level access access to a bucket.

    url str

    The base URL of the bucket, in the format gs://<bucket-name>.

    versioning BucketVersioningArgs

    The bucket's Versioning configuration. Structure is documented below.

    website BucketWebsiteArgs

    Configuration if the bucket acts as a website. Structure is documented below.

    autoclass Property Map

    The bucket's Autoclass configuration. Structure is documented below.

    cors List<Property Map>

    The bucket's Cross-Origin Resource Sharing (CORS) configuration. Multiple blocks of this type are permitted. Structure is documented below.

    customPlacementConfig Property Map

    The bucket's custom location configuration, which specifies the individual regions that comprise a dual-region bucket. If the bucket is designated a single or multi-region, the parameters are empty. Structure is documented below.

    defaultEventBasedHold Boolean

    Whether or not to automatically apply an eventBasedHold to new objects added to the bucket.

    effectiveLabels Map<String>

    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Terraform, other clients and services.

    enableObjectRetention Boolean

    Enables object retention on a storage bucket.

    encryption Property Map

    The bucket's encryption configuration. Structure is documented below.

    forceDestroy Boolean

    When deleting a bucket, this boolean option will delete all contained objects. If you try to delete a bucket that contains objects, the provider will fail that run.

    labels Map<String>

    A map of key/value label pairs to assign to the bucket.

    lifecycleRules List<Property Map>

    The bucket's Lifecycle Rules configuration. Multiple blocks of this type are permitted. Structure is documented below.

    location String

    The GCS location.


    logging Property Map

    The bucket's Access & Storage Logs configuration. Structure is documented below.

    name String

    The name of the bucket.

    project String

    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

    publicAccessPrevention String

    Prevents public access to a bucket. Acceptable values are "inherited" or "enforced". If "inherited", the bucket uses public access prevention. only if the bucket is subject to the public access prevention organization policy constraint. Defaults to "inherited".

    pulumiLabels Map<String>

    The combination of labels configured directly on the resource and default labels configured on the provider.

    requesterPays Boolean

    Enables Requester Pays on a storage bucket.

    retentionPolicy Property Map

    Configuration of the bucket's data retention policy for how long objects in the bucket should be retained. Structure is documented below.

    selfLink String

    The URI of the created resource.

    storageClass String

    The Storage Class of the new bucket. Supported values include: STANDARD, MULTI_REGIONAL, REGIONAL, NEARLINE, COLDLINE, ARCHIVE.

    uniformBucketLevelAccess Boolean

    Enables Uniform bucket-level access access to a bucket.

    url String

    The base URL of the bucket, in the format gs://<bucket-name>.

    versioning Property Map

    The bucket's Versioning configuration. Structure is documented below.

    website Property Map

    Configuration if the bucket acts as a website. Structure is documented below.

    Supporting Types

    BucketAutoclass, BucketAutoclassArgs

    Enabled bool

    While set to true, autoclass automatically transitions objects in your bucket to appropriate storage classes based on each object's access pattern.

    TerminalStorageClass string

    The storage class that objects in the bucket eventually transition to if they are not read for a certain length of time. Supported values include: NEARLINE, ARCHIVE.

    Enabled bool

    While set to true, autoclass automatically transitions objects in your bucket to appropriate storage classes based on each object's access pattern.

    TerminalStorageClass string

    The storage class that objects in the bucket eventually transition to if they are not read for a certain length of time. Supported values include: NEARLINE, ARCHIVE.

    enabled Boolean

    While set to true, autoclass automatically transitions objects in your bucket to appropriate storage classes based on each object's access pattern.

    terminalStorageClass String

    The storage class that objects in the bucket eventually transition to if they are not read for a certain length of time. Supported values include: NEARLINE, ARCHIVE.

    enabled boolean

    While set to true, autoclass automatically transitions objects in your bucket to appropriate storage classes based on each object's access pattern.

    terminalStorageClass string

    The storage class that objects in the bucket eventually transition to if they are not read for a certain length of time. Supported values include: NEARLINE, ARCHIVE.

    enabled bool

    While set to true, autoclass automatically transitions objects in your bucket to appropriate storage classes based on each object's access pattern.

    terminal_storage_class str

    The storage class that objects in the bucket eventually transition to if they are not read for a certain length of time. Supported values include: NEARLINE, ARCHIVE.

    enabled Boolean

    While set to true, autoclass automatically transitions objects in your bucket to appropriate storage classes based on each object's access pattern.

    terminalStorageClass String

    The storage class that objects in the bucket eventually transition to if they are not read for a certain length of time. Supported values include: NEARLINE, ARCHIVE.

    BucketCor, BucketCorArgs

    MaxAgeSeconds int

    The value, in seconds, to return in the Access-Control-Max-Age header used in preflight responses.

    Methods List<string>

    The list of HTTP methods on which to include CORS response headers, (GET, OPTIONS, POST, etc) Note: "*" is permitted in the list of methods, and means "any method".

    Origins List<string>

    The list of Origins eligible to receive CORS response headers. Note: "*" is permitted in the list of origins, and means "any Origin".

    ResponseHeaders List<string>

    The list of HTTP headers other than the simple response headers to give permission for the user-agent to share across domains.

    MaxAgeSeconds int

    The value, in seconds, to return in the Access-Control-Max-Age header used in preflight responses.

    Methods []string

    The list of HTTP methods on which to include CORS response headers, (GET, OPTIONS, POST, etc) Note: "*" is permitted in the list of methods, and means "any method".

    Origins []string

    The list of Origins eligible to receive CORS response headers. Note: "*" is permitted in the list of origins, and means "any Origin".

    ResponseHeaders []string

    The list of HTTP headers other than the simple response headers to give permission for the user-agent to share across domains.

    maxAgeSeconds Integer

    The value, in seconds, to return in the Access-Control-Max-Age header used in preflight responses.

    methods List<String>

    The list of HTTP methods on which to include CORS response headers, (GET, OPTIONS, POST, etc) Note: "*" is permitted in the list of methods, and means "any method".

    origins List<String>

    The list of Origins eligible to receive CORS response headers. Note: "*" is permitted in the list of origins, and means "any Origin".

    responseHeaders List<String>

    The list of HTTP headers other than the simple response headers to give permission for the user-agent to share across domains.

    maxAgeSeconds number

    The value, in seconds, to return in the Access-Control-Max-Age header used in preflight responses.

    methods string[]

    The list of HTTP methods on which to include CORS response headers, (GET, OPTIONS, POST, etc) Note: "*" is permitted in the list of methods, and means "any method".

    origins string[]

    The list of Origins eligible to receive CORS response headers. Note: "*" is permitted in the list of origins, and means "any Origin".

    responseHeaders string[]

    The list of HTTP headers other than the simple response headers to give permission for the user-agent to share across domains.

    max_age_seconds int

    The value, in seconds, to return in the Access-Control-Max-Age header used in preflight responses.

    methods Sequence[str]

    The list of HTTP methods on which to include CORS response headers, (GET, OPTIONS, POST, etc) Note: "*" is permitted in the list of methods, and means "any method".

    origins Sequence[str]

    The list of Origins eligible to receive CORS response headers. Note: "*" is permitted in the list of origins, and means "any Origin".

    response_headers Sequence[str]

    The list of HTTP headers other than the simple response headers to give permission for the user-agent to share across domains.

    maxAgeSeconds Number

    The value, in seconds, to return in the Access-Control-Max-Age header used in preflight responses.

    methods List<String>

    The list of HTTP methods on which to include CORS response headers, (GET, OPTIONS, POST, etc) Note: "*" is permitted in the list of methods, and means "any method".

    origins List<String>

    The list of Origins eligible to receive CORS response headers. Note: "*" is permitted in the list of origins, and means "any Origin".

    responseHeaders List<String>

    The list of HTTP headers other than the simple response headers to give permission for the user-agent to share across domains.

    BucketCustomPlacementConfig, BucketCustomPlacementConfigArgs

    DataLocations List<string>

    The list of individual regions that comprise a dual-region bucket. See Cloud Storage bucket locations for a list of acceptable regions. Note: If any of the data_locations changes, it will recreate the bucket.

    DataLocations []string

    The list of individual regions that comprise a dual-region bucket. See Cloud Storage bucket locations for a list of acceptable regions. Note: If any of the data_locations changes, it will recreate the bucket.

    dataLocations List<String>

    The list of individual regions that comprise a dual-region bucket. See Cloud Storage bucket locations for a list of acceptable regions. Note: If any of the data_locations changes, it will recreate the bucket.

    dataLocations string[]

    The list of individual regions that comprise a dual-region bucket. See Cloud Storage bucket locations for a list of acceptable regions. Note: If any of the data_locations changes, it will recreate the bucket.

    data_locations Sequence[str]

    The list of individual regions that comprise a dual-region bucket. See Cloud Storage bucket locations for a list of acceptable regions. Note: If any of the data_locations changes, it will recreate the bucket.

    dataLocations List<String>

    The list of individual regions that comprise a dual-region bucket. See Cloud Storage bucket locations for a list of acceptable regions. Note: If any of the data_locations changes, it will recreate the bucket.

    BucketEncryption, BucketEncryptionArgs

    DefaultKmsKeyName string

    The id of a Cloud KMS key that will be used to encrypt objects inserted into this bucket, if no encryption method is specified. You must pay attention to whether the crypto key is available in the location that this bucket is created in. See the docs for more details.

    As per the docs for customer-managed encryption keys, the IAM policy for the specified key must permit the automatic Google Cloud Storage service account for the bucket's project to use the specified key for encryption and decryption operations. Although the service account email address follows a well-known format, the service account is created on-demand and may not necessarily exist for your project until a relevant action has occurred which triggers its creation. You should use the gcp.storage.getProjectServiceAccount data source to obtain the email address for the service account when configuring IAM policy on the Cloud KMS key. This data source calls an API which creates the account if required, ensuring your provider applies cleanly and repeatedly irrespective of the state of the project. You should take care for race conditions when the same provider manages IAM policy on the Cloud KMS crypto key. See the data source page for more details.

    DefaultKmsKeyName string

    The id of a Cloud KMS key that will be used to encrypt objects inserted into this bucket, if no encryption method is specified. You must pay attention to whether the crypto key is available in the location that this bucket is created in. See the docs for more details.

    As per the docs for customer-managed encryption keys, the IAM policy for the specified key must permit the automatic Google Cloud Storage service account for the bucket's project to use the specified key for encryption and decryption operations. Although the service account email address follows a well-known format, the service account is created on-demand and may not necessarily exist for your project until a relevant action has occurred which triggers its creation. You should use the gcp.storage.getProjectServiceAccount data source to obtain the email address for the service account when configuring IAM policy on the Cloud KMS key. This data source calls an API which creates the account if required, ensuring your provider applies cleanly and repeatedly irrespective of the state of the project. You should take care for race conditions when the same provider manages IAM policy on the Cloud KMS crypto key. See the data source page for more details.

    defaultKmsKeyName String

    The id of a Cloud KMS key that will be used to encrypt objects inserted into this bucket, if no encryption method is specified. You must pay attention to whether the crypto key is available in the location that this bucket is created in. See the docs for more details.

    As per the docs for customer-managed encryption keys, the IAM policy for the specified key must permit the automatic Google Cloud Storage service account for the bucket's project to use the specified key for encryption and decryption operations. Although the service account email address follows a well-known format, the service account is created on-demand and may not necessarily exist for your project until a relevant action has occurred which triggers its creation. You should use the gcp.storage.getProjectServiceAccount data source to obtain the email address for the service account when configuring IAM policy on the Cloud KMS key. This data source calls an API which creates the account if required, ensuring your provider applies cleanly and repeatedly irrespective of the state of the project. You should take care for race conditions when the same provider manages IAM policy on the Cloud KMS crypto key. See the data source page for more details.

    defaultKmsKeyName string

    The id of a Cloud KMS key that will be used to encrypt objects inserted into this bucket, if no encryption method is specified. You must pay attention to whether the crypto key is available in the location that this bucket is created in. See the docs for more details.

    As per the docs for customer-managed encryption keys, the IAM policy for the specified key must permit the automatic Google Cloud Storage service account for the bucket's project to use the specified key for encryption and decryption operations. Although the service account email address follows a well-known format, the service account is created on-demand and may not necessarily exist for your project until a relevant action has occurred which triggers its creation. You should use the gcp.storage.getProjectServiceAccount data source to obtain the email address for the service account when configuring IAM policy on the Cloud KMS key. This data source calls an API which creates the account if required, ensuring your provider applies cleanly and repeatedly irrespective of the state of the project. You should take care for race conditions when the same provider manages IAM policy on the Cloud KMS crypto key. See the data source page for more details.

    default_kms_key_name str

    The id of a Cloud KMS key that will be used to encrypt objects inserted into this bucket, if no encryption method is specified. You must pay attention to whether the crypto key is available in the location that this bucket is created in. See the docs for more details.

    As per the docs for customer-managed encryption keys, the IAM policy for the specified key must permit the automatic Google Cloud Storage service account for the bucket's project to use the specified key for encryption and decryption operations. Although the service account email address follows a well-known format, the service account is created on-demand and may not necessarily exist for your project until a relevant action has occurred which triggers its creation. You should use the gcp.storage.getProjectServiceAccount data source to obtain the email address for the service account when configuring IAM policy on the Cloud KMS key. This data source calls an API which creates the account if required, ensuring your provider applies cleanly and repeatedly irrespective of the state of the project. You should take care for race conditions when the same provider manages IAM policy on the Cloud KMS crypto key. See the data source page for more details.

    defaultKmsKeyName String

    The id of a Cloud KMS key that will be used to encrypt objects inserted into this bucket, if no encryption method is specified. You must pay attention to whether the crypto key is available in the location that this bucket is created in. See the docs for more details.

    As per the docs for customer-managed encryption keys, the IAM policy for the specified key must permit the automatic Google Cloud Storage service account for the bucket's project to use the specified key for encryption and decryption operations. Although the service account email address follows a well-known format, the service account is created on-demand and may not necessarily exist for your project until a relevant action has occurred which triggers its creation. You should use the gcp.storage.getProjectServiceAccount data source to obtain the email address for the service account when configuring IAM policy on the Cloud KMS key. This data source calls an API which creates the account if required, ensuring your provider applies cleanly and repeatedly irrespective of the state of the project. You should take care for race conditions when the same provider manages IAM policy on the Cloud KMS crypto key. See the data source page for more details.

    BucketLifecycleRule, BucketLifecycleRuleArgs

    Action BucketLifecycleRuleAction

    The Lifecycle Rule's action configuration. A single block of this type is supported. Structure is documented below.

    Condition BucketLifecycleRuleCondition

    The Lifecycle Rule's condition configuration. A single block of this type is supported. Structure is documented below.

    Action BucketLifecycleRuleAction

    The Lifecycle Rule's action configuration. A single block of this type is supported. Structure is documented below.

    Condition BucketLifecycleRuleCondition

    The Lifecycle Rule's condition configuration. A single block of this type is supported. Structure is documented below.

    action BucketLifecycleRuleAction

    The Lifecycle Rule's action configuration. A single block of this type is supported. Structure is documented below.

    condition BucketLifecycleRuleCondition

    The Lifecycle Rule's condition configuration. A single block of this type is supported. Structure is documented below.

    action BucketLifecycleRuleAction

    The Lifecycle Rule's action configuration. A single block of this type is supported. Structure is documented below.

    condition BucketLifecycleRuleCondition

    The Lifecycle Rule's condition configuration. A single block of this type is supported. Structure is documented below.

    action BucketLifecycleRuleAction

    The Lifecycle Rule's action configuration. A single block of this type is supported. Structure is documented below.

    condition BucketLifecycleRuleCondition

    The Lifecycle Rule's condition configuration. A single block of this type is supported. Structure is documented below.

    action Property Map

    The Lifecycle Rule's action configuration. A single block of this type is supported. Structure is documented below.

    condition Property Map

    The Lifecycle Rule's condition configuration. A single block of this type is supported. Structure is documented below.

    BucketLifecycleRuleAction, BucketLifecycleRuleActionArgs

    Type string

    The type of the action of this Lifecycle Rule. Supported values include: Delete, SetStorageClass and AbortIncompleteMultipartUpload.

    StorageClass string

    The target Storage Class of objects affected by this Lifecycle Rule. Supported values include: STANDARD, MULTI_REGIONAL, REGIONAL, NEARLINE, COLDLINE, ARCHIVE.

    Type string

    The type of the action of this Lifecycle Rule. Supported values include: Delete, SetStorageClass and AbortIncompleteMultipartUpload.

    StorageClass string

    The target Storage Class of objects affected by this Lifecycle Rule. Supported values include: STANDARD, MULTI_REGIONAL, REGIONAL, NEARLINE, COLDLINE, ARCHIVE.

    type String

    The type of the action of this Lifecycle Rule. Supported values include: Delete, SetStorageClass and AbortIncompleteMultipartUpload.

    storageClass String

    The target Storage Class of objects affected by this Lifecycle Rule. Supported values include: STANDARD, MULTI_REGIONAL, REGIONAL, NEARLINE, COLDLINE, ARCHIVE.

    type string

    The type of the action of this Lifecycle Rule. Supported values include: Delete, SetStorageClass and AbortIncompleteMultipartUpload.

    storageClass string

    The target Storage Class of objects affected by this Lifecycle Rule. Supported values include: STANDARD, MULTI_REGIONAL, REGIONAL, NEARLINE, COLDLINE, ARCHIVE.

    type str

    The type of the action of this Lifecycle Rule. Supported values include: Delete, SetStorageClass and AbortIncompleteMultipartUpload.

    storage_class str

    The target Storage Class of objects affected by this Lifecycle Rule. Supported values include: STANDARD, MULTI_REGIONAL, REGIONAL, NEARLINE, COLDLINE, ARCHIVE.

    type String

    The type of the action of this Lifecycle Rule. Supported values include: Delete, SetStorageClass and AbortIncompleteMultipartUpload.

    storageClass String

    The target Storage Class of objects affected by this Lifecycle Rule. Supported values include: STANDARD, MULTI_REGIONAL, REGIONAL, NEARLINE, COLDLINE, ARCHIVE.

    BucketLifecycleRuleCondition, BucketLifecycleRuleConditionArgs

    Age int

    Minimum age of an object in days to satisfy this condition.

    CreatedBefore string

    A date in the RFC 3339 format YYYY-MM-DD. This condition is satisfied when an object is created before midnight of the specified date in UTC.

    CustomTimeBefore string

    A date in the RFC 3339 format YYYY-MM-DD. This condition is satisfied when the customTime metadata for the object is set to an earlier date than the date used in this lifecycle condition.

    DaysSinceCustomTime int

    Days since the date set in the customTime metadata for the object. This condition is satisfied when the current date and time is at least the specified number of days after the customTime.

    DaysSinceNoncurrentTime int

    Relevant only for versioned objects. Number of days elapsed since the noncurrent timestamp of an object.

    MatchesPrefixes List<string>

    One or more matching name prefixes to satisfy this condition.

    MatchesStorageClasses List<string>

    Storage Class of objects to satisfy this condition. Supported values include: STANDARD, MULTI_REGIONAL, REGIONAL, NEARLINE, COLDLINE, ARCHIVE, DURABLE_REDUCED_AVAILABILITY.

    MatchesSuffixes List<string>

    One or more matching name suffixes to satisfy this condition.

    NoncurrentTimeBefore string

    Relevant only for versioned objects. The date in RFC 3339 (e.g. 2017-06-13) when the object became nonconcurrent.

    NumNewerVersions int

    Relevant only for versioned objects. The number of newer versions of an object to satisfy this condition.

    WithState string

    Match to live and/or archived objects. Unversioned buckets have only live objects. Supported values include: "LIVE", "ARCHIVED", "ANY".

    Age int

    Minimum age of an object in days to satisfy this condition.

    CreatedBefore string

    A date in the RFC 3339 format YYYY-MM-DD. This condition is satisfied when an object is created before midnight of the specified date in UTC.

    CustomTimeBefore string

    A date in the RFC 3339 format YYYY-MM-DD. This condition is satisfied when the customTime metadata for the object is set to an earlier date than the date used in this lifecycle condition.

    DaysSinceCustomTime int

    Days since the date set in the customTime metadata for the object. This condition is satisfied when the current date and time is at least the specified number of days after the customTime.

    DaysSinceNoncurrentTime int

    Relevant only for versioned objects. Number of days elapsed since the noncurrent timestamp of an object.

    MatchesPrefixes []string

    One or more matching name prefixes to satisfy this condition.

    MatchesStorageClasses []string

    Storage Class of objects to satisfy this condition. Supported values include: STANDARD, MULTI_REGIONAL, REGIONAL, NEARLINE, COLDLINE, ARCHIVE, DURABLE_REDUCED_AVAILABILITY.

    MatchesSuffixes []string

    One or more matching name suffixes to satisfy this condition.

    NoncurrentTimeBefore string

    Relevant only for versioned objects. The date in RFC 3339 (e.g. 2017-06-13) when the object became nonconcurrent.

    NumNewerVersions int

    Relevant only for versioned objects. The number of newer versions of an object to satisfy this condition.

    WithState string

    Match to live and/or archived objects. Unversioned buckets have only live objects. Supported values include: "LIVE", "ARCHIVED", "ANY".

    age Integer

    Minimum age of an object in days to satisfy this condition.

    createdBefore String

    A date in the RFC 3339 format YYYY-MM-DD. This condition is satisfied when an object is created before midnight of the specified date in UTC.

    customTimeBefore String

    A date in the RFC 3339 format YYYY-MM-DD. This condition is satisfied when the customTime metadata for the object is set to an earlier date than the date used in this lifecycle condition.

    daysSinceCustomTime Integer

    Days since the date set in the customTime metadata for the object. This condition is satisfied when the current date and time is at least the specified number of days after the customTime.

    daysSinceNoncurrentTime Integer

    Relevant only for versioned objects. Number of days elapsed since the noncurrent timestamp of an object.

    matchesPrefixes List<String>

    One or more matching name prefixes to satisfy this condition.

    matchesStorageClasses List<String>

    Storage Class of objects to satisfy this condition. Supported values include: STANDARD, MULTI_REGIONAL, REGIONAL, NEARLINE, COLDLINE, ARCHIVE, DURABLE_REDUCED_AVAILABILITY.

    matchesSuffixes List<String>

    One or more matching name suffixes to satisfy this condition.

    noncurrentTimeBefore String

    Relevant only for versioned objects. The date in RFC 3339 (e.g. 2017-06-13) when the object became nonconcurrent.

    numNewerVersions Integer

    Relevant only for versioned objects. The number of newer versions of an object to satisfy this condition.

    withState String

    Match to live and/or archived objects. Unversioned buckets have only live objects. Supported values include: "LIVE", "ARCHIVED", "ANY".

    age number

    Minimum age of an object in days to satisfy this condition.

    createdBefore string

    A date in the RFC 3339 format YYYY-MM-DD. This condition is satisfied when an object is created before midnight of the specified date in UTC.

    customTimeBefore string

    A date in the RFC 3339 format YYYY-MM-DD. This condition is satisfied when the customTime metadata for the object is set to an earlier date than the date used in this lifecycle condition.

    daysSinceCustomTime number

    Days since the date set in the customTime metadata for the object. This condition is satisfied when the current date and time is at least the specified number of days after the customTime.

    daysSinceNoncurrentTime number

    Relevant only for versioned objects. Number of days elapsed since the noncurrent timestamp of an object.

    matchesPrefixes string[]

    One or more matching name prefixes to satisfy this condition.

    matchesStorageClasses string[]

    Storage Class of objects to satisfy this condition. Supported values include: STANDARD, MULTI_REGIONAL, REGIONAL, NEARLINE, COLDLINE, ARCHIVE, DURABLE_REDUCED_AVAILABILITY.

    matchesSuffixes string[]

    One or more matching name suffixes to satisfy this condition.

    noncurrentTimeBefore string

    Relevant only for versioned objects. The date in RFC 3339 (e.g. 2017-06-13) when the object became nonconcurrent.

    numNewerVersions number

    Relevant only for versioned objects. The number of newer versions of an object to satisfy this condition.

    withState string

    Match to live and/or archived objects. Unversioned buckets have only live objects. Supported values include: "LIVE", "ARCHIVED", "ANY".

    age int

    Minimum age of an object in days to satisfy this condition.

    created_before str

    A date in the RFC 3339 format YYYY-MM-DD. This condition is satisfied when an object is created before midnight of the specified date in UTC.

    custom_time_before str

    A date in the RFC 3339 format YYYY-MM-DD. This condition is satisfied when the customTime metadata for the object is set to an earlier date than the date used in this lifecycle condition.

    days_since_custom_time int

    Days since the date set in the customTime metadata for the object. This condition is satisfied when the current date and time is at least the specified number of days after the customTime.

    days_since_noncurrent_time int

    Relevant only for versioned objects. Number of days elapsed since the noncurrent timestamp of an object.

    matches_prefixes Sequence[str]

    One or more matching name prefixes to satisfy this condition.

    matches_storage_classes Sequence[str]

    Storage Class of objects to satisfy this condition. Supported values include: STANDARD, MULTI_REGIONAL, REGIONAL, NEARLINE, COLDLINE, ARCHIVE, DURABLE_REDUCED_AVAILABILITY.

    matches_suffixes Sequence[str]

    One or more matching name suffixes to satisfy this condition.

    noncurrent_time_before str

    Relevant only for versioned objects. The date in RFC 3339 (e.g. 2017-06-13) when the object became nonconcurrent.

    num_newer_versions int

    Relevant only for versioned objects. The number of newer versions of an object to satisfy this condition.

    with_state str

    Match to live and/or archived objects. Unversioned buckets have only live objects. Supported values include: "LIVE", "ARCHIVED", "ANY".

    age Number

    Minimum age of an object in days to satisfy this condition.

    createdBefore String

    A date in the RFC 3339 format YYYY-MM-DD. This condition is satisfied when an object is created before midnight of the specified date in UTC.

    customTimeBefore String

    A date in the RFC 3339 format YYYY-MM-DD. This condition is satisfied when the customTime metadata for the object is set to an earlier date than the date used in this lifecycle condition.

    daysSinceCustomTime Number

    Days since the date set in the customTime metadata for the object. This condition is satisfied when the current date and time is at least the specified number of days after the customTime.

    daysSinceNoncurrentTime Number

    Relevant only for versioned objects. Number of days elapsed since the noncurrent timestamp of an object.

    matchesPrefixes List<String>

    One or more matching name prefixes to satisfy this condition.

    matchesStorageClasses List<String>

    Storage Class of objects to satisfy this condition. Supported values include: STANDARD, MULTI_REGIONAL, REGIONAL, NEARLINE, COLDLINE, ARCHIVE, DURABLE_REDUCED_AVAILABILITY.

    matchesSuffixes List<String>

    One or more matching name suffixes to satisfy this condition.

    noncurrentTimeBefore String

    Relevant only for versioned objects. The date in RFC 3339 (e.g. 2017-06-13) when the object became nonconcurrent.

    numNewerVersions Number

    Relevant only for versioned objects. The number of newer versions of an object to satisfy this condition.

    withState String

    Match to live and/or archived objects. Unversioned buckets have only live objects. Supported values include: "LIVE", "ARCHIVED", "ANY".

    BucketLogging, BucketLoggingArgs

    LogBucket string

    The bucket that will receive log objects.

    LogObjectPrefix string

    The object prefix for log objects. If it's not provided, by default GCS sets this to this bucket's name.

    LogBucket string

    The bucket that will receive log objects.

    LogObjectPrefix string

    The object prefix for log objects. If it's not provided, by default GCS sets this to this bucket's name.

    logBucket String

    The bucket that will receive log objects.

    logObjectPrefix String

    The object prefix for log objects. If it's not provided, by default GCS sets this to this bucket's name.

    logBucket string

    The bucket that will receive log objects.

    logObjectPrefix string

    The object prefix for log objects. If it's not provided, by default GCS sets this to this bucket's name.

    log_bucket str

    The bucket that will receive log objects.

    log_object_prefix str

    The object prefix for log objects. If it's not provided, by default GCS sets this to this bucket's name.

    logBucket String

    The bucket that will receive log objects.

    logObjectPrefix String

    The object prefix for log objects. If it's not provided, by default GCS sets this to this bucket's name.

    BucketRetentionPolicy, BucketRetentionPolicyArgs

    RetentionPeriod int

    The period of time, in seconds, that objects in the bucket must be retained and cannot be deleted, overwritten, or archived. The value must be less than 2,147,483,647 seconds.

    IsLocked bool

    If set to true, the bucket will be locked and permanently restrict edits to the bucket's retention policy. Caution: Locking a bucket is an irreversible action.

    RetentionPeriod int

    The period of time, in seconds, that objects in the bucket must be retained and cannot be deleted, overwritten, or archived. The value must be less than 2,147,483,647 seconds.

    IsLocked bool

    If set to true, the bucket will be locked and permanently restrict edits to the bucket's retention policy. Caution: Locking a bucket is an irreversible action.

    retentionPeriod Integer

    The period of time, in seconds, that objects in the bucket must be retained and cannot be deleted, overwritten, or archived. The value must be less than 2,147,483,647 seconds.

    isLocked Boolean

    If set to true, the bucket will be locked and permanently restrict edits to the bucket's retention policy. Caution: Locking a bucket is an irreversible action.

    retentionPeriod number

    The period of time, in seconds, that objects in the bucket must be retained and cannot be deleted, overwritten, or archived. The value must be less than 2,147,483,647 seconds.

    isLocked boolean

    If set to true, the bucket will be locked and permanently restrict edits to the bucket's retention policy. Caution: Locking a bucket is an irreversible action.

    retention_period int

    The period of time, in seconds, that objects in the bucket must be retained and cannot be deleted, overwritten, or archived. The value must be less than 2,147,483,647 seconds.

    is_locked bool

    If set to true, the bucket will be locked and permanently restrict edits to the bucket's retention policy. Caution: Locking a bucket is an irreversible action.

    retentionPeriod Number

    The period of time, in seconds, that objects in the bucket must be retained and cannot be deleted, overwritten, or archived. The value must be less than 2,147,483,647 seconds.

    isLocked Boolean

    If set to true, the bucket will be locked and permanently restrict edits to the bucket's retention policy. Caution: Locking a bucket is an irreversible action.

    BucketVersioning, BucketVersioningArgs

    Enabled bool

    While set to true, versioning is fully enabled for this bucket.

    Enabled bool

    While set to true, versioning is fully enabled for this bucket.

    enabled Boolean

    While set to true, versioning is fully enabled for this bucket.

    enabled boolean

    While set to true, versioning is fully enabled for this bucket.

    enabled bool

    While set to true, versioning is fully enabled for this bucket.

    enabled Boolean

    While set to true, versioning is fully enabled for this bucket.

    BucketWebsite, BucketWebsiteArgs

    MainPageSuffix string

    Behaves as the bucket's directory index where missing objects are treated as potential directories.

    NotFoundPage string

    The custom object to return when a requested resource is not found.

    MainPageSuffix string

    Behaves as the bucket's directory index where missing objects are treated as potential directories.

    NotFoundPage string

    The custom object to return when a requested resource is not found.

    mainPageSuffix String

    Behaves as the bucket's directory index where missing objects are treated as potential directories.

    notFoundPage String

    The custom object to return when a requested resource is not found.

    mainPageSuffix string

    Behaves as the bucket's directory index where missing objects are treated as potential directories.

    notFoundPage string

    The custom object to return when a requested resource is not found.

    main_page_suffix str

    Behaves as the bucket's directory index where missing objects are treated as potential directories.

    not_found_page str

    The custom object to return when a requested resource is not found.

    mainPageSuffix String

    Behaves as the bucket's directory index where missing objects are treated as potential directories.

    notFoundPage String

    The custom object to return when a requested resource is not found.

    Import

    Storage buckets can be imported using the name or

    project/name. If the project is not passed to the import command it will be inferred from the provider block or environment variables. If it cannot be inferred it will be queried from the Compute API (this will fail if the API is not enabled). * {{project_id}}/{{bucket}} * {{bucket}} In Terraform v1.5.0 and later, use an import block to import Storage buckets using one of the formats above. For exampletf import {

    id = “{{project_id}}/{{bucket}}”

    to = google_storage_bucket.default }

     $ pulumi import gcp:storage/bucket:Bucket When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), Storage buckets can be imported using one of the formats above. For example
    
     $ pulumi import gcp:storage/bucket:Bucket default {{bucket}}
    
     $ pulumi import gcp:storage/bucket:Bucket default {{project_id}}/{{bucket}}
    

    false in state. If you’ve set it to true in config, run pulumi up to update the value set in state. If you delete this resource before updating the value, objects in the bucket will not be destroyed.

    Package Details

    Repository
    Google Cloud (GCP) Classic pulumi/pulumi-gcp
    License
    Apache-2.0
    Notes

    This Pulumi package is based on the google-beta Terraform Provider.

    gcp logo
    Google Cloud Classic v7.2.1 published on Wednesday, Nov 22, 2023 by Pulumi