1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. firestore
  5. Field
Google Cloud Classic v7.2.2 published on Monday, Jan 1, 0001 by Pulumi

gcp.firestore.Field

Explore with Pulumi AI

gcp logo
Google Cloud Classic v7.2.2 published on Monday, Jan 1, 0001 by Pulumi

    Represents a single field in the database. Fields are grouped by their “Collection Group”, which represent all collections in the database with the same id.

    To get more information about Field, see:

    Warning: This resource creates a Firestore Single Field override on a project that already has a Firestore database. If you haven’t already created it, you may create a gcp.firestore.Database resource with location_id set to your chosen location.

    Example Usage

    Firestore Field Basic

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var basic = new Gcp.Firestore.Field("basic", new()
        {
            Collection = "chatrooms_%{random_suffix}",
            Database = "(default)",
            FieldId = "basic",
            IndexConfig = new Gcp.Firestore.Inputs.FieldIndexConfigArgs
            {
                Indexes = new[]
                {
                    new Gcp.Firestore.Inputs.FieldIndexConfigIndexArgs
                    {
                        Order = "ASCENDING",
                        QueryScope = "COLLECTION_GROUP",
                    },
                    new Gcp.Firestore.Inputs.FieldIndexConfigIndexArgs
                    {
                        ArrayConfig = "CONTAINS",
                    },
                },
            },
            Project = "my-project-name",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/firestore"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := firestore.NewField(ctx, "basic", &firestore.FieldArgs{
    			Collection: pulumi.String("chatrooms_%{random_suffix}"),
    			Database:   pulumi.String("(default)"),
    			Field:      pulumi.String("basic"),
    			IndexConfig: &firestore.FieldIndexConfigArgs{
    				Indexes: firestore.FieldIndexConfigIndexArray{
    					&firestore.FieldIndexConfigIndexArgs{
    						Order:      pulumi.String("ASCENDING"),
    						QueryScope: pulumi.String("COLLECTION_GROUP"),
    					},
    					&firestore.FieldIndexConfigIndexArgs{
    						ArrayConfig: pulumi.String("CONTAINS"),
    					},
    				},
    			},
    			Project: pulumi.String("my-project-name"),
    		})
    		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.firestore.Field;
    import com.pulumi.gcp.firestore.FieldArgs;
    import com.pulumi.gcp.firestore.inputs.FieldIndexConfigArgs;
    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 basic = new Field("basic", FieldArgs.builder()        
                .collection("chatrooms_%{random_suffix}")
                .database("(default)")
                .field("basic")
                .indexConfig(FieldIndexConfigArgs.builder()
                    .indexes(                
                        FieldIndexConfigIndexArgs.builder()
                            .order("ASCENDING")
                            .queryScope("COLLECTION_GROUP")
                            .build(),
                        FieldIndexConfigIndexArgs.builder()
                            .arrayConfig("CONTAINS")
                            .build())
                    .build())
                .project("my-project-name")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_gcp as gcp
    
    basic = gcp.firestore.Field("basic",
        collection="chatrooms_%{random_suffix}",
        database="(default)",
        field="basic",
        index_config=gcp.firestore.FieldIndexConfigArgs(
            indexes=[
                gcp.firestore.FieldIndexConfigIndexArgs(
                    order="ASCENDING",
                    query_scope="COLLECTION_GROUP",
                ),
                gcp.firestore.FieldIndexConfigIndexArgs(
                    array_config="CONTAINS",
                ),
            ],
        ),
        project="my-project-name")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const basic = new gcp.firestore.Field("basic", {
        collection: "chatrooms_%{random_suffix}",
        database: "(default)",
        field: "basic",
        indexConfig: {
            indexes: [
                {
                    order: "ASCENDING",
                    queryScope: "COLLECTION_GROUP",
                },
                {
                    arrayConfig: "CONTAINS",
                },
            ],
        },
        project: "my-project-name",
    });
    
    resources:
      basic:
        type: gcp:firestore:Field
        properties:
          collection: chatrooms_%{random_suffix}
          database: (default)
          field: basic
          indexConfig:
            indexes:
              - order: ASCENDING
                queryScope: COLLECTION_GROUP
              - arrayConfig: CONTAINS
          project: my-project-name
    

    Firestore Field Timestamp

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var timestamp = new Gcp.Firestore.Field("timestamp", new()
        {
            Collection = "chatrooms_%{random_suffix}",
            FieldId = "timestamp",
            IndexConfig = null,
            Project = "my-project-name",
            TtlConfig = null,
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/firestore"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := firestore.NewField(ctx, "timestamp", &firestore.FieldArgs{
    			Collection:  pulumi.String("chatrooms_%{random_suffix}"),
    			Field:       pulumi.String("timestamp"),
    			IndexConfig: nil,
    			Project:     pulumi.String("my-project-name"),
    			TtlConfig:   nil,
    		})
    		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.firestore.Field;
    import com.pulumi.gcp.firestore.FieldArgs;
    import com.pulumi.gcp.firestore.inputs.FieldIndexConfigArgs;
    import com.pulumi.gcp.firestore.inputs.FieldTtlConfigArgs;
    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 timestamp = new Field("timestamp", FieldArgs.builder()        
                .collection("chatrooms_%{random_suffix}")
                .field("timestamp")
                .indexConfig()
                .project("my-project-name")
                .ttlConfig()
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_gcp as gcp
    
    timestamp = gcp.firestore.Field("timestamp",
        collection="chatrooms_%{random_suffix}",
        field="timestamp",
        index_config=gcp.firestore.FieldIndexConfigArgs(),
        project="my-project-name",
        ttl_config=gcp.firestore.FieldTtlConfigArgs())
    
    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const timestamp = new gcp.firestore.Field("timestamp", {
        collection: "chatrooms_%{random_suffix}",
        field: "timestamp",
        indexConfig: {},
        project: "my-project-name",
        ttlConfig: {},
    });
    
    resources:
      timestamp:
        type: gcp:firestore:Field
        properties:
          collection: chatrooms_%{random_suffix}
          field: timestamp
          # Disable all single field indexes for the timestamp property.
          indexConfig: {}
          project: my-project-name
          # enables a TTL policy for the document based on the value of entries with this field
          ttlConfig: {}
    

    Firestore Field Match Override

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var matchOverride = new Gcp.Firestore.Field("matchOverride", new()
        {
            Collection = "chatrooms_%{random_suffix}",
            FieldId = "field_with_same_configuration_as_ancestor",
            IndexConfig = new Gcp.Firestore.Inputs.FieldIndexConfigArgs
            {
                Indexes = new[]
                {
                    new Gcp.Firestore.Inputs.FieldIndexConfigIndexArgs
                    {
                        Order = "ASCENDING",
                    },
                    new Gcp.Firestore.Inputs.FieldIndexConfigIndexArgs
                    {
                        Order = "DESCENDING",
                    },
                    new Gcp.Firestore.Inputs.FieldIndexConfigIndexArgs
                    {
                        ArrayConfig = "CONTAINS",
                    },
                },
            },
            Project = "my-project-name",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/firestore"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := firestore.NewField(ctx, "matchOverride", &firestore.FieldArgs{
    			Collection: pulumi.String("chatrooms_%{random_suffix}"),
    			Field:      pulumi.String("field_with_same_configuration_as_ancestor"),
    			IndexConfig: &firestore.FieldIndexConfigArgs{
    				Indexes: firestore.FieldIndexConfigIndexArray{
    					&firestore.FieldIndexConfigIndexArgs{
    						Order: pulumi.String("ASCENDING"),
    					},
    					&firestore.FieldIndexConfigIndexArgs{
    						Order: pulumi.String("DESCENDING"),
    					},
    					&firestore.FieldIndexConfigIndexArgs{
    						ArrayConfig: pulumi.String("CONTAINS"),
    					},
    				},
    			},
    			Project: pulumi.String("my-project-name"),
    		})
    		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.firestore.Field;
    import com.pulumi.gcp.firestore.FieldArgs;
    import com.pulumi.gcp.firestore.inputs.FieldIndexConfigArgs;
    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 matchOverride = new Field("matchOverride", FieldArgs.builder()        
                .collection("chatrooms_%{random_suffix}")
                .field("field_with_same_configuration_as_ancestor")
                .indexConfig(FieldIndexConfigArgs.builder()
                    .indexes(                
                        FieldIndexConfigIndexArgs.builder()
                            .order("ASCENDING")
                            .build(),
                        FieldIndexConfigIndexArgs.builder()
                            .order("DESCENDING")
                            .build(),
                        FieldIndexConfigIndexArgs.builder()
                            .arrayConfig("CONTAINS")
                            .build())
                    .build())
                .project("my-project-name")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_gcp as gcp
    
    match_override = gcp.firestore.Field("matchOverride",
        collection="chatrooms_%{random_suffix}",
        field="field_with_same_configuration_as_ancestor",
        index_config=gcp.firestore.FieldIndexConfigArgs(
            indexes=[
                gcp.firestore.FieldIndexConfigIndexArgs(
                    order="ASCENDING",
                ),
                gcp.firestore.FieldIndexConfigIndexArgs(
                    order="DESCENDING",
                ),
                gcp.firestore.FieldIndexConfigIndexArgs(
                    array_config="CONTAINS",
                ),
            ],
        ),
        project="my-project-name")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const matchOverride = new gcp.firestore.Field("matchOverride", {
        collection: "chatrooms_%{random_suffix}",
        field: "field_with_same_configuration_as_ancestor",
        indexConfig: {
            indexes: [
                {
                    order: "ASCENDING",
                },
                {
                    order: "DESCENDING",
                },
                {
                    arrayConfig: "CONTAINS",
                },
            ],
        },
        project: "my-project-name",
    });
    
    resources:
      matchOverride:
        type: gcp:firestore:Field
        properties:
          collection: chatrooms_%{random_suffix}
          field: field_with_same_configuration_as_ancestor
          indexConfig:
            indexes:
              - order: ASCENDING
              - order: DESCENDING
              - arrayConfig: CONTAINS
          project: my-project-name
    

    Create Field Resource

    new Field(name: string, args: FieldArgs, opts?: CustomResourceOptions);
    @overload
    def Field(resource_name: str,
              opts: Optional[ResourceOptions] = None,
              collection: Optional[str] = None,
              database: Optional[str] = None,
              field: Optional[str] = None,
              index_config: Optional[FieldIndexConfigArgs] = None,
              project: Optional[str] = None,
              ttl_config: Optional[FieldTtlConfigArgs] = None)
    @overload
    def Field(resource_name: str,
              args: FieldArgs,
              opts: Optional[ResourceOptions] = None)
    func NewField(ctx *Context, name string, args FieldArgs, opts ...ResourceOption) (*Field, error)
    public Field(string name, FieldArgs args, CustomResourceOptions? opts = null)
    public Field(String name, FieldArgs args)
    public Field(String name, FieldArgs args, CustomResourceOptions options)
    
    type: gcp:firestore:Field
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args FieldArgs
    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 FieldArgs
    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 FieldArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args FieldArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args FieldArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Field 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 Field resource accepts the following input properties:

    Collection string

    The id of the collection group to configure.

    FieldId string

    The id of the field to configure.


    Database string

    The Firestore database id. Defaults to "(default)".

    IndexConfig FieldIndexConfig

    The single field index configuration for this field. Creating an index configuration for this field will override any inherited configuration with the indexes specified. Configuring the index configuration with an empty block disables all indexes on the field. Structure is documented below.

    Project string

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

    TtlConfig FieldTtlConfig

    The TTL configuration for this Field. If set to an empty block (i.e. ttl_config {}), a TTL policy is configured based on the field. If unset, a TTL policy is not configured (or will be disabled upon updating the resource). Structure is documented below.

    Collection string

    The id of the collection group to configure.

    Field string

    The id of the field to configure.


    Database string

    The Firestore database id. Defaults to "(default)".

    IndexConfig FieldIndexConfigArgs

    The single field index configuration for this field. Creating an index configuration for this field will override any inherited configuration with the indexes specified. Configuring the index configuration with an empty block disables all indexes on the field. Structure is documented below.

    Project string

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

    TtlConfig FieldTtlConfigArgs

    The TTL configuration for this Field. If set to an empty block (i.e. ttl_config {}), a TTL policy is configured based on the field. If unset, a TTL policy is not configured (or will be disabled upon updating the resource). Structure is documented below.

    collection String

    The id of the collection group to configure.

    field String

    The id of the field to configure.


    database String

    The Firestore database id. Defaults to "(default)".

    indexConfig FieldIndexConfig

    The single field index configuration for this field. Creating an index configuration for this field will override any inherited configuration with the indexes specified. Configuring the index configuration with an empty block disables all indexes on the field. Structure is documented below.

    project String

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

    ttlConfig FieldTtlConfig

    The TTL configuration for this Field. If set to an empty block (i.e. ttl_config {}), a TTL policy is configured based on the field. If unset, a TTL policy is not configured (or will be disabled upon updating the resource). Structure is documented below.

    collection string

    The id of the collection group to configure.

    field string

    The id of the field to configure.


    database string

    The Firestore database id. Defaults to "(default)".

    indexConfig FieldIndexConfig

    The single field index configuration for this field. Creating an index configuration for this field will override any inherited configuration with the indexes specified. Configuring the index configuration with an empty block disables all indexes on the field. Structure is documented below.

    project string

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

    ttlConfig FieldTtlConfig

    The TTL configuration for this Field. If set to an empty block (i.e. ttl_config {}), a TTL policy is configured based on the field. If unset, a TTL policy is not configured (or will be disabled upon updating the resource). Structure is documented below.

    collection str

    The id of the collection group to configure.

    field str

    The id of the field to configure.


    database str

    The Firestore database id. Defaults to "(default)".

    index_config FieldIndexConfigArgs

    The single field index configuration for this field. Creating an index configuration for this field will override any inherited configuration with the indexes specified. Configuring the index configuration with an empty block disables all indexes on the field. Structure is documented below.

    project str

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

    ttl_config FieldTtlConfigArgs

    The TTL configuration for this Field. If set to an empty block (i.e. ttl_config {}), a TTL policy is configured based on the field. If unset, a TTL policy is not configured (or will be disabled upon updating the resource). Structure is documented below.

    collection String

    The id of the collection group to configure.

    field String

    The id of the field to configure.


    database String

    The Firestore database id. Defaults to "(default)".

    indexConfig Property Map

    The single field index configuration for this field. Creating an index configuration for this field will override any inherited configuration with the indexes specified. Configuring the index configuration with an empty block disables all indexes on the field. Structure is documented below.

    project String

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

    ttlConfig Property Map

    The TTL configuration for this Field. If set to an empty block (i.e. ttl_config {}), a TTL policy is configured based on the field. If unset, a TTL policy is not configured (or will be disabled upon updating the resource). Structure is documented below.

    Outputs

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

    Id string

    The provider-assigned unique ID for this managed resource.

    Name string

    The name of this field. Format: projects/{{project}}/databases/{{database}}/collectionGroups/{{collection}}/fields/{{field}}

    Id string

    The provider-assigned unique ID for this managed resource.

    Name string

    The name of this field. Format: projects/{{project}}/databases/{{database}}/collectionGroups/{{collection}}/fields/{{field}}

    id String

    The provider-assigned unique ID for this managed resource.

    name String

    The name of this field. Format: projects/{{project}}/databases/{{database}}/collectionGroups/{{collection}}/fields/{{field}}

    id string

    The provider-assigned unique ID for this managed resource.

    name string

    The name of this field. Format: projects/{{project}}/databases/{{database}}/collectionGroups/{{collection}}/fields/{{field}}

    id str

    The provider-assigned unique ID for this managed resource.

    name str

    The name of this field. Format: projects/{{project}}/databases/{{database}}/collectionGroups/{{collection}}/fields/{{field}}

    id String

    The provider-assigned unique ID for this managed resource.

    name String

    The name of this field. Format: projects/{{project}}/databases/{{database}}/collectionGroups/{{collection}}/fields/{{field}}

    Look up Existing Field Resource

    Get an existing Field 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?: FieldState, opts?: CustomResourceOptions): Field
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            collection: Optional[str] = None,
            database: Optional[str] = None,
            field: Optional[str] = None,
            index_config: Optional[FieldIndexConfigArgs] = None,
            name: Optional[str] = None,
            project: Optional[str] = None,
            ttl_config: Optional[FieldTtlConfigArgs] = None) -> Field
    func GetField(ctx *Context, name string, id IDInput, state *FieldState, opts ...ResourceOption) (*Field, error)
    public static Field Get(string name, Input<string> id, FieldState? state, CustomResourceOptions? opts = null)
    public static Field get(String name, Output<String> id, FieldState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Collection string

    The id of the collection group to configure.

    Database string

    The Firestore database id. Defaults to "(default)".

    FieldId string

    The id of the field to configure.


    IndexConfig FieldIndexConfig

    The single field index configuration for this field. Creating an index configuration for this field will override any inherited configuration with the indexes specified. Configuring the index configuration with an empty block disables all indexes on the field. Structure is documented below.

    Name string

    The name of this field. Format: projects/{{project}}/databases/{{database}}/collectionGroups/{{collection}}/fields/{{field}}

    Project string

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

    TtlConfig FieldTtlConfig

    The TTL configuration for this Field. If set to an empty block (i.e. ttl_config {}), a TTL policy is configured based on the field. If unset, a TTL policy is not configured (or will be disabled upon updating the resource). Structure is documented below.

    Collection string

    The id of the collection group to configure.

    Database string

    The Firestore database id. Defaults to "(default)".

    Field string

    The id of the field to configure.


    IndexConfig FieldIndexConfigArgs

    The single field index configuration for this field. Creating an index configuration for this field will override any inherited configuration with the indexes specified. Configuring the index configuration with an empty block disables all indexes on the field. Structure is documented below.

    Name string

    The name of this field. Format: projects/{{project}}/databases/{{database}}/collectionGroups/{{collection}}/fields/{{field}}

    Project string

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

    TtlConfig FieldTtlConfigArgs

    The TTL configuration for this Field. If set to an empty block (i.e. ttl_config {}), a TTL policy is configured based on the field. If unset, a TTL policy is not configured (or will be disabled upon updating the resource). Structure is documented below.

    collection String

    The id of the collection group to configure.

    database String

    The Firestore database id. Defaults to "(default)".

    field String

    The id of the field to configure.


    indexConfig FieldIndexConfig

    The single field index configuration for this field. Creating an index configuration for this field will override any inherited configuration with the indexes specified. Configuring the index configuration with an empty block disables all indexes on the field. Structure is documented below.

    name String

    The name of this field. Format: projects/{{project}}/databases/{{database}}/collectionGroups/{{collection}}/fields/{{field}}

    project String

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

    ttlConfig FieldTtlConfig

    The TTL configuration for this Field. If set to an empty block (i.e. ttl_config {}), a TTL policy is configured based on the field. If unset, a TTL policy is not configured (or will be disabled upon updating the resource). Structure is documented below.

    collection string

    The id of the collection group to configure.

    database string

    The Firestore database id. Defaults to "(default)".

    field string

    The id of the field to configure.


    indexConfig FieldIndexConfig

    The single field index configuration for this field. Creating an index configuration for this field will override any inherited configuration with the indexes specified. Configuring the index configuration with an empty block disables all indexes on the field. Structure is documented below.

    name string

    The name of this field. Format: projects/{{project}}/databases/{{database}}/collectionGroups/{{collection}}/fields/{{field}}

    project string

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

    ttlConfig FieldTtlConfig

    The TTL configuration for this Field. If set to an empty block (i.e. ttl_config {}), a TTL policy is configured based on the field. If unset, a TTL policy is not configured (or will be disabled upon updating the resource). Structure is documented below.

    collection str

    The id of the collection group to configure.

    database str

    The Firestore database id. Defaults to "(default)".

    field str

    The id of the field to configure.


    index_config FieldIndexConfigArgs

    The single field index configuration for this field. Creating an index configuration for this field will override any inherited configuration with the indexes specified. Configuring the index configuration with an empty block disables all indexes on the field. Structure is documented below.

    name str

    The name of this field. Format: projects/{{project}}/databases/{{database}}/collectionGroups/{{collection}}/fields/{{field}}

    project str

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

    ttl_config FieldTtlConfigArgs

    The TTL configuration for this Field. If set to an empty block (i.e. ttl_config {}), a TTL policy is configured based on the field. If unset, a TTL policy is not configured (or will be disabled upon updating the resource). Structure is documented below.

    collection String

    The id of the collection group to configure.

    database String

    The Firestore database id. Defaults to "(default)".

    field String

    The id of the field to configure.


    indexConfig Property Map

    The single field index configuration for this field. Creating an index configuration for this field will override any inherited configuration with the indexes specified. Configuring the index configuration with an empty block disables all indexes on the field. Structure is documented below.

    name String

    The name of this field. Format: projects/{{project}}/databases/{{database}}/collectionGroups/{{collection}}/fields/{{field}}

    project String

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

    ttlConfig Property Map

    The TTL configuration for this Field. If set to an empty block (i.e. ttl_config {}), a TTL policy is configured based on the field. If unset, a TTL policy is not configured (or will be disabled upon updating the resource). Structure is documented below.

    Supporting Types

    FieldIndexConfig, FieldIndexConfigArgs

    Indexes List<FieldIndexConfigIndex>

    The indexes to configure on the field. Order or array contains must be specified. Structure is documented below.

    Indexes []FieldIndexConfigIndex

    The indexes to configure on the field. Order or array contains must be specified. Structure is documented below.

    indexes List<FieldIndexConfigIndex>

    The indexes to configure on the field. Order or array contains must be specified. Structure is documented below.

    indexes FieldIndexConfigIndex[]

    The indexes to configure on the field. Order or array contains must be specified. Structure is documented below.

    indexes Sequence[FieldIndexConfigIndex]

    The indexes to configure on the field. Order or array contains must be specified. Structure is documented below.

    indexes List<Property Map>

    The indexes to configure on the field. Order or array contains must be specified. Structure is documented below.

    FieldIndexConfigIndex, FieldIndexConfigIndexArgs

    ArrayConfig string

    Indicates that this field supports operations on arrayValues. Only one of order and arrayConfig can be specified. Possible values are: CONTAINS.

    Order string

    Indicates that this field supports ordering by the specified order or comparing using =, <, <=, >, >=, !=. Only one of order and arrayConfig can be specified. Possible values are: ASCENDING, DESCENDING.

    QueryScope string

    The scope at which a query is run. Collection scoped queries require you specify the collection at query time. Collection group scope allows queries across all collections with the same id. Default value is COLLECTION. Possible values are: COLLECTION, COLLECTION_GROUP.

    ArrayConfig string

    Indicates that this field supports operations on arrayValues. Only one of order and arrayConfig can be specified. Possible values are: CONTAINS.

    Order string

    Indicates that this field supports ordering by the specified order or comparing using =, <, <=, >, >=, !=. Only one of order and arrayConfig can be specified. Possible values are: ASCENDING, DESCENDING.

    QueryScope string

    The scope at which a query is run. Collection scoped queries require you specify the collection at query time. Collection group scope allows queries across all collections with the same id. Default value is COLLECTION. Possible values are: COLLECTION, COLLECTION_GROUP.

    arrayConfig String

    Indicates that this field supports operations on arrayValues. Only one of order and arrayConfig can be specified. Possible values are: CONTAINS.

    order String

    Indicates that this field supports ordering by the specified order or comparing using =, <, <=, >, >=, !=. Only one of order and arrayConfig can be specified. Possible values are: ASCENDING, DESCENDING.

    queryScope String

    The scope at which a query is run. Collection scoped queries require you specify the collection at query time. Collection group scope allows queries across all collections with the same id. Default value is COLLECTION. Possible values are: COLLECTION, COLLECTION_GROUP.

    arrayConfig string

    Indicates that this field supports operations on arrayValues. Only one of order and arrayConfig can be specified. Possible values are: CONTAINS.

    order string

    Indicates that this field supports ordering by the specified order or comparing using =, <, <=, >, >=, !=. Only one of order and arrayConfig can be specified. Possible values are: ASCENDING, DESCENDING.

    queryScope string

    The scope at which a query is run. Collection scoped queries require you specify the collection at query time. Collection group scope allows queries across all collections with the same id. Default value is COLLECTION. Possible values are: COLLECTION, COLLECTION_GROUP.

    array_config str

    Indicates that this field supports operations on arrayValues. Only one of order and arrayConfig can be specified. Possible values are: CONTAINS.

    order str

    Indicates that this field supports ordering by the specified order or comparing using =, <, <=, >, >=, !=. Only one of order and arrayConfig can be specified. Possible values are: ASCENDING, DESCENDING.

    query_scope str

    The scope at which a query is run. Collection scoped queries require you specify the collection at query time. Collection group scope allows queries across all collections with the same id. Default value is COLLECTION. Possible values are: COLLECTION, COLLECTION_GROUP.

    arrayConfig String

    Indicates that this field supports operations on arrayValues. Only one of order and arrayConfig can be specified. Possible values are: CONTAINS.

    order String

    Indicates that this field supports ordering by the specified order or comparing using =, <, <=, >, >=, !=. Only one of order and arrayConfig can be specified. Possible values are: ASCENDING, DESCENDING.

    queryScope String

    The scope at which a query is run. Collection scoped queries require you specify the collection at query time. Collection group scope allows queries across all collections with the same id. Default value is COLLECTION. Possible values are: COLLECTION, COLLECTION_GROUP.

    FieldTtlConfig, FieldTtlConfigArgs

    State string

    (Output) The state of TTL (time-to-live) configuration for documents that have this Field set.

    State string

    (Output) The state of TTL (time-to-live) configuration for documents that have this Field set.

    state String

    (Output) The state of TTL (time-to-live) configuration for documents that have this Field set.

    state string

    (Output) The state of TTL (time-to-live) configuration for documents that have this Field set.

    state str

    (Output) The state of TTL (time-to-live) configuration for documents that have this Field set.

    state String

    (Output) The state of TTL (time-to-live) configuration for documents that have this Field set.

    Import

    Field can be imported using any of these accepted formats* {{name}} In Terraform v1.5.0 and later, use an import block to import Field using one of the formats above. For exampletf import {

    id = “{{name}}”

    to = google_firestore_field.default }

     $ pulumi import gcp:firestore/field:Field When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), Field can be imported using one of the formats above. For example
    
     $ pulumi import gcp:firestore/field:Field default {{name}}
    

    Package Details

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

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

    gcp logo
    Google Cloud Classic v7.2.2 published on Monday, Jan 1, 0001 by Pulumi