gcp.storage.Bucket
Explore with Pulumi AI
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
Bucket
Autoclass The bucket's Autoclass configuration. Structure is documented below.
- Cors
List<Bucket
Cor> The bucket's Cross-Origin Resource Sharing (CORS) configuration. Multiple blocks of this type are permitted. Structure is documented below.
- Custom
Placement BucketConfig Custom Placement Config 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 boolBased Hold Whether or not to automatically apply an eventBasedHold to new objects added to the bucket.
- Enable
Object boolRetention Enables object retention on a storage bucket.
- Encryption
Bucket
Encryption 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 Dictionary<string, string>
A map of key/value label pairs to assign to the bucket.
- Lifecycle
Rules List<BucketLifecycle Rule> The bucket's Lifecycle Rules configuration. Multiple blocks of this type are permitted. Structure is documented below.
- Logging
Bucket
Logging 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.
- Public
Access stringPrevention 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 BucketRetention Policy Configuration of the bucket's data retention policy for how long objects in the bucket should be retained. Structure is documented below.
- Storage
Class string The Storage Class of the new bucket. Supported values include:
STANDARD
,MULTI_REGIONAL
,REGIONAL
,NEARLINE
,COLDLINE
,ARCHIVE
.- Uniform
Bucket boolLevel Access Enables Uniform bucket-level access access to a bucket.
- Versioning
Bucket
Versioning The bucket's Versioning configuration. Structure is documented below.
- Website
Bucket
Website Configuration if the bucket acts as a website. Structure is documented below.
- Location string
The GCS location.
- Autoclass
Bucket
Autoclass Args The bucket's Autoclass configuration. Structure is documented below.
- Cors
[]Bucket
Cor Args The bucket's Cross-Origin Resource Sharing (CORS) configuration. Multiple blocks of this type are permitted. Structure is documented below.
- Custom
Placement BucketConfig Custom Placement Config Args 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 boolBased Hold Whether or not to automatically apply an eventBasedHold to new objects added to the bucket.
- Enable
Object boolRetention Enables object retention on a storage bucket.
- Encryption
Bucket
Encryption Args 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 map[string]string
A map of key/value label pairs to assign to the bucket.
- Lifecycle
Rules []BucketLifecycle Rule Args The bucket's Lifecycle Rules configuration. Multiple blocks of this type are permitted. Structure is documented below.
- Logging
Bucket
Logging Args 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.
- Public
Access stringPrevention 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 BucketRetention Policy Args Configuration of the bucket's data retention policy for how long objects in the bucket should be retained. Structure is documented below.
- Storage
Class string The Storage Class of the new bucket. Supported values include:
STANDARD
,MULTI_REGIONAL
,REGIONAL
,NEARLINE
,COLDLINE
,ARCHIVE
.- Uniform
Bucket boolLevel Access Enables Uniform bucket-level access access to a bucket.
- Versioning
Bucket
Versioning Args The bucket's Versioning configuration. Structure is documented below.
- Website
Bucket
Website Args Configuration if the bucket acts as a website. Structure is documented below.
- location String
The GCS location.
- autoclass
Bucket
Autoclass The bucket's Autoclass configuration. Structure is documented below.
- cors
List<Bucket
Cor> The bucket's Cross-Origin Resource Sharing (CORS) configuration. Multiple blocks of this type are permitted. Structure is documented below.
- custom
Placement BucketConfig Custom Placement Config 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 BooleanBased Hold Whether or not to automatically apply an eventBasedHold to new objects added to the bucket.
- enable
Object BooleanRetention Enables object retention on a storage bucket.
- encryption
Bucket
Encryption The bucket's encryption configuration. Structure is documented below.
- force
Destroy 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.
- lifecycle
Rules List<BucketLifecycle Rule> The bucket's Lifecycle Rules configuration. Multiple blocks of this type are permitted. Structure is documented below.
- logging
Bucket
Logging 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.
- public
Access StringPrevention 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 Boolean Enables Requester Pays on a storage bucket.
- retention
Policy BucketRetention Policy Configuration of the bucket's data retention policy for how long objects in the bucket should be retained. Structure is documented below.
- storage
Class String The Storage Class of the new bucket. Supported values include:
STANDARD
,MULTI_REGIONAL
,REGIONAL
,NEARLINE
,COLDLINE
,ARCHIVE
.- uniform
Bucket BooleanLevel Access Enables Uniform bucket-level access access to a bucket.
- versioning
Bucket
Versioning The bucket's Versioning configuration. Structure is documented below.
- website
Bucket
Website Configuration if the bucket acts as a website. Structure is documented below.
- location string
The GCS location.
- autoclass
Bucket
Autoclass The bucket's Autoclass configuration. Structure is documented below.
- cors
Bucket
Cor[] The bucket's Cross-Origin Resource Sharing (CORS) configuration. Multiple blocks of this type are permitted. Structure is documented below.
- custom
Placement BucketConfig Custom Placement Config 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 booleanBased Hold Whether or not to automatically apply an eventBasedHold to new objects added to the bucket.
- enable
Object booleanRetention Enables object retention on a storage bucket.
- encryption
Bucket
Encryption The bucket's encryption configuration. Structure is documented below.
- force
Destroy 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.
- lifecycle
Rules BucketLifecycle Rule[] The bucket's Lifecycle Rules configuration. Multiple blocks of this type are permitted. Structure is documented below.
- logging
Bucket
Logging 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.
- public
Access stringPrevention 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 boolean Enables Requester Pays on a storage bucket.
- retention
Policy BucketRetention Policy Configuration of the bucket's data retention policy for how long objects in the bucket should be retained. Structure is documented below.
- storage
Class string The Storage Class of the new bucket. Supported values include:
STANDARD
,MULTI_REGIONAL
,REGIONAL
,NEARLINE
,COLDLINE
,ARCHIVE
.- uniform
Bucket booleanLevel Access Enables Uniform bucket-level access access to a bucket.
- versioning
Bucket
Versioning The bucket's Versioning configuration. Structure is documented below.
- website
Bucket
Website Configuration if the bucket acts as a website. Structure is documented below.
- location str
The GCS location.
- autoclass
Bucket
Autoclass Args The bucket's Autoclass configuration. Structure is documented below.
- cors
Sequence[Bucket
Cor Args] The bucket's Cross-Origin Resource Sharing (CORS) configuration. Multiple blocks of this type are permitted. Structure is documented below.
- custom_
placement_ Bucketconfig Custom Placement Config Args 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_ boolbased_ hold Whether or not to automatically apply an eventBasedHold to new objects added to the bucket.
- enable_
object_ boolretention Enables object retention on a storage bucket.
- encryption
Bucket
Encryption Args 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[BucketLifecycle Rule Args] The bucket's Lifecycle Rules configuration. Multiple blocks of this type are permitted. Structure is documented below.
- logging
Bucket
Logging Args 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_ strprevention 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 BucketRetention Policy Args 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_ boollevel_ access Enables Uniform bucket-level access access to a bucket.
- versioning
Bucket
Versioning Args The bucket's Versioning configuration. Structure is documented below.
- website
Bucket
Website Args 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.
- custom
Placement Property MapConfig 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 BooleanBased Hold Whether or not to automatically apply an eventBasedHold to new objects added to the bucket.
- enable
Object BooleanRetention Enables object retention on a storage bucket.
- encryption Property Map
The bucket's encryption configuration. Structure is documented below.
- force
Destroy 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.
- lifecycle
Rules 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.
- public
Access StringPrevention 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 Boolean Enables Requester Pays on a storage bucket.
- retention
Policy Property Map Configuration of the bucket's data retention policy for how long objects in the bucket should be retained. Structure is documented below.
- storage
Class String The Storage Class of the new bucket. Supported values include:
STANDARD
,MULTI_REGIONAL
,REGIONAL
,NEARLINE
,COLDLINE
,ARCHIVE
.- uniform
Bucket BooleanLevel Access 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:
- Effective
Labels 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.
- Pulumi
Labels Dictionary<string, string> The combination of labels configured directly on the resource and default labels configured on the provider.
- Self
Link string The URI of the created resource.
- Url string
The base URL of the bucket, in the format
gs://<bucket-name>
.
- Effective
Labels 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.
- Pulumi
Labels map[string]string The combination of labels configured directly on the resource and default labels configured on the provider.
- Self
Link string The URI of the created resource.
- Url string
The base URL of the bucket, in the format
gs://<bucket-name>
.
- effective
Labels 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.
- pulumi
Labels Map<String,String> The combination of labels configured directly on the resource and default labels configured on the provider.
- self
Link String The URI of the created resource.
- url String
The base URL of the bucket, in the format
gs://<bucket-name>
.
- effective
Labels {[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.
- pulumi
Labels {[key: string]: string} The combination of labels configured directly on the resource and default labels configured on the provider.
- self
Link 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>
.
- effective
Labels 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.
- pulumi
Labels Map<String> The combination of labels configured directly on the resource and default labels configured on the provider.
- self
Link 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.
- Autoclass
Bucket
Autoclass The bucket's Autoclass configuration. Structure is documented below.
- Cors
List<Bucket
Cor> The bucket's Cross-Origin Resource Sharing (CORS) configuration. Multiple blocks of this type are permitted. Structure is documented below.
- Custom
Placement BucketConfig Custom Placement Config 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 boolBased Hold Whether or not to automatically apply an eventBasedHold to new objects added to the bucket.
- Effective
Labels 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.
- Enable
Object boolRetention Enables object retention on a storage bucket.
- Encryption
Bucket
Encryption 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 Dictionary<string, string>
A map of key/value label pairs to assign to the bucket.
- Lifecycle
Rules List<BucketLifecycle Rule> The bucket's Lifecycle Rules configuration. Multiple blocks of this type are permitted. Structure is documented below.
- Location string
The GCS location.
- Logging
Bucket
Logging 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.
- Public
Access stringPrevention 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 Dictionary<string, string> 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 BucketRetention Policy Configuration of the bucket's data retention policy for how long objects in the bucket should be retained. Structure is documented below.
- Self
Link string The URI of the created resource.
- Storage
Class string The Storage Class of the new bucket. Supported values include:
STANDARD
,MULTI_REGIONAL
,REGIONAL
,NEARLINE
,COLDLINE
,ARCHIVE
.- Uniform
Bucket boolLevel Access Enables Uniform bucket-level access access to a bucket.
- Url string
The base URL of the bucket, in the format
gs://<bucket-name>
.- Versioning
Bucket
Versioning The bucket's Versioning configuration. Structure is documented below.
- Website
Bucket
Website Configuration if the bucket acts as a website. Structure is documented below.
- Autoclass
Bucket
Autoclass Args The bucket's Autoclass configuration. Structure is documented below.
- Cors
[]Bucket
Cor Args The bucket's Cross-Origin Resource Sharing (CORS) configuration. Multiple blocks of this type are permitted. Structure is documented below.
- Custom
Placement BucketConfig Custom Placement Config Args 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 boolBased Hold Whether or not to automatically apply an eventBasedHold to new objects added to the bucket.
- Effective
Labels 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.
- Enable
Object boolRetention Enables object retention on a storage bucket.
- Encryption
Bucket
Encryption Args 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 map[string]string
A map of key/value label pairs to assign to the bucket.
- Lifecycle
Rules []BucketLifecycle Rule Args The bucket's Lifecycle Rules configuration. Multiple blocks of this type are permitted. Structure is documented below.
- Location string
The GCS location.
- Logging
Bucket
Logging Args 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.
- Public
Access stringPrevention 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 map[string]string 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 BucketRetention Policy Args Configuration of the bucket's data retention policy for how long objects in the bucket should be retained. Structure is documented below.
- Self
Link string The URI of the created resource.
- Storage
Class string The Storage Class of the new bucket. Supported values include:
STANDARD
,MULTI_REGIONAL
,REGIONAL
,NEARLINE
,COLDLINE
,ARCHIVE
.- Uniform
Bucket boolLevel Access Enables Uniform bucket-level access access to a bucket.
- Url string
The base URL of the bucket, in the format
gs://<bucket-name>
.- Versioning
Bucket
Versioning Args The bucket's Versioning configuration. Structure is documented below.
- Website
Bucket
Website Args Configuration if the bucket acts as a website. Structure is documented below.
- autoclass
Bucket
Autoclass The bucket's Autoclass configuration. Structure is documented below.
- cors
List<Bucket
Cor> The bucket's Cross-Origin Resource Sharing (CORS) configuration. Multiple blocks of this type are permitted. Structure is documented below.
- custom
Placement BucketConfig Custom Placement Config 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 BooleanBased Hold Whether or not to automatically apply an eventBasedHold to new objects added to the bucket.
- effective
Labels 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.
- enable
Object BooleanRetention Enables object retention on a storage bucket.
- encryption
Bucket
Encryption The bucket's encryption configuration. Structure is documented below.
- force
Destroy 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.
- lifecycle
Rules List<BucketLifecycle Rule> The bucket's Lifecycle Rules configuration. Multiple blocks of this type are permitted. Structure is documented below.
- location String
The GCS location.
- logging
Bucket
Logging 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.
- public
Access StringPrevention 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 Map<String,String> The combination of labels configured directly on the resource and default labels configured on the provider.
- requester
Pays Boolean Enables Requester Pays on a storage bucket.
- retention
Policy BucketRetention Policy Configuration of the bucket's data retention policy for how long objects in the bucket should be retained. Structure is documented below.
- self
Link String The URI of the created resource.
- storage
Class String The Storage Class of the new bucket. Supported values include:
STANDARD
,MULTI_REGIONAL
,REGIONAL
,NEARLINE
,COLDLINE
,ARCHIVE
.- uniform
Bucket BooleanLevel Access Enables Uniform bucket-level access access to a bucket.
- url String
The base URL of the bucket, in the format
gs://<bucket-name>
.- versioning
Bucket
Versioning The bucket's Versioning configuration. Structure is documented below.
- website
Bucket
Website Configuration if the bucket acts as a website. Structure is documented below.
- autoclass
Bucket
Autoclass The bucket's Autoclass configuration. Structure is documented below.
- cors
Bucket
Cor[] The bucket's Cross-Origin Resource Sharing (CORS) configuration. Multiple blocks of this type are permitted. Structure is documented below.
- custom
Placement BucketConfig Custom Placement Config 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 booleanBased Hold Whether or not to automatically apply an eventBasedHold to new objects added to the bucket.
- effective
Labels {[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.
- enable
Object booleanRetention Enables object retention on a storage bucket.
- encryption
Bucket
Encryption The bucket's encryption configuration. Structure is documented below.
- force
Destroy 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.
- lifecycle
Rules BucketLifecycle Rule[] The bucket's Lifecycle Rules configuration. Multiple blocks of this type are permitted. Structure is documented below.
- location string
The GCS location.
- logging
Bucket
Logging 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.
- public
Access stringPrevention 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 {[key: string]: string} The combination of labels configured directly on the resource and default labels configured on the provider.
- requester
Pays boolean Enables Requester Pays on a storage bucket.
- retention
Policy BucketRetention Policy Configuration of the bucket's data retention policy for how long objects in the bucket should be retained. Structure is documented below.
- self
Link string The URI of the created resource.
- storage
Class string The Storage Class of the new bucket. Supported values include:
STANDARD
,MULTI_REGIONAL
,REGIONAL
,NEARLINE
,COLDLINE
,ARCHIVE
.- uniform
Bucket booleanLevel Access Enables Uniform bucket-level access access to a bucket.
- url string
The base URL of the bucket, in the format
gs://<bucket-name>
.- versioning
Bucket
Versioning The bucket's Versioning configuration. Structure is documented below.
- website
Bucket
Website Configuration if the bucket acts as a website. Structure is documented below.
- autoclass
Bucket
Autoclass Args The bucket's Autoclass configuration. Structure is documented below.
- cors
Sequence[Bucket
Cor Args] The bucket's Cross-Origin Resource Sharing (CORS) configuration. Multiple blocks of this type are permitted. Structure is documented below.
- custom_
placement_ Bucketconfig Custom Placement Config Args 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_ boolbased_ hold 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_ boolretention Enables object retention on a storage bucket.
- encryption
Bucket
Encryption Args 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[BucketLifecycle Rule Args] The bucket's Lifecycle Rules configuration. Multiple blocks of this type are permitted. Structure is documented below.
- location str
The GCS location.
- logging
Bucket
Logging Args 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_ strprevention 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 BucketRetention Policy Args 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_ boollevel_ access Enables Uniform bucket-level access access to a bucket.
- url str
The base URL of the bucket, in the format
gs://<bucket-name>
.- versioning
Bucket
Versioning Args The bucket's Versioning configuration. Structure is documented below.
- website
Bucket
Website Args 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.
- custom
Placement Property MapConfig 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 BooleanBased Hold Whether or not to automatically apply an eventBasedHold to new objects added to the bucket.
- effective
Labels Map<String> All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Terraform, other clients and services.
- enable
Object BooleanRetention Enables object retention on a storage bucket.
- encryption Property Map
The bucket's encryption configuration. Structure is documented below.
- force
Destroy 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.
- lifecycle
Rules 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.
- public
Access StringPrevention 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 Map<String> The combination of labels configured directly on the resource and default labels configured on the provider.
- requester
Pays Boolean Enables Requester Pays on a storage bucket.
- retention
Policy Property Map Configuration of the bucket's data retention policy for how long objects in the bucket should be retained. Structure is documented below.
- self
Link String The URI of the created resource.
- storage
Class String The Storage Class of the new bucket. Supported values include:
STANDARD
,MULTI_REGIONAL
,REGIONAL
,NEARLINE
,COLDLINE
,ARCHIVE
.- uniform
Bucket BooleanLevel Access 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.- Terminal
Storage stringClass 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 stringClass 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.- terminal
Storage StringClass 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.- terminal
Storage stringClass 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_ strclass 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.- terminal
Storage StringClass 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
- Max
Age intSeconds 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".
- Response
Headers List<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 intSeconds 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".
- Response
Headers []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 IntegerSeconds 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".
- response
Headers List<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 numberSeconds 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".
- response
Headers 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_ intseconds 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.
- max
Age NumberSeconds 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".
- response
Headers 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
- Data
Locations 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.
- Data
Locations []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 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.
- data
Locations 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.
- data
Locations 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
- Default
Kms stringKey Name 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 stringKey Name 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 StringKey Name 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 stringKey Name 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_ strkey_ name 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 StringKey Name 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
Bucket
Lifecycle Rule Action The Lifecycle Rule's action configuration. A single block of this type is supported. Structure is documented below.
- Condition
Bucket
Lifecycle Rule Condition The Lifecycle Rule's condition configuration. A single block of this type is supported. Structure is documented below.
- Action
Bucket
Lifecycle Rule Action The Lifecycle Rule's action configuration. A single block of this type is supported. Structure is documented below.
- Condition
Bucket
Lifecycle Rule Condition The Lifecycle Rule's condition configuration. A single block of this type is supported. Structure is documented below.
- action
Bucket
Lifecycle Rule Action The Lifecycle Rule's action configuration. A single block of this type is supported. Structure is documented below.
- condition
Bucket
Lifecycle Rule Condition The Lifecycle Rule's condition configuration. A single block of this type is supported. Structure is documented below.
- action
Bucket
Lifecycle Rule Action The Lifecycle Rule's action configuration. A single block of this type is supported. Structure is documented below.
- condition
Bucket
Lifecycle Rule Condition The Lifecycle Rule's condition configuration. A single block of this type is supported. Structure is documented below.
- action
Bucket
Lifecycle Rule Action The Lifecycle Rule's action configuration. A single block of this type is supported. Structure is documented below.
- condition
Bucket
Lifecycle Rule Condition 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
andAbortIncompleteMultipartUpload
.- Storage
Class 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
andAbortIncompleteMultipartUpload
.- Storage
Class 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
andAbortIncompleteMultipartUpload
.- storage
Class 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
andAbortIncompleteMultipartUpload
.- storage
Class 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
andAbortIncompleteMultipartUpload
.- 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
andAbortIncompleteMultipartUpload
.- storage
Class 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.
- Created
Before 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.
- Custom
Time stringBefore 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 intCustom Time 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 thecustomTime
.- Days
Since intNoncurrent Time Relevant only for versioned objects. Number of days elapsed since the noncurrent timestamp of an object.
- Matches
Prefixes List<string> One or more matching name prefixes to satisfy this condition.
- Matches
Storage List<string>Classes Storage Class of objects to satisfy this condition. Supported values include:
STANDARD
,MULTI_REGIONAL
,REGIONAL
,NEARLINE
,COLDLINE
,ARCHIVE
,DURABLE_REDUCED_AVAILABILITY
.- Matches
Suffixes List<string> One or more matching name suffixes to satisfy this condition.
- Noncurrent
Time stringBefore Relevant only for versioned objects. The date in RFC 3339 (e.g.
2017-06-13
) when the object became nonconcurrent.- Num
Newer intVersions Relevant only for versioned objects. The number of newer versions of an object to satisfy this condition.
- With
State 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 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.
- Custom
Time stringBefore 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 intCustom Time 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 thecustomTime
.- Days
Since intNoncurrent Time Relevant only for versioned objects. Number of days elapsed since the noncurrent timestamp of an object.
- Matches
Prefixes []string One or more matching name prefixes to satisfy this condition.
- Matches
Storage []stringClasses Storage Class of objects to satisfy this condition. Supported values include:
STANDARD
,MULTI_REGIONAL
,REGIONAL
,NEARLINE
,COLDLINE
,ARCHIVE
,DURABLE_REDUCED_AVAILABILITY
.- Matches
Suffixes []string One or more matching name suffixes to satisfy this condition.
- Noncurrent
Time stringBefore Relevant only for versioned objects. The date in RFC 3339 (e.g.
2017-06-13
) when the object became nonconcurrent.- Num
Newer intVersions Relevant only for versioned objects. The number of newer versions of an object to satisfy this condition.
- With
State 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.
- created
Before 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.
- custom
Time StringBefore 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 IntegerCustom Time 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 thecustomTime
.- days
Since IntegerNoncurrent Time Relevant only for versioned objects. Number of days elapsed since the noncurrent timestamp of an object.
- matches
Prefixes List<String> One or more matching name prefixes to satisfy this condition.
- matches
Storage List<String>Classes Storage Class of objects to satisfy this condition. Supported values include:
STANDARD
,MULTI_REGIONAL
,REGIONAL
,NEARLINE
,COLDLINE
,ARCHIVE
,DURABLE_REDUCED_AVAILABILITY
.- matches
Suffixes List<String> One or more matching name suffixes to satisfy this condition.
- noncurrent
Time StringBefore Relevant only for versioned objects. The date in RFC 3339 (e.g.
2017-06-13
) when the object became nonconcurrent.- num
Newer IntegerVersions Relevant only for versioned objects. The number of newer versions of an object to satisfy this condition.
- with
State 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.
- created
Before 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.
- custom
Time stringBefore 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 numberCustom Time 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 thecustomTime
.- days
Since numberNoncurrent Time Relevant only for versioned objects. Number of days elapsed since the noncurrent timestamp of an object.
- matches
Prefixes string[] One or more matching name prefixes to satisfy this condition.
- matches
Storage string[]Classes Storage Class of objects to satisfy this condition. Supported values include:
STANDARD
,MULTI_REGIONAL
,REGIONAL
,NEARLINE
,COLDLINE
,ARCHIVE
,DURABLE_REDUCED_AVAILABILITY
.- matches
Suffixes string[] One or more matching name suffixes to satisfy this condition.
- noncurrent
Time stringBefore Relevant only for versioned objects. The date in RFC 3339 (e.g.
2017-06-13
) when the object became nonconcurrent.- num
Newer numberVersions Relevant only for versioned objects. The number of newer versions of an object to satisfy this condition.
- with
State 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_ strbefore 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_ intcustom_ time 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 thecustomTime
.- days_
since_ intnoncurrent_ time 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_ Sequence[str]classes 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_ strbefore Relevant only for versioned objects. The date in RFC 3339 (e.g.
2017-06-13
) when the object became nonconcurrent.- num_
newer_ intversions 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.
- created
Before 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.
- custom
Time StringBefore 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 NumberCustom Time 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 thecustomTime
.- days
Since NumberNoncurrent Time Relevant only for versioned objects. Number of days elapsed since the noncurrent timestamp of an object.
- matches
Prefixes List<String> One or more matching name prefixes to satisfy this condition.
- matches
Storage List<String>Classes Storage Class of objects to satisfy this condition. Supported values include:
STANDARD
,MULTI_REGIONAL
,REGIONAL
,NEARLINE
,COLDLINE
,ARCHIVE
,DURABLE_REDUCED_AVAILABILITY
.- matches
Suffixes List<String> One or more matching name suffixes to satisfy this condition.
- noncurrent
Time StringBefore Relevant only for versioned objects. The date in RFC 3339 (e.g.
2017-06-13
) when the object became nonconcurrent.- num
Newer NumberVersions Relevant only for versioned objects. The number of newer versions of an object to satisfy this condition.
- with
State String Match to live and/or archived objects. Unversioned buckets have only live objects. Supported values include:
"LIVE"
,"ARCHIVED"
,"ANY"
.
BucketLogging, BucketLoggingArgs
- Log
Bucket string The bucket that will receive log objects.
- Log
Object stringPrefix The object prefix for log objects. If it's not provided, by default GCS sets this to this bucket's name.
- Log
Bucket string The bucket that will receive log objects.
- Log
Object stringPrefix The object prefix for log objects. If it's not provided, by default GCS sets this to this bucket's name.
- log
Bucket String The bucket that will receive log objects.
- log
Object StringPrefix The object prefix for log objects. If it's not provided, by default GCS sets this to this bucket's name.
- log
Bucket string The bucket that will receive log objects.
- log
Object stringPrefix 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_ strprefix The object prefix for log objects. If it's not provided, by default GCS sets this to this bucket's name.
- log
Bucket String The bucket that will receive log objects.
- log
Object StringPrefix The object prefix for log objects. If it's not provided, by default GCS sets this to this bucket's name.
BucketRetentionPolicy, BucketRetentionPolicyArgs
- 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.
- 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.
- retention
Period 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.
- is
Locked 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 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.
- is
Locked 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.
- retention
Period 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.
- is
Locked 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
- Main
Page stringSuffix Behaves as the bucket's directory index where missing objects are treated as potential directories.
- Not
Found stringPage The custom object to return when a requested resource is not found.
- Main
Page stringSuffix Behaves as the bucket's directory index where missing objects are treated as potential directories.
- Not
Found stringPage The custom object to return when a requested resource is not found.
- main
Page StringSuffix Behaves as the bucket's directory index where missing objects are treated as potential directories.
- not
Found StringPage The custom object to return when a requested resource is not found.
- main
Page stringSuffix Behaves as the bucket's directory index where missing objects are treated as potential directories.
- not
Found stringPage The custom object to return when a requested resource is not found.
- main_
page_ strsuffix Behaves as the bucket's directory index where missing objects are treated as potential directories.
- not_
found_ strpage The custom object to return when a requested resource is not found.
- main
Page StringSuffix Behaves as the bucket's directory index where missing objects are treated as potential directories.
- not
Found StringPage 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.