1. Packages
  2. Packages
  3. Google Cloud (GCP) Classic
  4. API Docs
  5. spanner
  6. Instance
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

    An isolated set of Cloud Spanner resources on which databases can be hosted.

    To get more information about Instance, see:

    Example Usage

    Spanner Instance Basic

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const example = new gcp.spanner.Instance("example", {
        config: "regional-us-central1",
        displayName: "Test Spanner Instance",
        numNodes: 2,
        edition: "STANDARD",
        defaultBackupScheduleType: "AUTOMATIC",
        labels: {
            foo: "bar",
        },
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    example = gcp.spanner.Instance("example",
        config="regional-us-central1",
        display_name="Test Spanner Instance",
        num_nodes=2,
        edition="STANDARD",
        default_backup_schedule_type="AUTOMATIC",
        labels={
            "foo": "bar",
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/spanner"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := spanner.NewInstance(ctx, "example", &spanner.InstanceArgs{
    			Config:                    pulumi.String("regional-us-central1"),
    			DisplayName:               pulumi.String("Test Spanner Instance"),
    			NumNodes:                  pulumi.Int(2),
    			Edition:                   pulumi.String("STANDARD"),
    			DefaultBackupScheduleType: pulumi.String("AUTOMATIC"),
    			Labels: pulumi.StringMap{
    				"foo": pulumi.String("bar"),
    			},
    		})
    		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 example = new Gcp.Spanner.Instance("example", new()
        {
            Config = "regional-us-central1",
            DisplayName = "Test Spanner Instance",
            NumNodes = 2,
            Edition = "STANDARD",
            DefaultBackupScheduleType = "AUTOMATIC",
            Labels = 
            {
                { "foo", "bar" },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.spanner.Instance;
    import com.pulumi.gcp.spanner.InstanceArgs;
    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 example = new Instance("example", InstanceArgs.builder()
                .config("regional-us-central1")
                .displayName("Test Spanner Instance")
                .numNodes(2)
                .edition("STANDARD")
                .defaultBackupScheduleType("AUTOMATIC")
                .labels(Map.of("foo", "bar"))
                .build());
    
        }
    }
    
    resources:
      example:
        type: gcp:spanner:Instance
        properties:
          config: regional-us-central1
          displayName: Test Spanner Instance
          numNodes: 2
          edition: STANDARD
          defaultBackupScheduleType: AUTOMATIC
          labels:
            foo: bar
    

    Spanner Instance Processing Units

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const example = new gcp.spanner.Instance("example", {
        config: "regional-us-central1",
        displayName: "Test Spanner Instance",
        processingUnits: 200,
        labels: {
            foo: "bar",
        },
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    example = gcp.spanner.Instance("example",
        config="regional-us-central1",
        display_name="Test Spanner Instance",
        processing_units=200,
        labels={
            "foo": "bar",
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/spanner"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := spanner.NewInstance(ctx, "example", &spanner.InstanceArgs{
    			Config:          pulumi.String("regional-us-central1"),
    			DisplayName:     pulumi.String("Test Spanner Instance"),
    			ProcessingUnits: pulumi.Int(200),
    			Labels: pulumi.StringMap{
    				"foo": pulumi.String("bar"),
    			},
    		})
    		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 example = new Gcp.Spanner.Instance("example", new()
        {
            Config = "regional-us-central1",
            DisplayName = "Test Spanner Instance",
            ProcessingUnits = 200,
            Labels = 
            {
                { "foo", "bar" },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.spanner.Instance;
    import com.pulumi.gcp.spanner.InstanceArgs;
    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 example = new Instance("example", InstanceArgs.builder()
                .config("regional-us-central1")
                .displayName("Test Spanner Instance")
                .processingUnits(200)
                .labels(Map.of("foo", "bar"))
                .build());
    
        }
    }
    
    resources:
      example:
        type: gcp:spanner:Instance
        properties:
          config: regional-us-central1
          displayName: Test Spanner Instance
          processingUnits: 200
          labels:
            foo: bar
    

    Spanner Instance Multi Regional

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const example = new gcp.spanner.Instance("example", {
        config: "nam-eur-asia1",
        displayName: "Multi Regional Instance",
        numNodes: 2,
        labels: {
            foo: "bar",
        },
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    example = gcp.spanner.Instance("example",
        config="nam-eur-asia1",
        display_name="Multi Regional Instance",
        num_nodes=2,
        labels={
            "foo": "bar",
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/spanner"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := spanner.NewInstance(ctx, "example", &spanner.InstanceArgs{
    			Config:      pulumi.String("nam-eur-asia1"),
    			DisplayName: pulumi.String("Multi Regional Instance"),
    			NumNodes:    pulumi.Int(2),
    			Labels: pulumi.StringMap{
    				"foo": pulumi.String("bar"),
    			},
    		})
    		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 example = new Gcp.Spanner.Instance("example", new()
        {
            Config = "nam-eur-asia1",
            DisplayName = "Multi Regional Instance",
            NumNodes = 2,
            Labels = 
            {
                { "foo", "bar" },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.spanner.Instance;
    import com.pulumi.gcp.spanner.InstanceArgs;
    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 example = new Instance("example", InstanceArgs.builder()
                .config("nam-eur-asia1")
                .displayName("Multi Regional Instance")
                .numNodes(2)
                .labels(Map.of("foo", "bar"))
                .build());
    
        }
    }
    
    resources:
      example:
        type: gcp:spanner:Instance
        properties:
          config: nam-eur-asia1
          displayName: Multi Regional Instance
          numNodes: 2
          labels:
            foo: bar
    

    Create Instance Resource

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

    Constructor syntax

    new Instance(name: string, args: InstanceArgs, opts?: CustomResourceOptions);
    @overload
    def Instance(resource_name: str,
                 args: InstanceArgs,
                 opts: Optional[ResourceOptions] = None)
    
    @overload
    def Instance(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 config: Optional[str] = None,
                 display_name: Optional[str] = None,
                 autoscaling_config: Optional[InstanceAutoscalingConfigArgs] = None,
                 default_backup_schedule_type: Optional[str] = None,
                 edition: Optional[str] = None,
                 force_destroy: Optional[bool] = None,
                 instance_type: Optional[str] = None,
                 labels: Optional[Mapping[str, str]] = None,
                 name: Optional[str] = None,
                 num_nodes: Optional[int] = None,
                 processing_units: Optional[int] = None,
                 project: Optional[str] = None)
    func NewInstance(ctx *Context, name string, args InstanceArgs, opts ...ResourceOption) (*Instance, error)
    public Instance(string name, InstanceArgs args, CustomResourceOptions? opts = null)
    public Instance(String name, InstanceArgs args)
    public Instance(String name, InstanceArgs args, CustomResourceOptions options)
    
    type: gcp:spanner:Instance
    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 InstanceArgs
    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 InstanceArgs
    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 InstanceArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args InstanceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args InstanceArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

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

    Config string
    The name of the instance's configuration (similar but not quite the same as a region) which defines the geographic placement and replication of your databases in this instance. It determines where your data is stored. Values are typically of the form regional-europe-west1 , us-central etc. In order to obtain a valid list please consult the Configuration section of the docs.
    DisplayName string
    The descriptive name for this instance as it appears in UIs. Must be unique per project and between 4 and 30 characters in length.
    AutoscalingConfig InstanceAutoscalingConfig
    The autoscaling configuration. Autoscaling is enabled if this field is set. Exactly one of either num_nodes, processingUnits or autoscalingConfig must be present in terraform except when instanceType = FREE_INSTANCE. When autoscaling is enabled, numNodes and processingUnits are treated as, OUTPUT_ONLY fields and reflect the current compute capacity allocated to the instance. Structure is documented below.
    DefaultBackupScheduleType string
    Controls the default backup behavior for new databases within the instance. Note that AUTOMATIC is not permitted for free instances, as backups and backup schedules are not allowed for free instances. if unset or NONE, no default backup schedule will be created for new databases within the instance. Possible values are: NONE, AUTOMATIC.
    Edition string
    The edition selected for this instance. Different editions provide different capabilities at different price points. Possible values are: EDITION_UNSPECIFIED, STANDARD, ENTERPRISE, ENTERPRISE_PLUS.
    ForceDestroy bool
    When deleting a spanner instance, this boolean option will delete all backups of this instance. This must be set to true if you created a backup manually in the console.
    InstanceType string
    The type of this instance. The type can be used to distinguish product variants, that can affect aspects like: usage restrictions, quotas and billing. Currently this is used to distinguish FREE_INSTANCE vs PROVISIONED instances. When configured as FREE_INSTANCE, the field edition should not be configured. Possible values are: PROVISIONED, FREE_INSTANCE.
    Labels Dictionary<string, string>

    An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

    Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field effectiveLabels for all of the labels present on the resource.

    Name string
    A unique identifier for the instance, which cannot be changed after the instance is created. The name must be between 6 and 30 characters in length. If not provided, a random string starting with tf- will be selected.
    NumNodes int
    The number of nodes allocated to this instance. Exactly one of either num_nodes, processingUnits or autoscalingConfig must be present in terraform except when instanceType = FREE_INSTANCE.
    ProcessingUnits int
    The number of processing units allocated to this instance. Exactly one of either num_nodes, processingUnits or autoscalingConfig must be present in terraform except when instanceType = FREE_INSTANCE.
    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    Config string
    The name of the instance's configuration (similar but not quite the same as a region) which defines the geographic placement and replication of your databases in this instance. It determines where your data is stored. Values are typically of the form regional-europe-west1 , us-central etc. In order to obtain a valid list please consult the Configuration section of the docs.
    DisplayName string
    The descriptive name for this instance as it appears in UIs. Must be unique per project and between 4 and 30 characters in length.
    AutoscalingConfig InstanceAutoscalingConfigArgs
    The autoscaling configuration. Autoscaling is enabled if this field is set. Exactly one of either num_nodes, processingUnits or autoscalingConfig must be present in terraform except when instanceType = FREE_INSTANCE. When autoscaling is enabled, numNodes and processingUnits are treated as, OUTPUT_ONLY fields and reflect the current compute capacity allocated to the instance. Structure is documented below.
    DefaultBackupScheduleType string
    Controls the default backup behavior for new databases within the instance. Note that AUTOMATIC is not permitted for free instances, as backups and backup schedules are not allowed for free instances. if unset or NONE, no default backup schedule will be created for new databases within the instance. Possible values are: NONE, AUTOMATIC.
    Edition string
    The edition selected for this instance. Different editions provide different capabilities at different price points. Possible values are: EDITION_UNSPECIFIED, STANDARD, ENTERPRISE, ENTERPRISE_PLUS.
    ForceDestroy bool
    When deleting a spanner instance, this boolean option will delete all backups of this instance. This must be set to true if you created a backup manually in the console.
    InstanceType string
    The type of this instance. The type can be used to distinguish product variants, that can affect aspects like: usage restrictions, quotas and billing. Currently this is used to distinguish FREE_INSTANCE vs PROVISIONED instances. When configured as FREE_INSTANCE, the field edition should not be configured. Possible values are: PROVISIONED, FREE_INSTANCE.
    Labels map[string]string

    An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

    Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field effectiveLabels for all of the labels present on the resource.

    Name string
    A unique identifier for the instance, which cannot be changed after the instance is created. The name must be between 6 and 30 characters in length. If not provided, a random string starting with tf- will be selected.
    NumNodes int
    The number of nodes allocated to this instance. Exactly one of either num_nodes, processingUnits or autoscalingConfig must be present in terraform except when instanceType = FREE_INSTANCE.
    ProcessingUnits int
    The number of processing units allocated to this instance. Exactly one of either num_nodes, processingUnits or autoscalingConfig must be present in terraform except when instanceType = FREE_INSTANCE.
    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    config String
    The name of the instance's configuration (similar but not quite the same as a region) which defines the geographic placement and replication of your databases in this instance. It determines where your data is stored. Values are typically of the form regional-europe-west1 , us-central etc. In order to obtain a valid list please consult the Configuration section of the docs.
    displayName String
    The descriptive name for this instance as it appears in UIs. Must be unique per project and between 4 and 30 characters in length.
    autoscalingConfig InstanceAutoscalingConfig
    The autoscaling configuration. Autoscaling is enabled if this field is set. Exactly one of either num_nodes, processingUnits or autoscalingConfig must be present in terraform except when instanceType = FREE_INSTANCE. When autoscaling is enabled, numNodes and processingUnits are treated as, OUTPUT_ONLY fields and reflect the current compute capacity allocated to the instance. Structure is documented below.
    defaultBackupScheduleType String
    Controls the default backup behavior for new databases within the instance. Note that AUTOMATIC is not permitted for free instances, as backups and backup schedules are not allowed for free instances. if unset or NONE, no default backup schedule will be created for new databases within the instance. Possible values are: NONE, AUTOMATIC.
    edition String
    The edition selected for this instance. Different editions provide different capabilities at different price points. Possible values are: EDITION_UNSPECIFIED, STANDARD, ENTERPRISE, ENTERPRISE_PLUS.
    forceDestroy Boolean
    When deleting a spanner instance, this boolean option will delete all backups of this instance. This must be set to true if you created a backup manually in the console.
    instanceType String
    The type of this instance. The type can be used to distinguish product variants, that can affect aspects like: usage restrictions, quotas and billing. Currently this is used to distinguish FREE_INSTANCE vs PROVISIONED instances. When configured as FREE_INSTANCE, the field edition should not be configured. Possible values are: PROVISIONED, FREE_INSTANCE.
    labels Map<String,String>

    An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

    Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field effectiveLabels for all of the labels present on the resource.

    name String
    A unique identifier for the instance, which cannot be changed after the instance is created. The name must be between 6 and 30 characters in length. If not provided, a random string starting with tf- will be selected.
    numNodes Integer
    The number of nodes allocated to this instance. Exactly one of either num_nodes, processingUnits or autoscalingConfig must be present in terraform except when instanceType = FREE_INSTANCE.
    processingUnits Integer
    The number of processing units allocated to this instance. Exactly one of either num_nodes, processingUnits or autoscalingConfig must be present in terraform except when instanceType = FREE_INSTANCE.
    project String
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    config string
    The name of the instance's configuration (similar but not quite the same as a region) which defines the geographic placement and replication of your databases in this instance. It determines where your data is stored. Values are typically of the form regional-europe-west1 , us-central etc. In order to obtain a valid list please consult the Configuration section of the docs.
    displayName string
    The descriptive name for this instance as it appears in UIs. Must be unique per project and between 4 and 30 characters in length.
    autoscalingConfig InstanceAutoscalingConfig
    The autoscaling configuration. Autoscaling is enabled if this field is set. Exactly one of either num_nodes, processingUnits or autoscalingConfig must be present in terraform except when instanceType = FREE_INSTANCE. When autoscaling is enabled, numNodes and processingUnits are treated as, OUTPUT_ONLY fields and reflect the current compute capacity allocated to the instance. Structure is documented below.
    defaultBackupScheduleType string
    Controls the default backup behavior for new databases within the instance. Note that AUTOMATIC is not permitted for free instances, as backups and backup schedules are not allowed for free instances. if unset or NONE, no default backup schedule will be created for new databases within the instance. Possible values are: NONE, AUTOMATIC.
    edition string
    The edition selected for this instance. Different editions provide different capabilities at different price points. Possible values are: EDITION_UNSPECIFIED, STANDARD, ENTERPRISE, ENTERPRISE_PLUS.
    forceDestroy boolean
    When deleting a spanner instance, this boolean option will delete all backups of this instance. This must be set to true if you created a backup manually in the console.
    instanceType string
    The type of this instance. The type can be used to distinguish product variants, that can affect aspects like: usage restrictions, quotas and billing. Currently this is used to distinguish FREE_INSTANCE vs PROVISIONED instances. When configured as FREE_INSTANCE, the field edition should not be configured. Possible values are: PROVISIONED, FREE_INSTANCE.
    labels {[key: string]: string}

    An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

    Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field effectiveLabels for all of the labels present on the resource.

    name string
    A unique identifier for the instance, which cannot be changed after the instance is created. The name must be between 6 and 30 characters in length. If not provided, a random string starting with tf- will be selected.
    numNodes number
    The number of nodes allocated to this instance. Exactly one of either num_nodes, processingUnits or autoscalingConfig must be present in terraform except when instanceType = FREE_INSTANCE.
    processingUnits number
    The number of processing units allocated to this instance. Exactly one of either num_nodes, processingUnits or autoscalingConfig must be present in terraform except when instanceType = FREE_INSTANCE.
    project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    config str
    The name of the instance's configuration (similar but not quite the same as a region) which defines the geographic placement and replication of your databases in this instance. It determines where your data is stored. Values are typically of the form regional-europe-west1 , us-central etc. In order to obtain a valid list please consult the Configuration section of the docs.
    display_name str
    The descriptive name for this instance as it appears in UIs. Must be unique per project and between 4 and 30 characters in length.
    autoscaling_config InstanceAutoscalingConfigArgs
    The autoscaling configuration. Autoscaling is enabled if this field is set. Exactly one of either num_nodes, processingUnits or autoscalingConfig must be present in terraform except when instanceType = FREE_INSTANCE. When autoscaling is enabled, numNodes and processingUnits are treated as, OUTPUT_ONLY fields and reflect the current compute capacity allocated to the instance. Structure is documented below.
    default_backup_schedule_type str
    Controls the default backup behavior for new databases within the instance. Note that AUTOMATIC is not permitted for free instances, as backups and backup schedules are not allowed for free instances. if unset or NONE, no default backup schedule will be created for new databases within the instance. Possible values are: NONE, AUTOMATIC.
    edition str
    The edition selected for this instance. Different editions provide different capabilities at different price points. Possible values are: EDITION_UNSPECIFIED, STANDARD, ENTERPRISE, ENTERPRISE_PLUS.
    force_destroy bool
    When deleting a spanner instance, this boolean option will delete all backups of this instance. This must be set to true if you created a backup manually in the console.
    instance_type str
    The type of this instance. The type can be used to distinguish product variants, that can affect aspects like: usage restrictions, quotas and billing. Currently this is used to distinguish FREE_INSTANCE vs PROVISIONED instances. When configured as FREE_INSTANCE, the field edition should not be configured. Possible values are: PROVISIONED, FREE_INSTANCE.
    labels Mapping[str, str]

    An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

    Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field effectiveLabels for all of the labels present on the resource.

    name str
    A unique identifier for the instance, which cannot be changed after the instance is created. The name must be between 6 and 30 characters in length. If not provided, a random string starting with tf- will be selected.
    num_nodes int
    The number of nodes allocated to this instance. Exactly one of either num_nodes, processingUnits or autoscalingConfig must be present in terraform except when instanceType = FREE_INSTANCE.
    processing_units int
    The number of processing units allocated to this instance. Exactly one of either num_nodes, processingUnits or autoscalingConfig must be present in terraform except when instanceType = FREE_INSTANCE.
    project str
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    config String
    The name of the instance's configuration (similar but not quite the same as a region) which defines the geographic placement and replication of your databases in this instance. It determines where your data is stored. Values are typically of the form regional-europe-west1 , us-central etc. In order to obtain a valid list please consult the Configuration section of the docs.
    displayName String
    The descriptive name for this instance as it appears in UIs. Must be unique per project and between 4 and 30 characters in length.
    autoscalingConfig Property Map
    The autoscaling configuration. Autoscaling is enabled if this field is set. Exactly one of either num_nodes, processingUnits or autoscalingConfig must be present in terraform except when instanceType = FREE_INSTANCE. When autoscaling is enabled, numNodes and processingUnits are treated as, OUTPUT_ONLY fields and reflect the current compute capacity allocated to the instance. Structure is documented below.
    defaultBackupScheduleType String
    Controls the default backup behavior for new databases within the instance. Note that AUTOMATIC is not permitted for free instances, as backups and backup schedules are not allowed for free instances. if unset or NONE, no default backup schedule will be created for new databases within the instance. Possible values are: NONE, AUTOMATIC.
    edition String
    The edition selected for this instance. Different editions provide different capabilities at different price points. Possible values are: EDITION_UNSPECIFIED, STANDARD, ENTERPRISE, ENTERPRISE_PLUS.
    forceDestroy Boolean
    When deleting a spanner instance, this boolean option will delete all backups of this instance. This must be set to true if you created a backup manually in the console.
    instanceType String
    The type of this instance. The type can be used to distinguish product variants, that can affect aspects like: usage restrictions, quotas and billing. Currently this is used to distinguish FREE_INSTANCE vs PROVISIONED instances. When configured as FREE_INSTANCE, the field edition should not be configured. Possible values are: PROVISIONED, FREE_INSTANCE.
    labels Map<String>

    An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

    Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field effectiveLabels for all of the labels present on the resource.

    name String
    A unique identifier for the instance, which cannot be changed after the instance is created. The name must be between 6 and 30 characters in length. If not provided, a random string starting with tf- will be selected.
    numNodes Number
    The number of nodes allocated to this instance. Exactly one of either num_nodes, processingUnits or autoscalingConfig must be present in terraform except when instanceType = FREE_INSTANCE.
    processingUnits Number
    The number of processing units allocated to this instance. Exactly one of either num_nodes, processingUnits or autoscalingConfig must be present in terraform except when instanceType = FREE_INSTANCE.
    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 Instance resource produces the following output properties:

    EffectiveLabels Dictionary<string, string>
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    Id string
    The provider-assigned unique ID for this managed resource.
    PulumiLabels Dictionary<string, string>
    The combination of labels configured directly on the resource and default labels configured on the provider.
    State string
    Instance status: CREATING or READY.
    EffectiveLabels map[string]string
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    Id string
    The provider-assigned unique ID for this managed resource.
    PulumiLabels map[string]string
    The combination of labels configured directly on the resource and default labels configured on the provider.
    State string
    Instance status: CREATING or READY.
    effectiveLabels Map<String,String>
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    id String
    The provider-assigned unique ID for this managed resource.
    pulumiLabels Map<String,String>
    The combination of labels configured directly on the resource and default labels configured on the provider.
    state String
    Instance status: CREATING or READY.
    effectiveLabels {[key: string]: string}
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    id string
    The provider-assigned unique ID for this managed resource.
    pulumiLabels {[key: string]: string}
    The combination of labels configured directly on the resource and default labels configured on the provider.
    state string
    Instance status: CREATING or READY.
    effective_labels Mapping[str, str]
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    id str
    The provider-assigned unique ID for this managed resource.
    pulumi_labels Mapping[str, str]
    The combination of labels configured directly on the resource and default labels configured on the provider.
    state str
    Instance status: CREATING or READY.
    effectiveLabels Map<String>
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    id String
    The provider-assigned unique ID for this managed resource.
    pulumiLabels Map<String>
    The combination of labels configured directly on the resource and default labels configured on the provider.
    state String
    Instance status: CREATING or READY.

    Look up Existing Instance Resource

    Get an existing Instance 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?: InstanceState, opts?: CustomResourceOptions): Instance
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            autoscaling_config: Optional[InstanceAutoscalingConfigArgs] = None,
            config: Optional[str] = None,
            default_backup_schedule_type: Optional[str] = None,
            display_name: Optional[str] = None,
            edition: Optional[str] = None,
            effective_labels: Optional[Mapping[str, str]] = None,
            force_destroy: Optional[bool] = None,
            instance_type: Optional[str] = None,
            labels: Optional[Mapping[str, str]] = None,
            name: Optional[str] = None,
            num_nodes: Optional[int] = None,
            processing_units: Optional[int] = None,
            project: Optional[str] = None,
            pulumi_labels: Optional[Mapping[str, str]] = None,
            state: Optional[str] = None) -> Instance
    func GetInstance(ctx *Context, name string, id IDInput, state *InstanceState, opts ...ResourceOption) (*Instance, error)
    public static Instance Get(string name, Input<string> id, InstanceState? state, CustomResourceOptions? opts = null)
    public static Instance get(String name, Output<String> id, InstanceState state, CustomResourceOptions options)
    resources:  _:    type: gcp:spanner:Instance    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:
    AutoscalingConfig InstanceAutoscalingConfig
    The autoscaling configuration. Autoscaling is enabled if this field is set. Exactly one of either num_nodes, processingUnits or autoscalingConfig must be present in terraform except when instanceType = FREE_INSTANCE. When autoscaling is enabled, numNodes and processingUnits are treated as, OUTPUT_ONLY fields and reflect the current compute capacity allocated to the instance. Structure is documented below.
    Config string
    The name of the instance's configuration (similar but not quite the same as a region) which defines the geographic placement and replication of your databases in this instance. It determines where your data is stored. Values are typically of the form regional-europe-west1 , us-central etc. In order to obtain a valid list please consult the Configuration section of the docs.
    DefaultBackupScheduleType string
    Controls the default backup behavior for new databases within the instance. Note that AUTOMATIC is not permitted for free instances, as backups and backup schedules are not allowed for free instances. if unset or NONE, no default backup schedule will be created for new databases within the instance. Possible values are: NONE, AUTOMATIC.
    DisplayName string
    The descriptive name for this instance as it appears in UIs. Must be unique per project and between 4 and 30 characters in length.
    Edition string
    The edition selected for this instance. Different editions provide different capabilities at different price points. Possible values are: EDITION_UNSPECIFIED, STANDARD, ENTERPRISE, ENTERPRISE_PLUS.
    EffectiveLabels Dictionary<string, string>
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    ForceDestroy bool
    When deleting a spanner instance, this boolean option will delete all backups of this instance. This must be set to true if you created a backup manually in the console.
    InstanceType string
    The type of this instance. The type can be used to distinguish product variants, that can affect aspects like: usage restrictions, quotas and billing. Currently this is used to distinguish FREE_INSTANCE vs PROVISIONED instances. When configured as FREE_INSTANCE, the field edition should not be configured. Possible values are: PROVISIONED, FREE_INSTANCE.
    Labels Dictionary<string, string>

    An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

    Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field effectiveLabels for all of the labels present on the resource.

    Name string
    A unique identifier for the instance, which cannot be changed after the instance is created. The name must be between 6 and 30 characters in length. If not provided, a random string starting with tf- will be selected.
    NumNodes int
    The number of nodes allocated to this instance. Exactly one of either num_nodes, processingUnits or autoscalingConfig must be present in terraform except when instanceType = FREE_INSTANCE.
    ProcessingUnits int
    The number of processing units allocated to this instance. Exactly one of either num_nodes, processingUnits or autoscalingConfig must be present in terraform except when instanceType = FREE_INSTANCE.
    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    PulumiLabels Dictionary<string, string>
    The combination of labels configured directly on the resource and default labels configured on the provider.
    State string
    Instance status: CREATING or READY.
    AutoscalingConfig InstanceAutoscalingConfigArgs
    The autoscaling configuration. Autoscaling is enabled if this field is set. Exactly one of either num_nodes, processingUnits or autoscalingConfig must be present in terraform except when instanceType = FREE_INSTANCE. When autoscaling is enabled, numNodes and processingUnits are treated as, OUTPUT_ONLY fields and reflect the current compute capacity allocated to the instance. Structure is documented below.
    Config string
    The name of the instance's configuration (similar but not quite the same as a region) which defines the geographic placement and replication of your databases in this instance. It determines where your data is stored. Values are typically of the form regional-europe-west1 , us-central etc. In order to obtain a valid list please consult the Configuration section of the docs.
    DefaultBackupScheduleType string
    Controls the default backup behavior for new databases within the instance. Note that AUTOMATIC is not permitted for free instances, as backups and backup schedules are not allowed for free instances. if unset or NONE, no default backup schedule will be created for new databases within the instance. Possible values are: NONE, AUTOMATIC.
    DisplayName string
    The descriptive name for this instance as it appears in UIs. Must be unique per project and between 4 and 30 characters in length.
    Edition string
    The edition selected for this instance. Different editions provide different capabilities at different price points. Possible values are: EDITION_UNSPECIFIED, STANDARD, ENTERPRISE, ENTERPRISE_PLUS.
    EffectiveLabels map[string]string
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    ForceDestroy bool
    When deleting a spanner instance, this boolean option will delete all backups of this instance. This must be set to true if you created a backup manually in the console.
    InstanceType string
    The type of this instance. The type can be used to distinguish product variants, that can affect aspects like: usage restrictions, quotas and billing. Currently this is used to distinguish FREE_INSTANCE vs PROVISIONED instances. When configured as FREE_INSTANCE, the field edition should not be configured. Possible values are: PROVISIONED, FREE_INSTANCE.
    Labels map[string]string

    An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

    Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field effectiveLabels for all of the labels present on the resource.

    Name string
    A unique identifier for the instance, which cannot be changed after the instance is created. The name must be between 6 and 30 characters in length. If not provided, a random string starting with tf- will be selected.
    NumNodes int
    The number of nodes allocated to this instance. Exactly one of either num_nodes, processingUnits or autoscalingConfig must be present in terraform except when instanceType = FREE_INSTANCE.
    ProcessingUnits int
    The number of processing units allocated to this instance. Exactly one of either num_nodes, processingUnits or autoscalingConfig must be present in terraform except when instanceType = FREE_INSTANCE.
    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    PulumiLabels map[string]string
    The combination of labels configured directly on the resource and default labels configured on the provider.
    State string
    Instance status: CREATING or READY.
    autoscalingConfig InstanceAutoscalingConfig
    The autoscaling configuration. Autoscaling is enabled if this field is set. Exactly one of either num_nodes, processingUnits or autoscalingConfig must be present in terraform except when instanceType = FREE_INSTANCE. When autoscaling is enabled, numNodes and processingUnits are treated as, OUTPUT_ONLY fields and reflect the current compute capacity allocated to the instance. Structure is documented below.
    config String
    The name of the instance's configuration (similar but not quite the same as a region) which defines the geographic placement and replication of your databases in this instance. It determines where your data is stored. Values are typically of the form regional-europe-west1 , us-central etc. In order to obtain a valid list please consult the Configuration section of the docs.
    defaultBackupScheduleType String
    Controls the default backup behavior for new databases within the instance. Note that AUTOMATIC is not permitted for free instances, as backups and backup schedules are not allowed for free instances. if unset or NONE, no default backup schedule will be created for new databases within the instance. Possible values are: NONE, AUTOMATIC.
    displayName String
    The descriptive name for this instance as it appears in UIs. Must be unique per project and between 4 and 30 characters in length.
    edition String
    The edition selected for this instance. Different editions provide different capabilities at different price points. Possible values are: EDITION_UNSPECIFIED, STANDARD, ENTERPRISE, ENTERPRISE_PLUS.
    effectiveLabels Map<String,String>
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    forceDestroy Boolean
    When deleting a spanner instance, this boolean option will delete all backups of this instance. This must be set to true if you created a backup manually in the console.
    instanceType String
    The type of this instance. The type can be used to distinguish product variants, that can affect aspects like: usage restrictions, quotas and billing. Currently this is used to distinguish FREE_INSTANCE vs PROVISIONED instances. When configured as FREE_INSTANCE, the field edition should not be configured. Possible values are: PROVISIONED, FREE_INSTANCE.
    labels Map<String,String>

    An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

    Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field effectiveLabels for all of the labels present on the resource.

    name String
    A unique identifier for the instance, which cannot be changed after the instance is created. The name must be between 6 and 30 characters in length. If not provided, a random string starting with tf- will be selected.
    numNodes Integer
    The number of nodes allocated to this instance. Exactly one of either num_nodes, processingUnits or autoscalingConfig must be present in terraform except when instanceType = FREE_INSTANCE.
    processingUnits Integer
    The number of processing units allocated to this instance. Exactly one of either num_nodes, processingUnits or autoscalingConfig must be present in terraform except when instanceType = FREE_INSTANCE.
    project String
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    pulumiLabels Map<String,String>
    The combination of labels configured directly on the resource and default labels configured on the provider.
    state String
    Instance status: CREATING or READY.
    autoscalingConfig InstanceAutoscalingConfig
    The autoscaling configuration. Autoscaling is enabled if this field is set. Exactly one of either num_nodes, processingUnits or autoscalingConfig must be present in terraform except when instanceType = FREE_INSTANCE. When autoscaling is enabled, numNodes and processingUnits are treated as, OUTPUT_ONLY fields and reflect the current compute capacity allocated to the instance. Structure is documented below.
    config string
    The name of the instance's configuration (similar but not quite the same as a region) which defines the geographic placement and replication of your databases in this instance. It determines where your data is stored. Values are typically of the form regional-europe-west1 , us-central etc. In order to obtain a valid list please consult the Configuration section of the docs.
    defaultBackupScheduleType string
    Controls the default backup behavior for new databases within the instance. Note that AUTOMATIC is not permitted for free instances, as backups and backup schedules are not allowed for free instances. if unset or NONE, no default backup schedule will be created for new databases within the instance. Possible values are: NONE, AUTOMATIC.
    displayName string
    The descriptive name for this instance as it appears in UIs. Must be unique per project and between 4 and 30 characters in length.
    edition string
    The edition selected for this instance. Different editions provide different capabilities at different price points. Possible values are: EDITION_UNSPECIFIED, STANDARD, ENTERPRISE, ENTERPRISE_PLUS.
    effectiveLabels {[key: string]: string}
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    forceDestroy boolean
    When deleting a spanner instance, this boolean option will delete all backups of this instance. This must be set to true if you created a backup manually in the console.
    instanceType string
    The type of this instance. The type can be used to distinguish product variants, that can affect aspects like: usage restrictions, quotas and billing. Currently this is used to distinguish FREE_INSTANCE vs PROVISIONED instances. When configured as FREE_INSTANCE, the field edition should not be configured. Possible values are: PROVISIONED, FREE_INSTANCE.
    labels {[key: string]: string}

    An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

    Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field effectiveLabels for all of the labels present on the resource.

    name string
    A unique identifier for the instance, which cannot be changed after the instance is created. The name must be between 6 and 30 characters in length. If not provided, a random string starting with tf- will be selected.
    numNodes number
    The number of nodes allocated to this instance. Exactly one of either num_nodes, processingUnits or autoscalingConfig must be present in terraform except when instanceType = FREE_INSTANCE.
    processingUnits number
    The number of processing units allocated to this instance. Exactly one of either num_nodes, processingUnits or autoscalingConfig must be present in terraform except when instanceType = FREE_INSTANCE.
    project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    pulumiLabels {[key: string]: string}
    The combination of labels configured directly on the resource and default labels configured on the provider.
    state string
    Instance status: CREATING or READY.
    autoscaling_config InstanceAutoscalingConfigArgs
    The autoscaling configuration. Autoscaling is enabled if this field is set. Exactly one of either num_nodes, processingUnits or autoscalingConfig must be present in terraform except when instanceType = FREE_INSTANCE. When autoscaling is enabled, numNodes and processingUnits are treated as, OUTPUT_ONLY fields and reflect the current compute capacity allocated to the instance. Structure is documented below.
    config str
    The name of the instance's configuration (similar but not quite the same as a region) which defines the geographic placement and replication of your databases in this instance. It determines where your data is stored. Values are typically of the form regional-europe-west1 , us-central etc. In order to obtain a valid list please consult the Configuration section of the docs.
    default_backup_schedule_type str
    Controls the default backup behavior for new databases within the instance. Note that AUTOMATIC is not permitted for free instances, as backups and backup schedules are not allowed for free instances. if unset or NONE, no default backup schedule will be created for new databases within the instance. Possible values are: NONE, AUTOMATIC.
    display_name str
    The descriptive name for this instance as it appears in UIs. Must be unique per project and between 4 and 30 characters in length.
    edition str
    The edition selected for this instance. Different editions provide different capabilities at different price points. Possible values are: EDITION_UNSPECIFIED, STANDARD, ENTERPRISE, ENTERPRISE_PLUS.
    effective_labels Mapping[str, str]
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    force_destroy bool
    When deleting a spanner instance, this boolean option will delete all backups of this instance. This must be set to true if you created a backup manually in the console.
    instance_type str
    The type of this instance. The type can be used to distinguish product variants, that can affect aspects like: usage restrictions, quotas and billing. Currently this is used to distinguish FREE_INSTANCE vs PROVISIONED instances. When configured as FREE_INSTANCE, the field edition should not be configured. Possible values are: PROVISIONED, FREE_INSTANCE.
    labels Mapping[str, str]

    An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

    Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field effectiveLabels for all of the labels present on the resource.

    name str
    A unique identifier for the instance, which cannot be changed after the instance is created. The name must be between 6 and 30 characters in length. If not provided, a random string starting with tf- will be selected.
    num_nodes int
    The number of nodes allocated to this instance. Exactly one of either num_nodes, processingUnits or autoscalingConfig must be present in terraform except when instanceType = FREE_INSTANCE.
    processing_units int
    The number of processing units allocated to this instance. Exactly one of either num_nodes, processingUnits or autoscalingConfig must be present in terraform except when instanceType = FREE_INSTANCE.
    project str
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    pulumi_labels Mapping[str, str]
    The combination of labels configured directly on the resource and default labels configured on the provider.
    state str
    Instance status: CREATING or READY.
    autoscalingConfig Property Map
    The autoscaling configuration. Autoscaling is enabled if this field is set. Exactly one of either num_nodes, processingUnits or autoscalingConfig must be present in terraform except when instanceType = FREE_INSTANCE. When autoscaling is enabled, numNodes and processingUnits are treated as, OUTPUT_ONLY fields and reflect the current compute capacity allocated to the instance. Structure is documented below.
    config String
    The name of the instance's configuration (similar but not quite the same as a region) which defines the geographic placement and replication of your databases in this instance. It determines where your data is stored. Values are typically of the form regional-europe-west1 , us-central etc. In order to obtain a valid list please consult the Configuration section of the docs.
    defaultBackupScheduleType String
    Controls the default backup behavior for new databases within the instance. Note that AUTOMATIC is not permitted for free instances, as backups and backup schedules are not allowed for free instances. if unset or NONE, no default backup schedule will be created for new databases within the instance. Possible values are: NONE, AUTOMATIC.
    displayName String
    The descriptive name for this instance as it appears in UIs. Must be unique per project and between 4 and 30 characters in length.
    edition String
    The edition selected for this instance. Different editions provide different capabilities at different price points. Possible values are: EDITION_UNSPECIFIED, STANDARD, ENTERPRISE, ENTERPRISE_PLUS.
    effectiveLabels Map<String>
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    forceDestroy Boolean
    When deleting a spanner instance, this boolean option will delete all backups of this instance. This must be set to true if you created a backup manually in the console.
    instanceType String
    The type of this instance. The type can be used to distinguish product variants, that can affect aspects like: usage restrictions, quotas and billing. Currently this is used to distinguish FREE_INSTANCE vs PROVISIONED instances. When configured as FREE_INSTANCE, the field edition should not be configured. Possible values are: PROVISIONED, FREE_INSTANCE.
    labels Map<String>

    An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

    Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field effectiveLabels for all of the labels present on the resource.

    name String
    A unique identifier for the instance, which cannot be changed after the instance is created. The name must be between 6 and 30 characters in length. If not provided, a random string starting with tf- will be selected.
    numNodes Number
    The number of nodes allocated to this instance. Exactly one of either num_nodes, processingUnits or autoscalingConfig must be present in terraform except when instanceType = FREE_INSTANCE.
    processingUnits Number
    The number of processing units allocated to this instance. Exactly one of either num_nodes, processingUnits or autoscalingConfig must be present in terraform except when instanceType = FREE_INSTANCE.
    project String
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    pulumiLabels Map<String>
    The combination of labels configured directly on the resource and default labels configured on the provider.
    state String
    Instance status: CREATING or READY.

    Supporting Types

    InstanceAutoscalingConfig, InstanceAutoscalingConfigArgs

    AsymmetricAutoscalingOptions List<InstanceAutoscalingConfigAsymmetricAutoscalingOption>
    Asymmetric autoscaling options for specific replicas. Structure is documented below.
    AutoscalingLimits InstanceAutoscalingConfigAutoscalingLimits
    Defines scale in controls to reduce the risk of response latency and outages due to abrupt scale-in events. Users can define the minimum and maximum compute capacity allocated to the instance, and the autoscaler will only scale within that range. Users can either use nodes or processing units to specify the limits, but should use the same unit to set both the minLimit and max_limit. Structure is documented below.
    AutoscalingTargets InstanceAutoscalingConfigAutoscalingTargets
    Defines scale in controls to reduce the risk of response latency and outages due to abrupt scale-in events Structure is documented below.
    AsymmetricAutoscalingOptions []InstanceAutoscalingConfigAsymmetricAutoscalingOption
    Asymmetric autoscaling options for specific replicas. Structure is documented below.
    AutoscalingLimits InstanceAutoscalingConfigAutoscalingLimits
    Defines scale in controls to reduce the risk of response latency and outages due to abrupt scale-in events. Users can define the minimum and maximum compute capacity allocated to the instance, and the autoscaler will only scale within that range. Users can either use nodes or processing units to specify the limits, but should use the same unit to set both the minLimit and max_limit. Structure is documented below.
    AutoscalingTargets InstanceAutoscalingConfigAutoscalingTargets
    Defines scale in controls to reduce the risk of response latency and outages due to abrupt scale-in events Structure is documented below.
    asymmetricAutoscalingOptions List<InstanceAutoscalingConfigAsymmetricAutoscalingOption>
    Asymmetric autoscaling options for specific replicas. Structure is documented below.
    autoscalingLimits InstanceAutoscalingConfigAutoscalingLimits
    Defines scale in controls to reduce the risk of response latency and outages due to abrupt scale-in events. Users can define the minimum and maximum compute capacity allocated to the instance, and the autoscaler will only scale within that range. Users can either use nodes or processing units to specify the limits, but should use the same unit to set both the minLimit and max_limit. Structure is documented below.
    autoscalingTargets InstanceAutoscalingConfigAutoscalingTargets
    Defines scale in controls to reduce the risk of response latency and outages due to abrupt scale-in events Structure is documented below.
    asymmetricAutoscalingOptions InstanceAutoscalingConfigAsymmetricAutoscalingOption[]
    Asymmetric autoscaling options for specific replicas. Structure is documented below.
    autoscalingLimits InstanceAutoscalingConfigAutoscalingLimits
    Defines scale in controls to reduce the risk of response latency and outages due to abrupt scale-in events. Users can define the minimum and maximum compute capacity allocated to the instance, and the autoscaler will only scale within that range. Users can either use nodes or processing units to specify the limits, but should use the same unit to set both the minLimit and max_limit. Structure is documented below.
    autoscalingTargets InstanceAutoscalingConfigAutoscalingTargets
    Defines scale in controls to reduce the risk of response latency and outages due to abrupt scale-in events Structure is documented below.
    asymmetric_autoscaling_options Sequence[InstanceAutoscalingConfigAsymmetricAutoscalingOption]
    Asymmetric autoscaling options for specific replicas. Structure is documented below.
    autoscaling_limits InstanceAutoscalingConfigAutoscalingLimits
    Defines scale in controls to reduce the risk of response latency and outages due to abrupt scale-in events. Users can define the minimum and maximum compute capacity allocated to the instance, and the autoscaler will only scale within that range. Users can either use nodes or processing units to specify the limits, but should use the same unit to set both the minLimit and max_limit. Structure is documented below.
    autoscaling_targets InstanceAutoscalingConfigAutoscalingTargets
    Defines scale in controls to reduce the risk of response latency and outages due to abrupt scale-in events Structure is documented below.
    asymmetricAutoscalingOptions List<Property Map>
    Asymmetric autoscaling options for specific replicas. Structure is documented below.
    autoscalingLimits Property Map
    Defines scale in controls to reduce the risk of response latency and outages due to abrupt scale-in events. Users can define the minimum and maximum compute capacity allocated to the instance, and the autoscaler will only scale within that range. Users can either use nodes or processing units to specify the limits, but should use the same unit to set both the minLimit and max_limit. Structure is documented below.
    autoscalingTargets Property Map
    Defines scale in controls to reduce the risk of response latency and outages due to abrupt scale-in events Structure is documented below.

    InstanceAutoscalingConfigAsymmetricAutoscalingOption, InstanceAutoscalingConfigAsymmetricAutoscalingOptionArgs

    Overrides InstanceAutoscalingConfigAsymmetricAutoscalingOptionOverrides
    A nested object resource. Structure is documented below.
    ReplicaSelection InstanceAutoscalingConfigAsymmetricAutoscalingOptionReplicaSelection
    A nested object resource. Structure is documented below.
    Overrides InstanceAutoscalingConfigAsymmetricAutoscalingOptionOverrides
    A nested object resource. Structure is documented below.
    ReplicaSelection InstanceAutoscalingConfigAsymmetricAutoscalingOptionReplicaSelection
    A nested object resource. Structure is documented below.
    overrides InstanceAutoscalingConfigAsymmetricAutoscalingOptionOverrides
    A nested object resource. Structure is documented below.
    replicaSelection InstanceAutoscalingConfigAsymmetricAutoscalingOptionReplicaSelection
    A nested object resource. Structure is documented below.
    overrides InstanceAutoscalingConfigAsymmetricAutoscalingOptionOverrides
    A nested object resource. Structure is documented below.
    replicaSelection InstanceAutoscalingConfigAsymmetricAutoscalingOptionReplicaSelection
    A nested object resource. Structure is documented below.
    overrides InstanceAutoscalingConfigAsymmetricAutoscalingOptionOverrides
    A nested object resource. Structure is documented below.
    replica_selection InstanceAutoscalingConfigAsymmetricAutoscalingOptionReplicaSelection
    A nested object resource. Structure is documented below.
    overrides Property Map
    A nested object resource. Structure is documented below.
    replicaSelection Property Map
    A nested object resource. Structure is documented below.

    InstanceAutoscalingConfigAsymmetricAutoscalingOptionOverrides, InstanceAutoscalingConfigAsymmetricAutoscalingOptionOverridesArgs

    AutoscalingLimits InstanceAutoscalingConfigAsymmetricAutoscalingOptionOverridesAutoscalingLimits
    A nested object resource. Structure is documented below.
    AutoscalingTargetHighPriorityCpuUtilizationPercent int
    The target high priority cpu utilization percentage that the autoscaler should be trying to achieve for this replica. This number is on a scale from 0 (no utilization) to 100 (full utilization).
    AutoscalingTargetTotalCpuUtilizationPercent int
    The target total cpu utilization percentage that the autoscaler should be trying to achieve for this replica. This number is on a scale from 0 (no utilization) to 100 (full utilization).
    DisableHighPriorityCpuAutoscaling bool
    If true, disables high priority CPU autoscaling for this replica and ignores highPriorityCpuUtilizationPercent in the top-level autoscaling configuration.
    DisableTotalCpuAutoscaling bool
    If true, disables total CPU autoscaling for this replica and ignores totalCpuUtilizationPercent in the top-level autoscaling configuration.
    AutoscalingLimits InstanceAutoscalingConfigAsymmetricAutoscalingOptionOverridesAutoscalingLimits
    A nested object resource. Structure is documented below.
    AutoscalingTargetHighPriorityCpuUtilizationPercent int
    The target high priority cpu utilization percentage that the autoscaler should be trying to achieve for this replica. This number is on a scale from 0 (no utilization) to 100 (full utilization).
    AutoscalingTargetTotalCpuUtilizationPercent int
    The target total cpu utilization percentage that the autoscaler should be trying to achieve for this replica. This number is on a scale from 0 (no utilization) to 100 (full utilization).
    DisableHighPriorityCpuAutoscaling bool
    If true, disables high priority CPU autoscaling for this replica and ignores highPriorityCpuUtilizationPercent in the top-level autoscaling configuration.
    DisableTotalCpuAutoscaling bool
    If true, disables total CPU autoscaling for this replica and ignores totalCpuUtilizationPercent in the top-level autoscaling configuration.
    autoscalingLimits InstanceAutoscalingConfigAsymmetricAutoscalingOptionOverridesAutoscalingLimits
    A nested object resource. Structure is documented below.
    autoscalingTargetHighPriorityCpuUtilizationPercent Integer
    The target high priority cpu utilization percentage that the autoscaler should be trying to achieve for this replica. This number is on a scale from 0 (no utilization) to 100 (full utilization).
    autoscalingTargetTotalCpuUtilizationPercent Integer
    The target total cpu utilization percentage that the autoscaler should be trying to achieve for this replica. This number is on a scale from 0 (no utilization) to 100 (full utilization).
    disableHighPriorityCpuAutoscaling Boolean
    If true, disables high priority CPU autoscaling for this replica and ignores highPriorityCpuUtilizationPercent in the top-level autoscaling configuration.
    disableTotalCpuAutoscaling Boolean
    If true, disables total CPU autoscaling for this replica and ignores totalCpuUtilizationPercent in the top-level autoscaling configuration.
    autoscalingLimits InstanceAutoscalingConfigAsymmetricAutoscalingOptionOverridesAutoscalingLimits
    A nested object resource. Structure is documented below.
    autoscalingTargetHighPriorityCpuUtilizationPercent number
    The target high priority cpu utilization percentage that the autoscaler should be trying to achieve for this replica. This number is on a scale from 0 (no utilization) to 100 (full utilization).
    autoscalingTargetTotalCpuUtilizationPercent number
    The target total cpu utilization percentage that the autoscaler should be trying to achieve for this replica. This number is on a scale from 0 (no utilization) to 100 (full utilization).
    disableHighPriorityCpuAutoscaling boolean
    If true, disables high priority CPU autoscaling for this replica and ignores highPriorityCpuUtilizationPercent in the top-level autoscaling configuration.
    disableTotalCpuAutoscaling boolean
    If true, disables total CPU autoscaling for this replica and ignores totalCpuUtilizationPercent in the top-level autoscaling configuration.
    autoscaling_limits InstanceAutoscalingConfigAsymmetricAutoscalingOptionOverridesAutoscalingLimits
    A nested object resource. Structure is documented below.
    autoscaling_target_high_priority_cpu_utilization_percent int
    The target high priority cpu utilization percentage that the autoscaler should be trying to achieve for this replica. This number is on a scale from 0 (no utilization) to 100 (full utilization).
    autoscaling_target_total_cpu_utilization_percent int
    The target total cpu utilization percentage that the autoscaler should be trying to achieve for this replica. This number is on a scale from 0 (no utilization) to 100 (full utilization).
    disable_high_priority_cpu_autoscaling bool
    If true, disables high priority CPU autoscaling for this replica and ignores highPriorityCpuUtilizationPercent in the top-level autoscaling configuration.
    disable_total_cpu_autoscaling bool
    If true, disables total CPU autoscaling for this replica and ignores totalCpuUtilizationPercent in the top-level autoscaling configuration.
    autoscalingLimits Property Map
    A nested object resource. Structure is documented below.
    autoscalingTargetHighPriorityCpuUtilizationPercent Number
    The target high priority cpu utilization percentage that the autoscaler should be trying to achieve for this replica. This number is on a scale from 0 (no utilization) to 100 (full utilization).
    autoscalingTargetTotalCpuUtilizationPercent Number
    The target total cpu utilization percentage that the autoscaler should be trying to achieve for this replica. This number is on a scale from 0 (no utilization) to 100 (full utilization).
    disableHighPriorityCpuAutoscaling Boolean
    If true, disables high priority CPU autoscaling for this replica and ignores highPriorityCpuUtilizationPercent in the top-level autoscaling configuration.
    disableTotalCpuAutoscaling Boolean
    If true, disables total CPU autoscaling for this replica and ignores totalCpuUtilizationPercent in the top-level autoscaling configuration.

    InstanceAutoscalingConfigAsymmetricAutoscalingOptionOverridesAutoscalingLimits, InstanceAutoscalingConfigAsymmetricAutoscalingOptionOverridesAutoscalingLimitsArgs

    MaxNodes int
    The maximum number of nodes for this specific replica.
    MaxProcessingUnits int
    The maximum number of processing units for this specific replica. If set, this number should be multiples of 1000 and be greater than or equal to min_processing_units.
    MinNodes int
    The minimum number of nodes for this specific replica.
    MinProcessingUnits int
    The minimum number of processing units for this specific replica. If set, this number should be multiples of 1000.
    MaxNodes int
    The maximum number of nodes for this specific replica.
    MaxProcessingUnits int
    The maximum number of processing units for this specific replica. If set, this number should be multiples of 1000 and be greater than or equal to min_processing_units.
    MinNodes int
    The minimum number of nodes for this specific replica.
    MinProcessingUnits int
    The minimum number of processing units for this specific replica. If set, this number should be multiples of 1000.
    maxNodes Integer
    The maximum number of nodes for this specific replica.
    maxProcessingUnits Integer
    The maximum number of processing units for this specific replica. If set, this number should be multiples of 1000 and be greater than or equal to min_processing_units.
    minNodes Integer
    The minimum number of nodes for this specific replica.
    minProcessingUnits Integer
    The minimum number of processing units for this specific replica. If set, this number should be multiples of 1000.
    maxNodes number
    The maximum number of nodes for this specific replica.
    maxProcessingUnits number
    The maximum number of processing units for this specific replica. If set, this number should be multiples of 1000 and be greater than or equal to min_processing_units.
    minNodes number
    The minimum number of nodes for this specific replica.
    minProcessingUnits number
    The minimum number of processing units for this specific replica. If set, this number should be multiples of 1000.
    max_nodes int
    The maximum number of nodes for this specific replica.
    max_processing_units int
    The maximum number of processing units for this specific replica. If set, this number should be multiples of 1000 and be greater than or equal to min_processing_units.
    min_nodes int
    The minimum number of nodes for this specific replica.
    min_processing_units int
    The minimum number of processing units for this specific replica. If set, this number should be multiples of 1000.
    maxNodes Number
    The maximum number of nodes for this specific replica.
    maxProcessingUnits Number
    The maximum number of processing units for this specific replica. If set, this number should be multiples of 1000 and be greater than or equal to min_processing_units.
    minNodes Number
    The minimum number of nodes for this specific replica.
    minProcessingUnits Number
    The minimum number of processing units for this specific replica. If set, this number should be multiples of 1000.

    InstanceAutoscalingConfigAsymmetricAutoscalingOptionReplicaSelection, InstanceAutoscalingConfigAsymmetricAutoscalingOptionReplicaSelectionArgs

    Location string
    The location of the replica to apply asymmetric autoscaling options.
    Location string
    The location of the replica to apply asymmetric autoscaling options.
    location String
    The location of the replica to apply asymmetric autoscaling options.
    location string
    The location of the replica to apply asymmetric autoscaling options.
    location str
    The location of the replica to apply asymmetric autoscaling options.
    location String
    The location of the replica to apply asymmetric autoscaling options.

    InstanceAutoscalingConfigAutoscalingLimits, InstanceAutoscalingConfigAutoscalingLimitsArgs

    MaxNodes int
    The maximum number of nodes for this specific replica.
    MaxProcessingUnits int
    The maximum number of processing units for this specific replica. If set, this number should be multiples of 1000 and be greater than or equal to min_processing_units.
    MinNodes int
    The minimum number of nodes for this specific replica.
    MinProcessingUnits int
    The minimum number of processing units for this specific replica. If set, this number should be multiples of 1000.
    MaxNodes int
    The maximum number of nodes for this specific replica.
    MaxProcessingUnits int
    The maximum number of processing units for this specific replica. If set, this number should be multiples of 1000 and be greater than or equal to min_processing_units.
    MinNodes int
    The minimum number of nodes for this specific replica.
    MinProcessingUnits int
    The minimum number of processing units for this specific replica. If set, this number should be multiples of 1000.
    maxNodes Integer
    The maximum number of nodes for this specific replica.
    maxProcessingUnits Integer
    The maximum number of processing units for this specific replica. If set, this number should be multiples of 1000 and be greater than or equal to min_processing_units.
    minNodes Integer
    The minimum number of nodes for this specific replica.
    minProcessingUnits Integer
    The minimum number of processing units for this specific replica. If set, this number should be multiples of 1000.
    maxNodes number
    The maximum number of nodes for this specific replica.
    maxProcessingUnits number
    The maximum number of processing units for this specific replica. If set, this number should be multiples of 1000 and be greater than or equal to min_processing_units.
    minNodes number
    The minimum number of nodes for this specific replica.
    minProcessingUnits number
    The minimum number of processing units for this specific replica. If set, this number should be multiples of 1000.
    max_nodes int
    The maximum number of nodes for this specific replica.
    max_processing_units int
    The maximum number of processing units for this specific replica. If set, this number should be multiples of 1000 and be greater than or equal to min_processing_units.
    min_nodes int
    The minimum number of nodes for this specific replica.
    min_processing_units int
    The minimum number of processing units for this specific replica. If set, this number should be multiples of 1000.
    maxNodes Number
    The maximum number of nodes for this specific replica.
    maxProcessingUnits Number
    The maximum number of processing units for this specific replica. If set, this number should be multiples of 1000 and be greater than or equal to min_processing_units.
    minNodes Number
    The minimum number of nodes for this specific replica.
    minProcessingUnits Number
    The minimum number of processing units for this specific replica. If set, this number should be multiples of 1000.

    InstanceAutoscalingConfigAutoscalingTargets, InstanceAutoscalingConfigAutoscalingTargetsArgs

    HighPriorityCpuUtilizationPercent int
    Specifies the target high priority cpu utilization percentage that the autoscaler should be trying to achieve for the instance. This number is on a scale from 0 (no utilization) to 100 (full utilization)..
    StorageUtilizationPercent int
    Specifies the target storage utilization percentage that the autoscaler should be trying to achieve for the instance. This number is on a scale from 0 (no utilization) to 100 (full utilization).
    TotalCpuUtilizationPercent int
    The target total cpu utilization percentage that the autoscaler should be trying to achieve for the instance. This number is on a scale from 0 (no utilization) to 100 (full utilization). The valid range is [10, 90] inclusive. If not specified or set to 0, the autoscaler will skip scaling based on total cpu utilization. The value should be higher than highPriorityCpuUtilizationPercent if present.
    HighPriorityCpuUtilizationPercent int
    Specifies the target high priority cpu utilization percentage that the autoscaler should be trying to achieve for the instance. This number is on a scale from 0 (no utilization) to 100 (full utilization)..
    StorageUtilizationPercent int
    Specifies the target storage utilization percentage that the autoscaler should be trying to achieve for the instance. This number is on a scale from 0 (no utilization) to 100 (full utilization).
    TotalCpuUtilizationPercent int
    The target total cpu utilization percentage that the autoscaler should be trying to achieve for the instance. This number is on a scale from 0 (no utilization) to 100 (full utilization). The valid range is [10, 90] inclusive. If not specified or set to 0, the autoscaler will skip scaling based on total cpu utilization. The value should be higher than highPriorityCpuUtilizationPercent if present.
    highPriorityCpuUtilizationPercent Integer
    Specifies the target high priority cpu utilization percentage that the autoscaler should be trying to achieve for the instance. This number is on a scale from 0 (no utilization) to 100 (full utilization)..
    storageUtilizationPercent Integer
    Specifies the target storage utilization percentage that the autoscaler should be trying to achieve for the instance. This number is on a scale from 0 (no utilization) to 100 (full utilization).
    totalCpuUtilizationPercent Integer
    The target total cpu utilization percentage that the autoscaler should be trying to achieve for the instance. This number is on a scale from 0 (no utilization) to 100 (full utilization). The valid range is [10, 90] inclusive. If not specified or set to 0, the autoscaler will skip scaling based on total cpu utilization. The value should be higher than highPriorityCpuUtilizationPercent if present.
    highPriorityCpuUtilizationPercent number
    Specifies the target high priority cpu utilization percentage that the autoscaler should be trying to achieve for the instance. This number is on a scale from 0 (no utilization) to 100 (full utilization)..
    storageUtilizationPercent number
    Specifies the target storage utilization percentage that the autoscaler should be trying to achieve for the instance. This number is on a scale from 0 (no utilization) to 100 (full utilization).
    totalCpuUtilizationPercent number
    The target total cpu utilization percentage that the autoscaler should be trying to achieve for the instance. This number is on a scale from 0 (no utilization) to 100 (full utilization). The valid range is [10, 90] inclusive. If not specified or set to 0, the autoscaler will skip scaling based on total cpu utilization. The value should be higher than highPriorityCpuUtilizationPercent if present.
    high_priority_cpu_utilization_percent int
    Specifies the target high priority cpu utilization percentage that the autoscaler should be trying to achieve for the instance. This number is on a scale from 0 (no utilization) to 100 (full utilization)..
    storage_utilization_percent int
    Specifies the target storage utilization percentage that the autoscaler should be trying to achieve for the instance. This number is on a scale from 0 (no utilization) to 100 (full utilization).
    total_cpu_utilization_percent int
    The target total cpu utilization percentage that the autoscaler should be trying to achieve for the instance. This number is on a scale from 0 (no utilization) to 100 (full utilization). The valid range is [10, 90] inclusive. If not specified or set to 0, the autoscaler will skip scaling based on total cpu utilization. The value should be higher than highPriorityCpuUtilizationPercent if present.
    highPriorityCpuUtilizationPercent Number
    Specifies the target high priority cpu utilization percentage that the autoscaler should be trying to achieve for the instance. This number is on a scale from 0 (no utilization) to 100 (full utilization)..
    storageUtilizationPercent Number
    Specifies the target storage utilization percentage that the autoscaler should be trying to achieve for the instance. This number is on a scale from 0 (no utilization) to 100 (full utilization).
    totalCpuUtilizationPercent Number
    The target total cpu utilization percentage that the autoscaler should be trying to achieve for the instance. This number is on a scale from 0 (no utilization) to 100 (full utilization). The valid range is [10, 90] inclusive. If not specified or set to 0, the autoscaler will skip scaling based on total cpu utilization. The value should be higher than highPriorityCpuUtilizationPercent if present.

    Import

    Instance can be imported using any of these accepted formats:

    • projects/{{project}}/instances/{{name}}
    • {{project}}/{{name}}
    • {{name}}

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

    $ pulumi import gcp:spanner/instance:Instance default projects/{{project}}/instances/{{name}}
    $ pulumi import gcp:spanner/instance:Instance default {{project}}/{{name}}
    $ pulumi import gcp:spanner/instance:Instance default {{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-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.