gcp.spanner.Instance
Explore with Pulumi AI
An isolated set of Cloud Spanner resources on which databases can be hosted.
To get more information about Instance, see:
- API documentation
- How-to Guides
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/v8/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/v8/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 With Autoscaling
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",
autoscalingConfig: {
autoscalingLimits: {
maxProcessingUnits: 3000,
minProcessingUnits: 2000,
},
autoscalingTargets: {
highPriorityCpuUtilizationPercent: 75,
storageUtilizationPercent: 90,
},
},
labels: {
foo: "bar",
},
});
import pulumi
import pulumi_gcp as gcp
example = gcp.spanner.Instance("example",
config="regional-us-central1",
display_name="Test Spanner Instance",
autoscaling_config={
"autoscaling_limits": {
"max_processing_units": 3000,
"min_processing_units": 2000,
},
"autoscaling_targets": {
"high_priority_cpu_utilization_percent": 75,
"storage_utilization_percent": 90,
},
},
labels={
"foo": "bar",
})
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/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"),
AutoscalingConfig: &spanner.InstanceAutoscalingConfigArgs{
AutoscalingLimits: &spanner.InstanceAutoscalingConfigAutoscalingLimitsArgs{
MaxProcessingUnits: pulumi.Int(3000),
MinProcessingUnits: pulumi.Int(2000),
},
AutoscalingTargets: &spanner.InstanceAutoscalingConfigAutoscalingTargetsArgs{
HighPriorityCpuUtilizationPercent: pulumi.Int(75),
StorageUtilizationPercent: pulumi.Int(90),
},
},
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",
AutoscalingConfig = new Gcp.Spanner.Inputs.InstanceAutoscalingConfigArgs
{
AutoscalingLimits = new Gcp.Spanner.Inputs.InstanceAutoscalingConfigAutoscalingLimitsArgs
{
MaxProcessingUnits = 3000,
MinProcessingUnits = 2000,
},
AutoscalingTargets = new Gcp.Spanner.Inputs.InstanceAutoscalingConfigAutoscalingTargetsArgs
{
HighPriorityCpuUtilizationPercent = 75,
StorageUtilizationPercent = 90,
},
},
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 com.pulumi.gcp.spanner.inputs.InstanceAutoscalingConfigArgs;
import com.pulumi.gcp.spanner.inputs.InstanceAutoscalingConfigAutoscalingLimitsArgs;
import com.pulumi.gcp.spanner.inputs.InstanceAutoscalingConfigAutoscalingTargetsArgs;
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")
.autoscalingConfig(InstanceAutoscalingConfigArgs.builder()
.autoscalingLimits(InstanceAutoscalingConfigAutoscalingLimitsArgs.builder()
.maxProcessingUnits(3000)
.minProcessingUnits(2000)
.build())
.autoscalingTargets(InstanceAutoscalingConfigAutoscalingTargetsArgs.builder()
.highPriorityCpuUtilizationPercent(75)
.storageUtilizationPercent(90)
.build())
.build())
.labels(Map.of("foo", "bar"))
.build());
}
}
resources:
example:
type: gcp:spanner:Instance
properties:
config: regional-us-central1
displayName: Test Spanner Instance
autoscalingConfig:
autoscalingLimits:
maxProcessingUnits: 3000
minProcessingUnits: 2000
autoscalingTargets:
highPriorityCpuUtilizationPercent: 75
storageUtilizationPercent: 90
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/v8/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,
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.
Constructor example
The following reference example uses placeholder values for all input properties.
var exampleinstanceResourceResourceFromSpannerinstance = new Gcp.Spanner.Instance("exampleinstanceResourceResourceFromSpannerinstance", new()
{
Config = "string",
DisplayName = "string",
AutoscalingConfig = new Gcp.Spanner.Inputs.InstanceAutoscalingConfigArgs
{
AsymmetricAutoscalingOptions = new[]
{
new Gcp.Spanner.Inputs.InstanceAutoscalingConfigAsymmetricAutoscalingOptionArgs
{
Overrides = new Gcp.Spanner.Inputs.InstanceAutoscalingConfigAsymmetricAutoscalingOptionOverridesArgs
{
AutoscalingLimits = new Gcp.Spanner.Inputs.InstanceAutoscalingConfigAsymmetricAutoscalingOptionOverridesAutoscalingLimitsArgs
{
MaxNodes = 0,
MinNodes = 0,
},
},
ReplicaSelection = new Gcp.Spanner.Inputs.InstanceAutoscalingConfigAsymmetricAutoscalingOptionReplicaSelectionArgs
{
Location = "string",
},
},
},
AutoscalingLimits = new Gcp.Spanner.Inputs.InstanceAutoscalingConfigAutoscalingLimitsArgs
{
MaxNodes = 0,
MaxProcessingUnits = 0,
MinNodes = 0,
MinProcessingUnits = 0,
},
AutoscalingTargets = new Gcp.Spanner.Inputs.InstanceAutoscalingConfigAutoscalingTargetsArgs
{
HighPriorityCpuUtilizationPercent = 0,
StorageUtilizationPercent = 0,
},
},
DefaultBackupScheduleType = "string",
Edition = "string",
ForceDestroy = false,
Labels =
{
{ "string", "string" },
},
Name = "string",
NumNodes = 0,
ProcessingUnits = 0,
Project = "string",
});
example, err := spanner.NewInstance(ctx, "exampleinstanceResourceResourceFromSpannerinstance", &spanner.InstanceArgs{
Config: pulumi.String("string"),
DisplayName: pulumi.String("string"),
AutoscalingConfig: &spanner.InstanceAutoscalingConfigArgs{
AsymmetricAutoscalingOptions: spanner.InstanceAutoscalingConfigAsymmetricAutoscalingOptionArray{
&spanner.InstanceAutoscalingConfigAsymmetricAutoscalingOptionArgs{
Overrides: &spanner.InstanceAutoscalingConfigAsymmetricAutoscalingOptionOverridesArgs{
AutoscalingLimits: &spanner.InstanceAutoscalingConfigAsymmetricAutoscalingOptionOverridesAutoscalingLimitsArgs{
MaxNodes: pulumi.Int(0),
MinNodes: pulumi.Int(0),
},
},
ReplicaSelection: &spanner.InstanceAutoscalingConfigAsymmetricAutoscalingOptionReplicaSelectionArgs{
Location: pulumi.String("string"),
},
},
},
AutoscalingLimits: &spanner.InstanceAutoscalingConfigAutoscalingLimitsArgs{
MaxNodes: pulumi.Int(0),
MaxProcessingUnits: pulumi.Int(0),
MinNodes: pulumi.Int(0),
MinProcessingUnits: pulumi.Int(0),
},
AutoscalingTargets: &spanner.InstanceAutoscalingConfigAutoscalingTargetsArgs{
HighPriorityCpuUtilizationPercent: pulumi.Int(0),
StorageUtilizationPercent: pulumi.Int(0),
},
},
DefaultBackupScheduleType: pulumi.String("string"),
Edition: pulumi.String("string"),
ForceDestroy: pulumi.Bool(false),
Labels: pulumi.StringMap{
"string": pulumi.String("string"),
},
Name: pulumi.String("string"),
NumNodes: pulumi.Int(0),
ProcessingUnits: pulumi.Int(0),
Project: pulumi.String("string"),
})
var exampleinstanceResourceResourceFromSpannerinstance = new Instance("exampleinstanceResourceResourceFromSpannerinstance", InstanceArgs.builder()
.config("string")
.displayName("string")
.autoscalingConfig(InstanceAutoscalingConfigArgs.builder()
.asymmetricAutoscalingOptions(InstanceAutoscalingConfigAsymmetricAutoscalingOptionArgs.builder()
.overrides(InstanceAutoscalingConfigAsymmetricAutoscalingOptionOverridesArgs.builder()
.autoscalingLimits(InstanceAutoscalingConfigAsymmetricAutoscalingOptionOverridesAutoscalingLimitsArgs.builder()
.maxNodes(0)
.minNodes(0)
.build())
.build())
.replicaSelection(InstanceAutoscalingConfigAsymmetricAutoscalingOptionReplicaSelectionArgs.builder()
.location("string")
.build())
.build())
.autoscalingLimits(InstanceAutoscalingConfigAutoscalingLimitsArgs.builder()
.maxNodes(0)
.maxProcessingUnits(0)
.minNodes(0)
.minProcessingUnits(0)
.build())
.autoscalingTargets(InstanceAutoscalingConfigAutoscalingTargetsArgs.builder()
.highPriorityCpuUtilizationPercent(0)
.storageUtilizationPercent(0)
.build())
.build())
.defaultBackupScheduleType("string")
.edition("string")
.forceDestroy(false)
.labels(Map.of("string", "string"))
.name("string")
.numNodes(0)
.processingUnits(0)
.project("string")
.build());
exampleinstance_resource_resource_from_spannerinstance = gcp.spanner.Instance("exampleinstanceResourceResourceFromSpannerinstance",
config="string",
display_name="string",
autoscaling_config={
"asymmetric_autoscaling_options": [{
"overrides": {
"autoscaling_limits": {
"max_nodes": 0,
"min_nodes": 0,
},
},
"replica_selection": {
"location": "string",
},
}],
"autoscaling_limits": {
"max_nodes": 0,
"max_processing_units": 0,
"min_nodes": 0,
"min_processing_units": 0,
},
"autoscaling_targets": {
"high_priority_cpu_utilization_percent": 0,
"storage_utilization_percent": 0,
},
},
default_backup_schedule_type="string",
edition="string",
force_destroy=False,
labels={
"string": "string",
},
name="string",
num_nodes=0,
processing_units=0,
project="string")
const exampleinstanceResourceResourceFromSpannerinstance = new gcp.spanner.Instance("exampleinstanceResourceResourceFromSpannerinstance", {
config: "string",
displayName: "string",
autoscalingConfig: {
asymmetricAutoscalingOptions: [{
overrides: {
autoscalingLimits: {
maxNodes: 0,
minNodes: 0,
},
},
replicaSelection: {
location: "string",
},
}],
autoscalingLimits: {
maxNodes: 0,
maxProcessingUnits: 0,
minNodes: 0,
minProcessingUnits: 0,
},
autoscalingTargets: {
highPriorityCpuUtilizationPercent: 0,
storageUtilizationPercent: 0,
},
},
defaultBackupScheduleType: "string",
edition: "string",
forceDestroy: false,
labels: {
string: "string",
},
name: "string",
numNodes: 0,
processingUnits: 0,
project: "string",
});
type: gcp:spanner:Instance
properties:
autoscalingConfig:
asymmetricAutoscalingOptions:
- overrides:
autoscalingLimits:
maxNodes: 0
minNodes: 0
replicaSelection:
location: string
autoscalingLimits:
maxNodes: 0
maxProcessingUnits: 0
minNodes: 0
minProcessingUnits: 0
autoscalingTargets:
highPriorityCpuUtilizationPercent: 0
storageUtilizationPercent: 0
config: string
defaultBackupScheduleType: string
displayName: string
edition: string
forceDestroy: false
labels:
string: string
name: string
numNodes: 0
processingUnits: 0
project: string
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. - Display
Name 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.
- Autoscaling
Config InstanceAutoscaling Config - The autoscaling configuration. Autoscaling is enabled if this field is set. When autoscaling is enabled, num_nodes and processing_units are treated as, OUTPUT_ONLY fields and reflect the current compute capacity allocated to the instance. Structure is documented below.
- Default
Backup stringSchedule Type - 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
. - 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.
- 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
effective_labels
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. - Num
Nodes int - Processing
Units int - 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. - Display
Name 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.
- Autoscaling
Config InstanceAutoscaling Config Args - The autoscaling configuration. Autoscaling is enabled if this field is set. When autoscaling is enabled, num_nodes and processing_units are treated as, OUTPUT_ONLY fields and reflect the current compute capacity allocated to the instance. Structure is documented below.
- Default
Backup stringSchedule Type - 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
. - 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.
- 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
effective_labels
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. - Num
Nodes int - Processing
Units int - 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. - display
Name 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.
- autoscaling
Config InstanceAutoscaling Config - The autoscaling configuration. Autoscaling is enabled if this field is set. When autoscaling is enabled, num_nodes and processing_units are treated as, OUTPUT_ONLY fields and reflect the current compute capacity allocated to the instance. Structure is documented below.
- default
Backup StringSchedule Type - 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
. - force
Destroy 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.
- 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
effective_labels
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. - num
Nodes Integer - processing
Units Integer - 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. - display
Name 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.
- autoscaling
Config InstanceAutoscaling Config - The autoscaling configuration. Autoscaling is enabled if this field is set. When autoscaling is enabled, num_nodes and processing_units are treated as, OUTPUT_ONLY fields and reflect the current compute capacity allocated to the instance. Structure is documented below.
- default
Backup stringSchedule Type - 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
. - force
Destroy 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.
- 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
effective_labels
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. - num
Nodes number - processing
Units number - 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 InstanceAutoscaling Config Args - The autoscaling configuration. Autoscaling is enabled if this field is set. When autoscaling is enabled, num_nodes and processing_units are treated as, OUTPUT_ONLY fields and reflect the current compute capacity allocated to the instance. Structure is documented below.
- default_
backup_ strschedule_ type - 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.
- 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
effective_labels
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 - processing_
units int - 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. - display
Name 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.
- autoscaling
Config Property Map - The autoscaling configuration. Autoscaling is enabled if this field is set. When autoscaling is enabled, num_nodes and processing_units are treated as, OUTPUT_ONLY fields and reflect the current compute capacity allocated to the instance. Structure is documented below.
- default
Backup StringSchedule Type - 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
. - force
Destroy 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.
- 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
effective_labels
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. - num
Nodes Number - processing
Units Number - 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:
- Effective
Labels 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.
- Pulumi
Labels Dictionary<string, string> - The combination of labels configured directly on the resource and default labels configured on the provider.
- State string
- Instance status:
CREATING
orREADY
.
- Effective
Labels 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.
- Pulumi
Labels map[string]string - The combination of labels configured directly on the resource and default labels configured on the provider.
- State string
- Instance status:
CREATING
orREADY
.
- effective
Labels 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.
- pulumi
Labels Map<String,String> - The combination of labels configured directly on the resource and default labels configured on the provider.
- state String
- Instance status:
CREATING
orREADY
.
- effective
Labels {[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.
- pulumi
Labels {[key: string]: string} - The combination of labels configured directly on the resource and default labels configured on the provider.
- state string
- Instance status:
CREATING
orREADY
.
- 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
orREADY
.
- effective
Labels 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.
- pulumi
Labels Map<String> - The combination of labels configured directly on the resource and default labels configured on the provider.
- state String
- Instance status:
CREATING
orREADY
.
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,
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)
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.
- Autoscaling
Config InstanceAutoscaling Config - The autoscaling configuration. Autoscaling is enabled if this field is set. When autoscaling is enabled, num_nodes and processing_units 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. - Default
Backup stringSchedule Type - 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 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
. - Effective
Labels 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.
- 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.
- 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
effective_labels
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. - Num
Nodes int - Processing
Units int - Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Pulumi
Labels Dictionary<string, string> - The combination of labels configured directly on the resource and default labels configured on the provider.
- State string
- Instance status:
CREATING
orREADY
.
- Autoscaling
Config InstanceAutoscaling Config Args - The autoscaling configuration. Autoscaling is enabled if this field is set. When autoscaling is enabled, num_nodes and processing_units 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. - Default
Backup stringSchedule Type - 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 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
. - Effective
Labels 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.
- 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.
- 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
effective_labels
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. - Num
Nodes int - Processing
Units int - Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Pulumi
Labels map[string]string - The combination of labels configured directly on the resource and default labels configured on the provider.
- State string
- Instance status:
CREATING
orREADY
.
- autoscaling
Config InstanceAutoscaling Config - The autoscaling configuration. Autoscaling is enabled if this field is set. When autoscaling is enabled, num_nodes and processing_units 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. - default
Backup StringSchedule Type - 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 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
. - effective
Labels 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.
- force
Destroy 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.
- 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
effective_labels
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. - num
Nodes Integer - processing
Units Integer - project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- pulumi
Labels Map<String,String> - The combination of labels configured directly on the resource and default labels configured on the provider.
- state String
- Instance status:
CREATING
orREADY
.
- autoscaling
Config InstanceAutoscaling Config - The autoscaling configuration. Autoscaling is enabled if this field is set. When autoscaling is enabled, num_nodes and processing_units 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. - default
Backup stringSchedule Type - 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 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
. - effective
Labels {[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.
- force
Destroy 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.
- 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
effective_labels
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. - num
Nodes number - processing
Units number - project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- pulumi
Labels {[key: string]: string} - The combination of labels configured directly on the resource and default labels configured on the provider.
- state string
- Instance status:
CREATING
orREADY
.
- autoscaling_
config InstanceAutoscaling Config Args - The autoscaling configuration. Autoscaling is enabled if this field is set. When autoscaling is enabled, num_nodes and processing_units 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_ strschedule_ type - 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.
- 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
effective_labels
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 - processing_
units int - 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
orREADY
.
- autoscaling
Config Property Map - The autoscaling configuration. Autoscaling is enabled if this field is set. When autoscaling is enabled, num_nodes and processing_units 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. - default
Backup StringSchedule Type - 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 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
. - effective
Labels Map<String> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- force
Destroy 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.
- 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
effective_labels
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. - num
Nodes Number - processing
Units Number - project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- pulumi
Labels Map<String> - The combination of labels configured directly on the resource and default labels configured on the provider.
- state String
- Instance status:
CREATING
orREADY
.
Supporting Types
InstanceAutoscalingConfig, InstanceAutoscalingConfigArgs
- Asymmetric
Autoscaling List<InstanceOptions Autoscaling Config Asymmetric Autoscaling Option> - Asymmetric autoscaling options for specific replicas. Structure is documented below.
- Autoscaling
Limits InstanceAutoscaling Config Autoscaling Limits - 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 min_limit and max_limit. Structure is documented below.
- Autoscaling
Targets InstanceAutoscaling Config Autoscaling Targets - 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 []InstanceOptions Autoscaling Config Asymmetric Autoscaling Option - Asymmetric autoscaling options for specific replicas. Structure is documented below.
- Autoscaling
Limits InstanceAutoscaling Config Autoscaling Limits - 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 min_limit and max_limit. Structure is documented below.
- Autoscaling
Targets InstanceAutoscaling Config Autoscaling Targets - 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 List<InstanceOptions Autoscaling Config Asymmetric Autoscaling Option> - Asymmetric autoscaling options for specific replicas. Structure is documented below.
- autoscaling
Limits InstanceAutoscaling Config Autoscaling Limits - 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 min_limit and max_limit. Structure is documented below.
- autoscaling
Targets InstanceAutoscaling Config Autoscaling Targets - 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 InstanceOptions Autoscaling Config Asymmetric Autoscaling Option[] - Asymmetric autoscaling options for specific replicas. Structure is documented below.
- autoscaling
Limits InstanceAutoscaling Config Autoscaling Limits - 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 min_limit and max_limit. Structure is documented below.
- autoscaling
Targets InstanceAutoscaling Config Autoscaling Targets - 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_ Sequence[Instanceoptions Autoscaling Config Asymmetric Autoscaling Option] - Asymmetric autoscaling options for specific replicas. Structure is documented below.
- autoscaling_
limits InstanceAutoscaling Config Autoscaling Limits - 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 min_limit and max_limit. Structure is documented below.
- autoscaling_
targets InstanceAutoscaling Config Autoscaling Targets - 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 List<Property Map>Options - Asymmetric autoscaling options for specific replicas. Structure is documented below.
- autoscaling
Limits 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 min_limit and max_limit. Structure is documented below.
- autoscaling
Targets 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
Instance
Autoscaling Config Asymmetric Autoscaling Option Overrides - A nested object resource. Structure is documented below.
- Replica
Selection InstanceAutoscaling Config Asymmetric Autoscaling Option Replica Selection - A nested object resource. Structure is documented below.
- Overrides
Instance
Autoscaling Config Asymmetric Autoscaling Option Overrides - A nested object resource. Structure is documented below.
- Replica
Selection InstanceAutoscaling Config Asymmetric Autoscaling Option Replica Selection - A nested object resource. Structure is documented below.
- overrides
Instance
Autoscaling Config Asymmetric Autoscaling Option Overrides - A nested object resource. Structure is documented below.
- replica
Selection InstanceAutoscaling Config Asymmetric Autoscaling Option Replica Selection - A nested object resource. Structure is documented below.
- overrides
Instance
Autoscaling Config Asymmetric Autoscaling Option Overrides - A nested object resource. Structure is documented below.
- replica
Selection InstanceAutoscaling Config Asymmetric Autoscaling Option Replica Selection - A nested object resource. Structure is documented below.
- overrides
Instance
Autoscaling Config Asymmetric Autoscaling Option Overrides - A nested object resource. Structure is documented below.
- replica_
selection InstanceAutoscaling Config Asymmetric Autoscaling Option Replica Selection - A nested object resource. Structure is documented below.
- overrides Property Map
- A nested object resource. Structure is documented below.
- replica
Selection Property Map - A nested object resource. Structure is documented below.
InstanceAutoscalingConfigAsymmetricAutoscalingOptionOverrides, InstanceAutoscalingConfigAsymmetricAutoscalingOptionOverridesArgs
- Autoscaling
Limits InstanceAutoscaling Config Asymmetric Autoscaling Option Overrides Autoscaling Limits - A nested object resource. Structure is documented below.
- Autoscaling
Limits InstanceAutoscaling Config Asymmetric Autoscaling Option Overrides Autoscaling Limits - A nested object resource. Structure is documented below.
- autoscaling
Limits InstanceAutoscaling Config Asymmetric Autoscaling Option Overrides Autoscaling Limits - A nested object resource. Structure is documented below.
- autoscaling
Limits InstanceAutoscaling Config Asymmetric Autoscaling Option Overrides Autoscaling Limits - A nested object resource. Structure is documented below.
- autoscaling_
limits InstanceAutoscaling Config Asymmetric Autoscaling Option Overrides Autoscaling Limits - A nested object resource. Structure is documented below.
- autoscaling
Limits Property Map - A nested object resource. Structure is documented below.
InstanceAutoscalingConfigAsymmetricAutoscalingOptionOverridesAutoscalingLimits, InstanceAutoscalingConfigAsymmetricAutoscalingOptionOverridesAutoscalingLimitsArgs
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
- Max
Nodes int - The maximum number of nodes for this specific replica.
- Max
Processing intUnits - Specifies maximum number of processing units allocated to the instance. 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 intUnits - Specifies minimum number of processing units allocated to the instance. If set, this number should be multiples of 1000.
- Max
Nodes int - The maximum number of nodes for this specific replica.
- Max
Processing intUnits - Specifies maximum number of processing units allocated to the instance. 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 intUnits - Specifies minimum number of processing units allocated to the instance. If set, this number should be multiples of 1000.
- max
Nodes Integer - The maximum number of nodes for this specific replica.
- max
Processing IntegerUnits - Specifies maximum number of processing units allocated to the instance. If set, this number should be multiples of 1000 and be greater than or equal to min_processing_units.
- min
Nodes Integer - The minimum number of nodes for this specific replica.
- min
Processing IntegerUnits - Specifies minimum number of processing units allocated to the instance. If set, this number should be multiples of 1000.
- max
Nodes number - The maximum number of nodes for this specific replica.
- max
Processing numberUnits - Specifies maximum number of processing units allocated to the instance. If set, this number should be multiples of 1000 and be greater than or equal to min_processing_units.
- min
Nodes number - The minimum number of nodes for this specific replica.
- min
Processing numberUnits - Specifies minimum number of processing units allocated to the instance. If set, this number should be multiples of 1000.
- max_
nodes int - The maximum number of nodes for this specific replica.
- max_
processing_ intunits - Specifies maximum number of processing units allocated to the instance. 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_ intunits - Specifies minimum number of processing units allocated to the instance. If set, this number should be multiples of 1000.
- max
Nodes Number - The maximum number of nodes for this specific replica.
- max
Processing NumberUnits - Specifies maximum number of processing units allocated to the instance. If set, this number should be multiples of 1000 and be greater than or equal to min_processing_units.
- min
Nodes Number - The minimum number of nodes for this specific replica.
- min
Processing NumberUnits - Specifies minimum number of processing units allocated to the instance. If set, this number should be multiples of 1000.
InstanceAutoscalingConfigAutoscalingTargets, InstanceAutoscalingConfigAutoscalingTargetsArgs
- High
Priority intCpu Utilization Percent - 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 intPercent - 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).
- High
Priority intCpu Utilization Percent - 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 intPercent - 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).
- high
Priority IntegerCpu Utilization Percent - 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 IntegerPercent - 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).
- high
Priority numberCpu Utilization Percent - 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 numberPercent - 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).
- high_
priority_ intcpu_ utilization_ percent - 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_ intpercent - 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).
- high
Priority NumberCpu Utilization Percent - 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 NumberPercent - 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).
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.