gcp.spanner.InstanceConfig
Explore with Pulumi AI
A possible configuration for a Cloud Spanner instance. Configurations define the geographic placement of nodes and their replication.
To get more information about InstanceConfig, see:
- API documentation
- How-to Guides
Example Usage
Create InstanceConfig Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new InstanceConfig(name: string, args: InstanceConfigArgs, opts?: CustomResourceOptions);
@overload
def InstanceConfig(resource_name: str,
args: InstanceConfigArgs,
opts: Optional[ResourceOptions] = None)
@overload
def InstanceConfig(resource_name: str,
opts: Optional[ResourceOptions] = None,
display_name: Optional[str] = None,
replicas: Optional[Sequence[InstanceConfigReplicaArgs]] = None,
base_config: Optional[str] = None,
labels: Optional[Mapping[str, str]] = None,
name: Optional[str] = None,
project: Optional[str] = None)
func NewInstanceConfig(ctx *Context, name string, args InstanceConfigArgs, opts ...ResourceOption) (*InstanceConfig, error)
public InstanceConfig(string name, InstanceConfigArgs args, CustomResourceOptions? opts = null)
public InstanceConfig(String name, InstanceConfigArgs args)
public InstanceConfig(String name, InstanceConfigArgs args, CustomResourceOptions options)
type: gcp:spanner:InstanceConfig
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 InstanceConfigArgs
- 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 InstanceConfigArgs
- 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 InstanceConfigArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args InstanceConfigArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args InstanceConfigArgs
- 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 instanceConfigResource = new Gcp.Spanner.InstanceConfig("instanceConfigResource", new()
{
DisplayName = "string",
Replicas = new[]
{
new Gcp.Spanner.Inputs.InstanceConfigReplicaArgs
{
DefaultLeaderLocation = false,
Location = "string",
Type = "string",
},
},
BaseConfig = "string",
Labels =
{
{ "string", "string" },
},
Name = "string",
Project = "string",
});
example, err := spanner.NewInstanceConfig(ctx, "instanceConfigResource", &spanner.InstanceConfigArgs{
DisplayName: pulumi.String("string"),
Replicas: spanner.InstanceConfigReplicaArray{
&spanner.InstanceConfigReplicaArgs{
DefaultLeaderLocation: pulumi.Bool(false),
Location: pulumi.String("string"),
Type: pulumi.String("string"),
},
},
BaseConfig: pulumi.String("string"),
Labels: pulumi.StringMap{
"string": pulumi.String("string"),
},
Name: pulumi.String("string"),
Project: pulumi.String("string"),
})
var instanceConfigResource = new InstanceConfig("instanceConfigResource", InstanceConfigArgs.builder()
.displayName("string")
.replicas(InstanceConfigReplicaArgs.builder()
.defaultLeaderLocation(false)
.location("string")
.type("string")
.build())
.baseConfig("string")
.labels(Map.of("string", "string"))
.name("string")
.project("string")
.build());
instance_config_resource = gcp.spanner.InstanceConfig("instanceConfigResource",
display_name="string",
replicas=[{
"default_leader_location": False,
"location": "string",
"type": "string",
}],
base_config="string",
labels={
"string": "string",
},
name="string",
project="string")
const instanceConfigResource = new gcp.spanner.InstanceConfig("instanceConfigResource", {
displayName: "string",
replicas: [{
defaultLeaderLocation: false,
location: "string",
type: "string",
}],
baseConfig: "string",
labels: {
string: "string",
},
name: "string",
project: "string",
});
type: gcp:spanner:InstanceConfig
properties:
baseConfig: string
displayName: string
labels:
string: string
name: string
project: string
replicas:
- defaultLeaderLocation: false
location: string
type: string
InstanceConfig 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 InstanceConfig resource accepts the following input properties:
- Display
Name string - The name of this instance configuration as it appears in UIs.
- Replicas
List<Instance
Config Replica> - The geographic placement of nodes in this instance configuration and their replication properties. Structure is documented below.
- Base
Config string - Base configuration name, e.g. nam3, based on which this configuration is created. Only set for user managed configurations. baseConfig must refer to a configuration of type GOOGLE_MANAGED in the same project as this configuration.
- 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 configuration. Values are of the form projects//instanceConfigs/[a-z][-a-z0-9]*
- Project string
- Display
Name string - The name of this instance configuration as it appears in UIs.
- Replicas
[]Instance
Config Replica Args - The geographic placement of nodes in this instance configuration and their replication properties. Structure is documented below.
- Base
Config string - Base configuration name, e.g. nam3, based on which this configuration is created. Only set for user managed configurations. baseConfig must refer to a configuration of type GOOGLE_MANAGED in the same project as this configuration.
- 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 configuration. Values are of the form projects//instanceConfigs/[a-z][-a-z0-9]*
- Project string
- display
Name String - The name of this instance configuration as it appears in UIs.
- replicas
List<Instance
Config Replica> - The geographic placement of nodes in this instance configuration and their replication properties. Structure is documented below.
- base
Config String - Base configuration name, e.g. nam3, based on which this configuration is created. Only set for user managed configurations. baseConfig must refer to a configuration of type GOOGLE_MANAGED in the same project as this configuration.
- 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 configuration. Values are of the form projects//instanceConfigs/[a-z][-a-z0-9]*
- project String
- display
Name string - The name of this instance configuration as it appears in UIs.
- replicas
Instance
Config Replica[] - The geographic placement of nodes in this instance configuration and their replication properties. Structure is documented below.
- base
Config string - Base configuration name, e.g. nam3, based on which this configuration is created. Only set for user managed configurations. baseConfig must refer to a configuration of type GOOGLE_MANAGED in the same project as this configuration.
- 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 configuration. Values are of the form projects//instanceConfigs/[a-z][-a-z0-9]*
- project string
- display_
name str - The name of this instance configuration as it appears in UIs.
- replicas
Sequence[Instance
Config Replica Args] - The geographic placement of nodes in this instance configuration and their replication properties. Structure is documented below.
- base_
config str - Base configuration name, e.g. nam3, based on which this configuration is created. Only set for user managed configurations. baseConfig must refer to a configuration of type GOOGLE_MANAGED in the same project as this configuration.
- 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 configuration. Values are of the form projects//instanceConfigs/[a-z][-a-z0-9]*
- project str
- display
Name String - The name of this instance configuration as it appears in UIs.
- replicas List<Property Map>
- The geographic placement of nodes in this instance configuration and their replication properties. Structure is documented below.
- base
Config String - Base configuration name, e.g. nam3, based on which this configuration is created. Only set for user managed configurations. baseConfig must refer to a configuration of type GOOGLE_MANAGED in the same project as this configuration.
- 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 configuration. Values are of the form projects//instanceConfigs/[a-z][-a-z0-9]*
- project String
Outputs
All input properties are implicitly available as output properties. Additionally, the InstanceConfig resource produces the following output properties:
- Config
Type string - Output only. Whether this instance config is a Google or User Managed Configuration.
- 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.
- Config
Type string - Output only. Whether this instance config is a Google or User Managed Configuration.
- 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.
- config
Type String - Output only. Whether this instance config is a Google or User Managed Configuration.
- 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.
- config
Type string - Output only. Whether this instance config is a Google or User Managed Configuration.
- 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.
- config_
type str - Output only. Whether this instance config is a Google or User Managed Configuration.
- 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.
- config
Type String - Output only. Whether this instance config is a Google or User Managed Configuration.
- 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.
Look up Existing InstanceConfig Resource
Get an existing InstanceConfig 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?: InstanceConfigState, opts?: CustomResourceOptions): InstanceConfig
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
base_config: Optional[str] = None,
config_type: Optional[str] = None,
display_name: Optional[str] = None,
effective_labels: Optional[Mapping[str, str]] = None,
labels: Optional[Mapping[str, str]] = None,
name: Optional[str] = None,
project: Optional[str] = None,
pulumi_labels: Optional[Mapping[str, str]] = None,
replicas: Optional[Sequence[InstanceConfigReplicaArgs]] = None) -> InstanceConfig
func GetInstanceConfig(ctx *Context, name string, id IDInput, state *InstanceConfigState, opts ...ResourceOption) (*InstanceConfig, error)
public static InstanceConfig Get(string name, Input<string> id, InstanceConfigState? state, CustomResourceOptions? opts = null)
public static InstanceConfig get(String name, Output<String> id, InstanceConfigState 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.
- Base
Config string - Base configuration name, e.g. nam3, based on which this configuration is created. Only set for user managed configurations. baseConfig must refer to a configuration of type GOOGLE_MANAGED in the same project as this configuration.
- Config
Type string - Output only. Whether this instance config is a Google or User Managed Configuration.
- Display
Name string - The name of this instance configuration as it appears in UIs.
- 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.
- 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 configuration. Values are of the form projects//instanceConfigs/[a-z][-a-z0-9]*
- Project string
- Pulumi
Labels Dictionary<string, string> - The combination of labels configured directly on the resource and default labels configured on the provider.
- Replicas
List<Instance
Config Replica> - The geographic placement of nodes in this instance configuration and their replication properties. Structure is documented below.
- Base
Config string - Base configuration name, e.g. nam3, based on which this configuration is created. Only set for user managed configurations. baseConfig must refer to a configuration of type GOOGLE_MANAGED in the same project as this configuration.
- Config
Type string - Output only. Whether this instance config is a Google or User Managed Configuration.
- Display
Name string - The name of this instance configuration as it appears in UIs.
- 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.
- 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 configuration. Values are of the form projects//instanceConfigs/[a-z][-a-z0-9]*
- Project string
- Pulumi
Labels map[string]string - The combination of labels configured directly on the resource and default labels configured on the provider.
- Replicas
[]Instance
Config Replica Args - The geographic placement of nodes in this instance configuration and their replication properties. Structure is documented below.
- base
Config String - Base configuration name, e.g. nam3, based on which this configuration is created. Only set for user managed configurations. baseConfig must refer to a configuration of type GOOGLE_MANAGED in the same project as this configuration.
- config
Type String - Output only. Whether this instance config is a Google or User Managed Configuration.
- display
Name String - The name of this instance configuration as it appears in UIs.
- 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.
- 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 configuration. Values are of the form projects//instanceConfigs/[a-z][-a-z0-9]*
- project String
- pulumi
Labels Map<String,String> - The combination of labels configured directly on the resource and default labels configured on the provider.
- replicas
List<Instance
Config Replica> - The geographic placement of nodes in this instance configuration and their replication properties. Structure is documented below.
- base
Config string - Base configuration name, e.g. nam3, based on which this configuration is created. Only set for user managed configurations. baseConfig must refer to a configuration of type GOOGLE_MANAGED in the same project as this configuration.
- config
Type string - Output only. Whether this instance config is a Google or User Managed Configuration.
- display
Name string - The name of this instance configuration as it appears in UIs.
- 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.
- 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 configuration. Values are of the form projects//instanceConfigs/[a-z][-a-z0-9]*
- project string
- pulumi
Labels {[key: string]: string} - The combination of labels configured directly on the resource and default labels configured on the provider.
- replicas
Instance
Config Replica[] - The geographic placement of nodes in this instance configuration and their replication properties. Structure is documented below.
- base_
config str - Base configuration name, e.g. nam3, based on which this configuration is created. Only set for user managed configurations. baseConfig must refer to a configuration of type GOOGLE_MANAGED in the same project as this configuration.
- config_
type str - Output only. Whether this instance config is a Google or User Managed Configuration.
- display_
name str - The name of this instance configuration as it appears in UIs.
- 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.
- 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 configuration. Values are of the form projects//instanceConfigs/[a-z][-a-z0-9]*
- project str
- pulumi_
labels Mapping[str, str] - The combination of labels configured directly on the resource and default labels configured on the provider.
- replicas
Sequence[Instance
Config Replica Args] - The geographic placement of nodes in this instance configuration and their replication properties. Structure is documented below.
- base
Config String - Base configuration name, e.g. nam3, based on which this configuration is created. Only set for user managed configurations. baseConfig must refer to a configuration of type GOOGLE_MANAGED in the same project as this configuration.
- config
Type String - Output only. Whether this instance config is a Google or User Managed Configuration.
- display
Name String - The name of this instance configuration as it appears in UIs.
- 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.
- 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 configuration. Values are of the form projects//instanceConfigs/[a-z][-a-z0-9]*
- project String
- pulumi
Labels Map<String> - The combination of labels configured directly on the resource and default labels configured on the provider.
- replicas List<Property Map>
- The geographic placement of nodes in this instance configuration and their replication properties. Structure is documented below.
Supporting Types
InstanceConfigReplica, InstanceConfigReplicaArgs
- Default
Leader boolLocation - If true, this location is designated as the default leader location where
leader replicas are placed.
- Location string
- The location of the serving resources, e.g. "us-central1".
- Type string
- Indicates the type of replica. See the replica types
documentation
for more details.
Possible values are:
READ_WRITE
,READ_ONLY
,WITNESS
.
- Default
Leader boolLocation - If true, this location is designated as the default leader location where
leader replicas are placed.
- Location string
- The location of the serving resources, e.g. "us-central1".
- Type string
- Indicates the type of replica. See the replica types
documentation
for more details.
Possible values are:
READ_WRITE
,READ_ONLY
,WITNESS
.
- default
Leader BooleanLocation - If true, this location is designated as the default leader location where
leader replicas are placed.
- location String
- The location of the serving resources, e.g. "us-central1".
- type String
- Indicates the type of replica. See the replica types
documentation
for more details.
Possible values are:
READ_WRITE
,READ_ONLY
,WITNESS
.
- default
Leader booleanLocation - If true, this location is designated as the default leader location where
leader replicas are placed.
- location string
- The location of the serving resources, e.g. "us-central1".
- type string
- Indicates the type of replica. See the replica types
documentation
for more details.
Possible values are:
READ_WRITE
,READ_ONLY
,WITNESS
.
- default_
leader_ boollocation - If true, this location is designated as the default leader location where
leader replicas are placed.
- location str
- The location of the serving resources, e.g. "us-central1".
- type str
- Indicates the type of replica. See the replica types
documentation
for more details.
Possible values are:
READ_WRITE
,READ_ONLY
,WITNESS
.
- default
Leader BooleanLocation - If true, this location is designated as the default leader location where
leader replicas are placed.
- location String
- The location of the serving resources, e.g. "us-central1".
- type String
- Indicates the type of replica. See the replica types
documentation
for more details.
Possible values are:
READ_WRITE
,READ_ONLY
,WITNESS
.
Import
InstanceConfig can be imported using any of these accepted formats:
projects/{{project}}/instanceConfigs/{{name}}
{{project}}/{{name}}
{{name}}
When using the pulumi import
command, InstanceConfig can be imported using one of the formats above. For example:
$ pulumi import gcp:spanner/instanceConfig:InstanceConfig default projects/{{project}}/instanceConfigs/{{name}}
$ pulumi import gcp:spanner/instanceConfig:InstanceConfig default {{project}}/{{name}}
$ pulumi import gcp:spanner/instanceConfig:InstanceConfig 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.