published on Thursday, Sep 3, 2026 by Pulumi
published on Thursday, Sep 3, 2026 by Pulumi
A change stream resource for a Cloud Firestore Database. Change streams enable real-time tracking of document changes (creates, updates, deletes) across collections within a Cloud Firestore database.
To get more information about ChangeStream, see:
- API documentation
- How-to Guides
Warning: This resource creates a Firestore Change Stream on a project that already has a Firestore database.
Example Usage
Firestore Change Stream Basic
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
import * as time from "@pulumiverse/time";
const database = new gcp.firestore.Database("database", {
project: "my-project-name",
name: "database-id",
locationId: "nam5",
type: "FIRESTORE_NATIVE",
databaseEdition: "ENTERPRISE",
deletionPolicy: "DELETE",
});
const wait30Seconds = new time.Sleep("wait_30_seconds", {createDuration: "30s"}, {
dependsOn: [database],
});
const changeStream = new gcp.firestore.ChangeStream("change_stream", {
project: "my-project-name",
database: database.name,
name: "my-change-stream",
retentionPeriod: "86400s",
databaseScope: {},
}, {
dependsOn: [wait30Seconds],
});
import pulumi
import pulumi_gcp as gcp
import pulumiverse_time as time
database = gcp.firestore.Database("database",
project="my-project-name",
name="database-id",
location_id="nam5",
type="FIRESTORE_NATIVE",
database_edition="ENTERPRISE",
deletion_policy="DELETE")
wait30_seconds = time.Sleep("wait_30_seconds", create_duration="30s",
opts = pulumi.ResourceOptions(depends_on=[database]))
change_stream = gcp.firestore.ChangeStream("change_stream",
project="my-project-name",
database=database.name,
name="my-change-stream",
retention_period="86400s",
database_scope={},
opts = pulumi.ResourceOptions(depends_on=[wait30_seconds]))
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/firestore"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumiverse/pulumi-time/sdk/go/time"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
database, err := firestore.NewDatabase(ctx, "database", &firestore.DatabaseArgs{
Project: pulumi.String("my-project-name"),
Name: pulumi.String("database-id"),
LocationId: pulumi.String("nam5"),
Type: pulumi.String("FIRESTORE_NATIVE"),
DatabaseEdition: pulumi.String("ENTERPRISE"),
DeletionPolicy: pulumi.String("DELETE"),
})
if err != nil {
return err
}
wait30Seconds, err := time.NewSleep(ctx, "wait_30_seconds", &time.SleepArgs{
CreateDuration: pulumi.String("30s"),
}, pulumi.DependsOn([]pulumi.Resource{
database,
}))
if err != nil {
return err
}
_, err = firestore.NewChangeStream(ctx, "change_stream", &firestore.ChangeStreamArgs{
Project: pulumi.String("my-project-name"),
Database: database.Name,
Name: pulumi.String("my-change-stream"),
RetentionPeriod: pulumi.String("86400s"),
DatabaseScope: &firestore.ChangeStreamDatabaseScopeArgs{},
}, pulumi.DependsOn([]pulumi.Resource{
wait30Seconds,
}))
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
using Time = Pulumiverse.Time;
return await Deployment.RunAsync(() =>
{
var database = new Gcp.Firestore.Database("database", new()
{
Project = "my-project-name",
Name = "database-id",
LocationId = "nam5",
Type = "FIRESTORE_NATIVE",
DatabaseEdition = "ENTERPRISE",
DeletionPolicy = "DELETE",
});
var wait30Seconds = new Time.Sleep("wait_30_seconds", new()
{
CreateDuration = "30s",
}, new CustomResourceOptions
{
DependsOn =
{
database,
},
});
var changeStream = new Gcp.Firestore.ChangeStream("change_stream", new()
{
Project = "my-project-name",
Database = database.Name,
Name = "my-change-stream",
RetentionPeriod = "86400s",
DatabaseScope = new() { },
}, new CustomResourceOptions
{
DependsOn =
{
wait30Seconds,
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.firestore.Database;
import com.pulumi.gcp.firestore.DatabaseArgs;
import com.pulumiverse.time.Sleep;
import com.pulumiverse.time.SleepArgs;
import com.pulumi.gcp.firestore.ChangeStream;
import com.pulumi.gcp.firestore.ChangeStreamArgs;
import com.pulumi.gcp.firestore.inputs.ChangeStreamDatabaseScopeArgs;
import com.pulumi.resources.CustomResourceOptions;
import java.util.ArrayList;
import java.util.Arrays;
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 database = new Database("database", DatabaseArgs.builder()
.project("my-project-name")
.name("database-id")
.locationId("nam5")
.type("FIRESTORE_NATIVE")
.databaseEdition("ENTERPRISE")
.deletionPolicy("DELETE")
.build());
var wait30Seconds = new Sleep("wait30Seconds", SleepArgs.builder()
.createDuration("30s")
.build(), CustomResourceOptions.builder()
.dependsOn(database)
.build());
var changeStream = new ChangeStream("changeStream", ChangeStreamArgs.builder()
.project("my-project-name")
.database(database.name())
.name("my-change-stream")
.retentionPeriod("86400s")
.databaseScope(ChangeStreamDatabaseScopeArgs.builder()
.build())
.build(), CustomResourceOptions.builder()
.dependsOn(wait30Seconds)
.build());
}
}
resources:
database:
type: gcp:firestore:Database
properties:
project: my-project-name
name: database-id
locationId: nam5
type: FIRESTORE_NATIVE
databaseEdition: ENTERPRISE
deletionPolicy: DELETE
wait30Seconds:
type: time:Sleep
name: wait_30_seconds
properties:
createDuration: 30s
options:
dependsOn:
- ${database}
changeStream:
type: gcp:firestore:ChangeStream
name: change_stream
properties:
project: my-project-name
database: ${database.name}
name: my-change-stream
retentionPeriod: 86400s
databaseScope: {}
options:
dependsOn:
- ${wait30Seconds}
pulumi {
required_providers {
gcp = {
source = "pulumi/gcp"
}
time = {
source = "pulumi/time"
}
}
}
resource "gcp_firestore_database" "database" {
project = "my-project-name"
name = "database-id"
location_id = "nam5"
type = "FIRESTORE_NATIVE"
database_edition = "ENTERPRISE"
deletion_policy = "DELETE"
}
resource "time_sleep" "wait_30_seconds" {
depends_on = [gcp_firestore_database.database]
create_duration = "30s"
}
resource "gcp_firestore_changestream" "change_stream" {
depends_on = [time_sleep.wait_30_seconds]
project = "my-project-name"
database = gcp_firestore_database.database.name
name = "my-change-stream"
retention_period = "86400s"
database_scope = {}
}
Firestore Change Stream Full
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
import * as time from "@pulumiverse/time";
const database = new gcp.firestore.Database("database", {
project: "my-project-name",
name: "database-id",
locationId: "nam5",
type: "FIRESTORE_NATIVE",
databaseEdition: "ENTERPRISE",
deletionPolicy: "DELETE",
});
const wait30Seconds = new time.Sleep("wait_30_seconds", {createDuration: "30s"}, {
dependsOn: [database],
});
const changeStream = new gcp.firestore.ChangeStream("change_stream", {
project: "my-project-name",
database: database.name,
name: "my-change-stream",
retentionPeriod: "604800s",
collectionGroupScope: {
collectionGroupId: "users",
},
}, {
dependsOn: [wait30Seconds],
});
import pulumi
import pulumi_gcp as gcp
import pulumiverse_time as time
database = gcp.firestore.Database("database",
project="my-project-name",
name="database-id",
location_id="nam5",
type="FIRESTORE_NATIVE",
database_edition="ENTERPRISE",
deletion_policy="DELETE")
wait30_seconds = time.Sleep("wait_30_seconds", create_duration="30s",
opts = pulumi.ResourceOptions(depends_on=[database]))
change_stream = gcp.firestore.ChangeStream("change_stream",
project="my-project-name",
database=database.name,
name="my-change-stream",
retention_period="604800s",
collection_group_scope={
"collection_group_id": "users",
},
opts = pulumi.ResourceOptions(depends_on=[wait30_seconds]))
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/firestore"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumiverse/pulumi-time/sdk/go/time"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
database, err := firestore.NewDatabase(ctx, "database", &firestore.DatabaseArgs{
Project: pulumi.String("my-project-name"),
Name: pulumi.String("database-id"),
LocationId: pulumi.String("nam5"),
Type: pulumi.String("FIRESTORE_NATIVE"),
DatabaseEdition: pulumi.String("ENTERPRISE"),
DeletionPolicy: pulumi.String("DELETE"),
})
if err != nil {
return err
}
wait30Seconds, err := time.NewSleep(ctx, "wait_30_seconds", &time.SleepArgs{
CreateDuration: pulumi.String("30s"),
}, pulumi.DependsOn([]pulumi.Resource{
database,
}))
if err != nil {
return err
}
_, err = firestore.NewChangeStream(ctx, "change_stream", &firestore.ChangeStreamArgs{
Project: pulumi.String("my-project-name"),
Database: database.Name,
Name: pulumi.String("my-change-stream"),
RetentionPeriod: pulumi.String("604800s"),
CollectionGroupScope: &firestore.ChangeStreamCollectionGroupScopeArgs{
CollectionGroupId: pulumi.String("users"),
},
}, pulumi.DependsOn([]pulumi.Resource{
wait30Seconds,
}))
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
using Time = Pulumiverse.Time;
return await Deployment.RunAsync(() =>
{
var database = new Gcp.Firestore.Database("database", new()
{
Project = "my-project-name",
Name = "database-id",
LocationId = "nam5",
Type = "FIRESTORE_NATIVE",
DatabaseEdition = "ENTERPRISE",
DeletionPolicy = "DELETE",
});
var wait30Seconds = new Time.Sleep("wait_30_seconds", new()
{
CreateDuration = "30s",
}, new CustomResourceOptions
{
DependsOn =
{
database,
},
});
var changeStream = new Gcp.Firestore.ChangeStream("change_stream", new()
{
Project = "my-project-name",
Database = database.Name,
Name = "my-change-stream",
RetentionPeriod = "604800s",
CollectionGroupScope = new Gcp.Firestore.Inputs.ChangeStreamCollectionGroupScopeArgs
{
CollectionGroupId = "users",
},
}, new CustomResourceOptions
{
DependsOn =
{
wait30Seconds,
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.firestore.Database;
import com.pulumi.gcp.firestore.DatabaseArgs;
import com.pulumiverse.time.Sleep;
import com.pulumiverse.time.SleepArgs;
import com.pulumi.gcp.firestore.ChangeStream;
import com.pulumi.gcp.firestore.ChangeStreamArgs;
import com.pulumi.gcp.firestore.inputs.ChangeStreamCollectionGroupScopeArgs;
import com.pulumi.resources.CustomResourceOptions;
import java.util.ArrayList;
import java.util.Arrays;
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 database = new Database("database", DatabaseArgs.builder()
.project("my-project-name")
.name("database-id")
.locationId("nam5")
.type("FIRESTORE_NATIVE")
.databaseEdition("ENTERPRISE")
.deletionPolicy("DELETE")
.build());
var wait30Seconds = new Sleep("wait30Seconds", SleepArgs.builder()
.createDuration("30s")
.build(), CustomResourceOptions.builder()
.dependsOn(database)
.build());
var changeStream = new ChangeStream("changeStream", ChangeStreamArgs.builder()
.project("my-project-name")
.database(database.name())
.name("my-change-stream")
.retentionPeriod("604800s")
.collectionGroupScope(ChangeStreamCollectionGroupScopeArgs.builder()
.collectionGroupId("users")
.build())
.build(), CustomResourceOptions.builder()
.dependsOn(wait30Seconds)
.build());
}
}
resources:
database:
type: gcp:firestore:Database
properties:
project: my-project-name
name: database-id
locationId: nam5
type: FIRESTORE_NATIVE
databaseEdition: ENTERPRISE
deletionPolicy: DELETE
wait30Seconds:
type: time:Sleep
name: wait_30_seconds
properties:
createDuration: 30s
options:
dependsOn:
- ${database}
changeStream:
type: gcp:firestore:ChangeStream
name: change_stream
properties:
project: my-project-name
database: ${database.name}
name: my-change-stream
retentionPeriod: 604800s
collectionGroupScope:
collectionGroupId: users
options:
dependsOn:
- ${wait30Seconds}
pulumi {
required_providers {
gcp = {
source = "pulumi/gcp"
}
time = {
source = "pulumi/time"
}
}
}
resource "gcp_firestore_database" "database" {
project = "my-project-name"
name = "database-id"
location_id = "nam5"
type = "FIRESTORE_NATIVE"
database_edition = "ENTERPRISE"
deletion_policy = "DELETE"
}
resource "time_sleep" "wait_30_seconds" {
depends_on = [gcp_firestore_database.database]
create_duration = "30s"
}
resource "gcp_firestore_changestream" "change_stream" {
depends_on = [time_sleep.wait_30_seconds]
project = "my-project-name"
database = gcp_firestore_database.database.name
name = "my-change-stream"
retention_period = "604800s"
collection_group_scope = {
collection_group_id = "users"
}
}
Create ChangeStream Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ChangeStream(name: string, args: ChangeStreamArgs, opts?: CustomResourceOptions);@overload
def ChangeStream(resource_name: str,
args: ChangeStreamArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ChangeStream(resource_name: str,
opts: Optional[ResourceOptions] = None,
retention_period: Optional[str] = None,
collection_group_scope: Optional[ChangeStreamCollectionGroupScopeArgs] = None,
database: Optional[str] = None,
database_scope: Optional[ChangeStreamDatabaseScopeArgs] = None,
deletion_policy: Optional[str] = None,
name: Optional[str] = None,
project: Optional[str] = None)func NewChangeStream(ctx *Context, name string, args ChangeStreamArgs, opts ...ResourceOption) (*ChangeStream, error)public ChangeStream(string name, ChangeStreamArgs args, CustomResourceOptions? opts = null)
public ChangeStream(String name, ChangeStreamArgs args)
public ChangeStream(String name, ChangeStreamArgs args, CustomResourceOptions options)
type: gcp:firestore:ChangeStream
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "gcp_firestore_change_stream" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args ChangeStreamArgs
- 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 ChangeStreamArgs
- 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 ChangeStreamArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ChangeStreamArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ChangeStreamArgs
- 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 changeStreamResource = new Gcp.Firestore.ChangeStream("changeStreamResource", new()
{
RetentionPeriod = "string",
CollectionGroupScope = new Gcp.Firestore.Inputs.ChangeStreamCollectionGroupScopeArgs
{
CollectionGroupId = "string",
},
Database = "string",
DatabaseScope = new() { },
DeletionPolicy = "string",
Name = "string",
Project = "string",
});
example, err := firestore.NewChangeStream(ctx, "changeStreamResource", &firestore.ChangeStreamArgs{
RetentionPeriod: pulumi.String("string"),
CollectionGroupScope: &firestore.ChangeStreamCollectionGroupScopeArgs{
CollectionGroupId: pulumi.String("string"),
},
Database: pulumi.String("string"),
DatabaseScope: &firestore.ChangeStreamDatabaseScopeArgs{},
DeletionPolicy: pulumi.String("string"),
Name: pulumi.String("string"),
Project: pulumi.String("string"),
})
resource "gcp_firestore_change_stream" "changeStreamResource" {
lifecycle {
create_before_destroy = true
}
retention_period = "string"
collection_group_scope = {
collection_group_id = "string"
}
database = "string"
database_scope = {}
deletion_policy = "string"
name = "string"
project = "string"
}
var changeStreamResource = new ChangeStream("changeStreamResource", ChangeStreamArgs.builder()
.retentionPeriod("string")
.collectionGroupScope(ChangeStreamCollectionGroupScopeArgs.builder()
.collectionGroupId("string")
.build())
.database("string")
.databaseScope(ChangeStreamDatabaseScopeArgs.builder()
.build())
.deletionPolicy("string")
.name("string")
.project("string")
.build());
change_stream_resource = gcp.firestore.ChangeStream("changeStreamResource",
retention_period="string",
collection_group_scope={
"collection_group_id": "string",
},
database="string",
database_scope={},
deletion_policy="string",
name="string",
project="string")
const changeStreamResource = new gcp.firestore.ChangeStream("changeStreamResource", {
retentionPeriod: "string",
collectionGroupScope: {
collectionGroupId: "string",
},
database: "string",
databaseScope: {},
deletionPolicy: "string",
name: "string",
project: "string",
});
type: gcp:firestore:ChangeStream
properties:
collectionGroupScope:
collectionGroupId: string
database: string
databaseScope: {}
deletionPolicy: string
name: string
project: string
retentionPeriod: string
ChangeStream 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 ChangeStream resource accepts the following input properties:
- Retention
Period string - The duration for which change stream data is retained. A duration in seconds with up to nine fractional digits, ending with 's'. Example: "86400s".
- Collection
Group ChangeScope Stream Collection Group Scope - Tracks changes for a specific collection group. Structure is documented below.
- Database string
- The Firestore database ID. Defaults to
"(default)". - Database
Scope ChangeStream Database Scope - Tracks changes across all collections in the database.
- Deletion
Policy string - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- Name string
- The ID to use for the change stream, which will become the final component of the change stream's resource name.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Retention
Period string - The duration for which change stream data is retained. A duration in seconds with up to nine fractional digits, ending with 's'. Example: "86400s".
- Collection
Group ChangeScope Stream Collection Group Scope Args - Tracks changes for a specific collection group. Structure is documented below.
- Database string
- The Firestore database ID. Defaults to
"(default)". - Database
Scope ChangeStream Database Scope Args - Tracks changes across all collections in the database.
- Deletion
Policy string - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- Name string
- The ID to use for the change stream, which will become the final component of the change stream's resource name.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- retention_
period string - The duration for which change stream data is retained. A duration in seconds with up to nine fractional digits, ending with 's'. Example: "86400s".
- collection_
group_ objectscope - Tracks changes for a specific collection group. Structure is documented below.
- database string
- The Firestore database ID. Defaults to
"(default)". - database_
scope object - Tracks changes across all collections in the database.
- deletion_
policy string - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- name string
- The ID to use for the change stream, which will become the final component of the change stream's resource name.
- project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- retention
Period String - The duration for which change stream data is retained. A duration in seconds with up to nine fractional digits, ending with 's'. Example: "86400s".
- collection
Group ChangeScope Stream Collection Group Scope - Tracks changes for a specific collection group. Structure is documented below.
- database String
- The Firestore database ID. Defaults to
"(default)". - database
Scope ChangeStream Database Scope - Tracks changes across all collections in the database.
- deletion
Policy String - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- name String
- The ID to use for the change stream, which will become the final component of the change stream's resource name.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- retention
Period string - The duration for which change stream data is retained. A duration in seconds with up to nine fractional digits, ending with 's'. Example: "86400s".
- collection
Group ChangeScope Stream Collection Group Scope - Tracks changes for a specific collection group. Structure is documented below.
- database string
- The Firestore database ID. Defaults to
"(default)". - database
Scope ChangeStream Database Scope - Tracks changes across all collections in the database.
- deletion
Policy string - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- name string
- The ID to use for the change stream, which will become the final component of the change stream's resource name.
- project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- retention_
period str - The duration for which change stream data is retained. A duration in seconds with up to nine fractional digits, ending with 's'. Example: "86400s".
- collection_
group_ Changescope Stream Collection Group Scope Args - Tracks changes for a specific collection group. Structure is documented below.
- database str
- The Firestore database ID. Defaults to
"(default)". - database_
scope ChangeStream Database Scope Args - Tracks changes across all collections in the database.
- deletion_
policy str - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- name str
- The ID to use for the change stream, which will become the final component of the change stream's resource name.
- project str
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- retention
Period String - The duration for which change stream data is retained. A duration in seconds with up to nine fractional digits, ending with 's'. Example: "86400s".
- collection
Group Property MapScope - Tracks changes for a specific collection group. Structure is documented below.
- database String
- The Firestore database ID. Defaults to
"(default)". - database
Scope Property Map - Tracks changes across all collections in the database.
- deletion
Policy String - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- name String
- The ID to use for the change stream, which will become the final component of the change stream's resource name.
- 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 ChangeStream resource produces the following output properties:
- Create
Time string - The creation timestamp of the change stream.
- Etag string
- Output only. This checksum is computed by the server based on the value of other fields, and may be sent on delete request to ensure the client has an up-to-date value before proceeding.
- Id string
- The provider-assigned unique ID for this managed resource.
- Start
Time string - The time the Change Stream started recording events.
- Update
Time string - The last update timestamp of the change stream.
- Create
Time string - The creation timestamp of the change stream.
- Etag string
- Output only. This checksum is computed by the server based on the value of other fields, and may be sent on delete request to ensure the client has an up-to-date value before proceeding.
- Id string
- The provider-assigned unique ID for this managed resource.
- Start
Time string - The time the Change Stream started recording events.
- Update
Time string - The last update timestamp of the change stream.
- create_
time string - The creation timestamp of the change stream.
- etag string
- Output only. This checksum is computed by the server based on the value of other fields, and may be sent on delete request to ensure the client has an up-to-date value before proceeding.
- id string
- The provider-assigned unique ID for this managed resource.
- start_
time string - The time the Change Stream started recording events.
- update_
time string - The last update timestamp of the change stream.
- create
Time String - The creation timestamp of the change stream.
- etag String
- Output only. This checksum is computed by the server based on the value of other fields, and may be sent on delete request to ensure the client has an up-to-date value before proceeding.
- id String
- The provider-assigned unique ID for this managed resource.
- start
Time String - The time the Change Stream started recording events.
- update
Time String - The last update timestamp of the change stream.
- create
Time string - The creation timestamp of the change stream.
- etag string
- Output only. This checksum is computed by the server based on the value of other fields, and may be sent on delete request to ensure the client has an up-to-date value before proceeding.
- id string
- The provider-assigned unique ID for this managed resource.
- start
Time string - The time the Change Stream started recording events.
- update
Time string - The last update timestamp of the change stream.
- create_
time str - The creation timestamp of the change stream.
- etag str
- Output only. This checksum is computed by the server based on the value of other fields, and may be sent on delete request to ensure the client has an up-to-date value before proceeding.
- id str
- The provider-assigned unique ID for this managed resource.
- start_
time str - The time the Change Stream started recording events.
- update_
time str - The last update timestamp of the change stream.
- create
Time String - The creation timestamp of the change stream.
- etag String
- Output only. This checksum is computed by the server based on the value of other fields, and may be sent on delete request to ensure the client has an up-to-date value before proceeding.
- id String
- The provider-assigned unique ID for this managed resource.
- start
Time String - The time the Change Stream started recording events.
- update
Time String - The last update timestamp of the change stream.
Look up Existing ChangeStream Resource
Get an existing ChangeStream 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?: ChangeStreamState, opts?: CustomResourceOptions): ChangeStream@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
collection_group_scope: Optional[ChangeStreamCollectionGroupScopeArgs] = None,
create_time: Optional[str] = None,
database: Optional[str] = None,
database_scope: Optional[ChangeStreamDatabaseScopeArgs] = None,
deletion_policy: Optional[str] = None,
etag: Optional[str] = None,
name: Optional[str] = None,
project: Optional[str] = None,
retention_period: Optional[str] = None,
start_time: Optional[str] = None,
update_time: Optional[str] = None) -> ChangeStreamfunc GetChangeStream(ctx *Context, name string, id IDInput, state *ChangeStreamState, opts ...ResourceOption) (*ChangeStream, error)public static ChangeStream Get(string name, Input<string> id, ChangeStreamState? state, CustomResourceOptions? opts = null)public static ChangeStream get(String name, Output<String> id, ChangeStreamState state, CustomResourceOptions options)resources: _: type: gcp:firestore:ChangeStream get: id: ${id}import {
to = gcp_firestore_change_stream.example
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.
- Collection
Group ChangeScope Stream Collection Group Scope - Tracks changes for a specific collection group. Structure is documented below.
- Create
Time string - The creation timestamp of the change stream.
- Database string
- The Firestore database ID. Defaults to
"(default)". - Database
Scope ChangeStream Database Scope - Tracks changes across all collections in the database.
- Deletion
Policy string - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- Etag string
- Output only. This checksum is computed by the server based on the value of other fields, and may be sent on delete request to ensure the client has an up-to-date value before proceeding.
- Name string
- The ID to use for the change stream, which will become the final component of the change stream's resource name.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Retention
Period string - The duration for which change stream data is retained. A duration in seconds with up to nine fractional digits, ending with 's'. Example: "86400s".
- Start
Time string - The time the Change Stream started recording events.
- Update
Time string - The last update timestamp of the change stream.
- Collection
Group ChangeScope Stream Collection Group Scope Args - Tracks changes for a specific collection group. Structure is documented below.
- Create
Time string - The creation timestamp of the change stream.
- Database string
- The Firestore database ID. Defaults to
"(default)". - Database
Scope ChangeStream Database Scope Args - Tracks changes across all collections in the database.
- Deletion
Policy string - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- Etag string
- Output only. This checksum is computed by the server based on the value of other fields, and may be sent on delete request to ensure the client has an up-to-date value before proceeding.
- Name string
- The ID to use for the change stream, which will become the final component of the change stream's resource name.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Retention
Period string - The duration for which change stream data is retained. A duration in seconds with up to nine fractional digits, ending with 's'. Example: "86400s".
- Start
Time string - The time the Change Stream started recording events.
- Update
Time string - The last update timestamp of the change stream.
- collection_
group_ objectscope - Tracks changes for a specific collection group. Structure is documented below.
- create_
time string - The creation timestamp of the change stream.
- database string
- The Firestore database ID. Defaults to
"(default)". - database_
scope object - Tracks changes across all collections in the database.
- deletion_
policy string - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- etag string
- Output only. This checksum is computed by the server based on the value of other fields, and may be sent on delete request to ensure the client has an up-to-date value before proceeding.
- name string
- The ID to use for the change stream, which will become the final component of the change stream's resource name.
- project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- retention_
period string - The duration for which change stream data is retained. A duration in seconds with up to nine fractional digits, ending with 's'. Example: "86400s".
- start_
time string - The time the Change Stream started recording events.
- update_
time string - The last update timestamp of the change stream.
- collection
Group ChangeScope Stream Collection Group Scope - Tracks changes for a specific collection group. Structure is documented below.
- create
Time String - The creation timestamp of the change stream.
- database String
- The Firestore database ID. Defaults to
"(default)". - database
Scope ChangeStream Database Scope - Tracks changes across all collections in the database.
- deletion
Policy String - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- etag String
- Output only. This checksum is computed by the server based on the value of other fields, and may be sent on delete request to ensure the client has an up-to-date value before proceeding.
- name String
- The ID to use for the change stream, which will become the final component of the change stream's resource name.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- retention
Period String - The duration for which change stream data is retained. A duration in seconds with up to nine fractional digits, ending with 's'. Example: "86400s".
- start
Time String - The time the Change Stream started recording events.
- update
Time String - The last update timestamp of the change stream.
- collection
Group ChangeScope Stream Collection Group Scope - Tracks changes for a specific collection group. Structure is documented below.
- create
Time string - The creation timestamp of the change stream.
- database string
- The Firestore database ID. Defaults to
"(default)". - database
Scope ChangeStream Database Scope - Tracks changes across all collections in the database.
- deletion
Policy string - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- etag string
- Output only. This checksum is computed by the server based on the value of other fields, and may be sent on delete request to ensure the client has an up-to-date value before proceeding.
- name string
- The ID to use for the change stream, which will become the final component of the change stream's resource name.
- project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- retention
Period string - The duration for which change stream data is retained. A duration in seconds with up to nine fractional digits, ending with 's'. Example: "86400s".
- start
Time string - The time the Change Stream started recording events.
- update
Time string - The last update timestamp of the change stream.
- collection_
group_ Changescope Stream Collection Group Scope Args - Tracks changes for a specific collection group. Structure is documented below.
- create_
time str - The creation timestamp of the change stream.
- database str
- The Firestore database ID. Defaults to
"(default)". - database_
scope ChangeStream Database Scope Args - Tracks changes across all collections in the database.
- deletion_
policy str - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- etag str
- Output only. This checksum is computed by the server based on the value of other fields, and may be sent on delete request to ensure the client has an up-to-date value before proceeding.
- name str
- The ID to use for the change stream, which will become the final component of the change stream's resource name.
- project str
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- retention_
period str - The duration for which change stream data is retained. A duration in seconds with up to nine fractional digits, ending with 's'. Example: "86400s".
- start_
time str - The time the Change Stream started recording events.
- update_
time str - The last update timestamp of the change stream.
- collection
Group Property MapScope - Tracks changes for a specific collection group. Structure is documented below.
- create
Time String - The creation timestamp of the change stream.
- database String
- The Firestore database ID. Defaults to
"(default)". - database
Scope Property Map - Tracks changes across all collections in the database.
- deletion
Policy String - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- etag String
- Output only. This checksum is computed by the server based on the value of other fields, and may be sent on delete request to ensure the client has an up-to-date value before proceeding.
- name String
- The ID to use for the change stream, which will become the final component of the change stream's resource name.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- retention
Period String - The duration for which change stream data is retained. A duration in seconds with up to nine fractional digits, ending with 's'. Example: "86400s".
- start
Time String - The time the Change Stream started recording events.
- update
Time String - The last update timestamp of the change stream.
Supporting Types
ChangeStreamCollectionGroupScope, ChangeStreamCollectionGroupScopeArgs
- Collection
Group stringId - The ID of the collection group to track.
- Collection
Group stringId - The ID of the collection group to track.
- collection_
group_ stringid - The ID of the collection group to track.
- collection
Group StringId - The ID of the collection group to track.
- collection
Group stringId - The ID of the collection group to track.
- collection_
group_ strid - The ID of the collection group to track.
- collection
Group StringId - The ID of the collection group to track.
Import
ChangeStream can be imported using any of these accepted formats:
projects/{{project}}/databases/{{database}}/changeStreams/{{name}}{{project}}/{{database}}/{{name}}{{database}}/{{name}}
When using the pulumi import command, ChangeStream can be imported using one of the formats above. For example:
$ pulumi import gcp:firestore/changeStream:ChangeStream default projects/{{project}}/databases/{{database}}/changeStreams/{{name}}
$ pulumi import gcp:firestore/changeStream:ChangeStream default {{project}}/{{database}}/{{name}}
$ pulumi import gcp:firestore/changeStream:ChangeStream default {{database}}/{{name}}
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-betaTerraform Provider.
published on Thursday, Sep 3, 2026 by Pulumi