1. Packages
  2. Packages
  3. Google Cloud (GCP) Classic
  4. API Docs
  5. firebase
  6. StorageDefaultBucket
Viewing docs for Google Cloud v9.22.0
published on Friday, May 1, 2026 by Pulumi
gcp logo
Viewing docs for Google Cloud v9.22.0
published on Friday, May 1, 2026 by Pulumi

    A resource that manages the creation of the default Google Cloud Storage bucket for a Firebase project.

    Warning: This resource is in beta, and should be used with the terraform-provider-google-beta provider. See Provider Versions for more details on beta resources.

    To get more information about DefaultBucket, see:

    Example Usage

    Firebasestorage Default Bucket Basic

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const _default = new gcp.firebase.StorageDefaultBucket("default", {
        project: "my-project-name",
        location: "us-central1",
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    default = gcp.firebase.StorageDefaultBucket("default",
        project="my-project-name",
        location="us-central1")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/firebase"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := firebase.NewStorageDefaultBucket(ctx, "default", &firebase.StorageDefaultBucketArgs{
    			Project:  pulumi.String("my-project-name"),
    			Location: pulumi.String("us-central1"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var @default = new Gcp.Firebase.StorageDefaultBucket("default", new()
        {
            Project = "my-project-name",
            Location = "us-central1",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.firebase.StorageDefaultBucket;
    import com.pulumi.gcp.firebase.StorageDefaultBucketArgs;
    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 default_ = new StorageDefaultBucket("default", StorageDefaultBucketArgs.builder()
                .project("my-project-name")
                .location("us-central1")
                .build());
    
        }
    }
    
    resources:
      default:
        type: gcp:firebase:StorageDefaultBucket
        properties:
          project: my-project-name
          location: us-central1
    

    Create StorageDefaultBucket Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new StorageDefaultBucket(name: string, args: StorageDefaultBucketArgs, opts?: CustomResourceOptions);
    @overload
    def StorageDefaultBucket(resource_name: str,
                             args: StorageDefaultBucketArgs,
                             opts: Optional[ResourceOptions] = None)
    
    @overload
    def StorageDefaultBucket(resource_name: str,
                             opts: Optional[ResourceOptions] = None,
                             location: Optional[str] = None,
                             project: Optional[str] = None)
    func NewStorageDefaultBucket(ctx *Context, name string, args StorageDefaultBucketArgs, opts ...ResourceOption) (*StorageDefaultBucket, error)
    public StorageDefaultBucket(string name, StorageDefaultBucketArgs args, CustomResourceOptions? opts = null)
    public StorageDefaultBucket(String name, StorageDefaultBucketArgs args)
    public StorageDefaultBucket(String name, StorageDefaultBucketArgs args, CustomResourceOptions options)
    
    type: gcp:firebase:StorageDefaultBucket
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args StorageDefaultBucketArgs
    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 StorageDefaultBucketArgs
    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 StorageDefaultBucketArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args StorageDefaultBucketArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args StorageDefaultBucketArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var storageDefaultBucketResource = new Gcp.Firebase.StorageDefaultBucket("storageDefaultBucketResource", new()
    {
        Location = "string",
        Project = "string",
    });
    
    example, err := firebase.NewStorageDefaultBucket(ctx, "storageDefaultBucketResource", &firebase.StorageDefaultBucketArgs{
    	Location: pulumi.String("string"),
    	Project:  pulumi.String("string"),
    })
    
    var storageDefaultBucketResource = new StorageDefaultBucket("storageDefaultBucketResource", StorageDefaultBucketArgs.builder()
        .location("string")
        .project("string")
        .build());
    
    storage_default_bucket_resource = gcp.firebase.StorageDefaultBucket("storageDefaultBucketResource",
        location="string",
        project="string")
    
    const storageDefaultBucketResource = new gcp.firebase.StorageDefaultBucket("storageDefaultBucketResource", {
        location: "string",
        project: "string",
    });
    
    type: gcp:firebase:StorageDefaultBucket
    properties:
        location: string
        project: string
    

    StorageDefaultBucket Resource Properties

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

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The StorageDefaultBucket resource accepts the following input properties:

    Location string
    The ID of the location where the default Google Cloud Storage bucket will be created.
    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    Location string
    The ID of the location where the default Google Cloud Storage bucket will be created.
    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    location String
    The ID of the location where the default Google Cloud Storage bucket will be created.
    project String
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    location string
    The ID of the location where the default Google Cloud Storage bucket will be created.
    project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    location str
    The ID of the location where the default Google Cloud Storage bucket will be created.
    project str
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    location String
    The ID of the location where the default Google Cloud Storage bucket will be created.
    project String
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

    Outputs

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

    Buckets List<StorageDefaultBucketBucket>
    The resource name of the underlying Google Cloud Storage bucket. Structure is documented below.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    (Output) The resource name of the bucket in the format projects/PROJECT_IDENTIFIER/buckets/BUCKET_ID
    Buckets []StorageDefaultBucketBucket
    The resource name of the underlying Google Cloud Storage bucket. Structure is documented below.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    (Output) The resource name of the bucket in the format projects/PROJECT_IDENTIFIER/buckets/BUCKET_ID
    buckets List<StorageDefaultBucketBucket>
    The resource name of the underlying Google Cloud Storage bucket. Structure is documented below.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    (Output) The resource name of the bucket in the format projects/PROJECT_IDENTIFIER/buckets/BUCKET_ID
    buckets StorageDefaultBucketBucket[]
    The resource name of the underlying Google Cloud Storage bucket. Structure is documented below.
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    (Output) The resource name of the bucket in the format projects/PROJECT_IDENTIFIER/buckets/BUCKET_ID
    buckets Sequence[StorageDefaultBucketBucket]
    The resource name of the underlying Google Cloud Storage bucket. Structure is documented below.
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    (Output) The resource name of the bucket in the format projects/PROJECT_IDENTIFIER/buckets/BUCKET_ID
    buckets List<Property Map>
    The resource name of the underlying Google Cloud Storage bucket. Structure is documented below.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    (Output) The resource name of the bucket in the format projects/PROJECT_IDENTIFIER/buckets/BUCKET_ID

    Look up Existing StorageDefaultBucket Resource

    Get an existing StorageDefaultBucket 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?: StorageDefaultBucketState, opts?: CustomResourceOptions): StorageDefaultBucket
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            buckets: Optional[Sequence[StorageDefaultBucketBucketArgs]] = None,
            location: Optional[str] = None,
            name: Optional[str] = None,
            project: Optional[str] = None) -> StorageDefaultBucket
    func GetStorageDefaultBucket(ctx *Context, name string, id IDInput, state *StorageDefaultBucketState, opts ...ResourceOption) (*StorageDefaultBucket, error)
    public static StorageDefaultBucket Get(string name, Input<string> id, StorageDefaultBucketState? state, CustomResourceOptions? opts = null)
    public static StorageDefaultBucket get(String name, Output<String> id, StorageDefaultBucketState state, CustomResourceOptions options)
    resources:  _:    type: gcp:firebase:StorageDefaultBucket    get:      id: ${id}
    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:
    Buckets List<StorageDefaultBucketBucket>
    The resource name of the underlying Google Cloud Storage bucket. Structure is documented below.
    Location string
    The ID of the location where the default Google Cloud Storage bucket will be created.
    Name string
    (Output) The resource name of the bucket in the format projects/PROJECT_IDENTIFIER/buckets/BUCKET_ID
    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    Buckets []StorageDefaultBucketBucketArgs
    The resource name of the underlying Google Cloud Storage bucket. Structure is documented below.
    Location string
    The ID of the location where the default Google Cloud Storage bucket will be created.
    Name string
    (Output) The resource name of the bucket in the format projects/PROJECT_IDENTIFIER/buckets/BUCKET_ID
    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    buckets List<StorageDefaultBucketBucket>
    The resource name of the underlying Google Cloud Storage bucket. Structure is documented below.
    location String
    The ID of the location where the default Google Cloud Storage bucket will be created.
    name String
    (Output) The resource name of the bucket in the format projects/PROJECT_IDENTIFIER/buckets/BUCKET_ID
    project String
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    buckets StorageDefaultBucketBucket[]
    The resource name of the underlying Google Cloud Storage bucket. Structure is documented below.
    location string
    The ID of the location where the default Google Cloud Storage bucket will be created.
    name string
    (Output) The resource name of the bucket in the format projects/PROJECT_IDENTIFIER/buckets/BUCKET_ID
    project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    buckets Sequence[StorageDefaultBucketBucketArgs]
    The resource name of the underlying Google Cloud Storage bucket. Structure is documented below.
    location str
    The ID of the location where the default Google Cloud Storage bucket will be created.
    name str
    (Output) The resource name of the bucket in the format projects/PROJECT_IDENTIFIER/buckets/BUCKET_ID
    project str
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    buckets List<Property Map>
    The resource name of the underlying Google Cloud Storage bucket. Structure is documented below.
    location String
    The ID of the location where the default Google Cloud Storage bucket will be created.
    name String
    (Output) The resource name of the bucket in the format projects/PROJECT_IDENTIFIER/buckets/BUCKET_ID
    project String
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

    Supporting Types

    StorageDefaultBucketBucket, StorageDefaultBucketBucketArgs

    Name string
    (Output) The resource name of the bucket in the format projects/PROJECT_IDENTIFIER/buckets/BUCKET_ID
    Name string
    (Output) The resource name of the bucket in the format projects/PROJECT_IDENTIFIER/buckets/BUCKET_ID
    name String
    (Output) The resource name of the bucket in the format projects/PROJECT_IDENTIFIER/buckets/BUCKET_ID
    name string
    (Output) The resource name of the bucket in the format projects/PROJECT_IDENTIFIER/buckets/BUCKET_ID
    name str
    (Output) The resource name of the bucket in the format projects/PROJECT_IDENTIFIER/buckets/BUCKET_ID
    name String
    (Output) The resource name of the bucket in the format projects/PROJECT_IDENTIFIER/buckets/BUCKET_ID

    Import

    DefaultBucket can be imported using any of these accepted formats:

    • projects/{{project}}/defaultBucket
    • {{project}}

    When using the pulumi import command, DefaultBucket can be imported using one of the formats above. For example:

    $ pulumi import gcp:firebase/storageDefaultBucket:StorageDefaultBucket default projects/{{project}}/defaultBucket
    $ pulumi import gcp:firebase/storageDefaultBucket:StorageDefaultBucket default {{project}}
    

    To learn more about importing existing cloud resources, see Importing resources.

    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
    Viewing docs for Google Cloud v9.22.0
    published on Friday, May 1, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.