This page documents the language specification for the gcp package. If you're looking for help working with the inputs, outputs, or functions of gcp resources in a Pulumi program, please see the resource documentation for examples and API reference.
spanner¶
This provider is a derived work of the Terraform Provider distributed under MPL 2.0. If you encounter a bug or missing feature, first check the pulumi/pulumi-gcp repo; however, if that doesn’t turn up anything, please consult the source terraform-providers/terraform-provider-google repo.
- class
pulumi_gcp.spanner.Database(resource_name, opts=None, ddls=None, instance=None, name=None, project=None, __props__=None, __name__=None, __opts__=None)¶ A Cloud Spanner Database which is hosted on a Spanner instance.
To get more information about Database, see:
How-to Guides
import pulumi import pulumi_gcp as gcp main = gcp.spanner.Instance("main", config="regional-europe-west1", display_name="main-instance") database = gcp.spanner.Database("database", instance=main.name, ddls=[ "CREATE TABLE t1 (t1 INT64 NOT NULL,) PRIMARY KEY(t1)", "CREATE TABLE t2 (t2 INT64 NOT NULL,) PRIMARY KEY(t2)", ])
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
ddls (pulumi.Input[list]) – An optional list of DDL statements to run inside the newly created database. Statements can create tables, indexes, etc. These statements execute atomically with the creation of the database: if there is an error in any statement, the database is not created.
instance (pulumi.Input[str]) – The instance to create the database on.
name (pulumi.Input[str]) – A unique identifier for the database, which cannot be changed after the instance is created. Values are of the form [a-z][-a-z0-9]*[a-z0-9].
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
ddls: pulumi.Output[list] = None¶An optional list of DDL statements to run inside the newly created database. Statements can create tables, indexes, etc. These statements execute atomically with the creation of the database: if there is an error in any statement, the database is not created.
instance: pulumi.Output[str] = None¶The instance to create the database on.
name: pulumi.Output[str] = None¶A unique identifier for the database, which cannot be changed after the instance is created. Values are of the form [a-z][-a-z0-9]*[a-z0-9].
project: pulumi.Output[str] = None¶The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
state: pulumi.Output[str] = None¶An explanation of the status of the database.
- static
get(resource_name, id, opts=None, ddls=None, instance=None, name=None, project=None, state=None)¶ Get an existing Database resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
ddls (pulumi.Input[list]) – An optional list of DDL statements to run inside the newly created database. Statements can create tables, indexes, etc. These statements execute atomically with the creation of the database: if there is an error in any statement, the database is not created.
instance (pulumi.Input[str]) – The instance to create the database on.
name (pulumi.Input[str]) – A unique identifier for the database, which cannot be changed after the instance is created. Values are of the form [a-z][-a-z0-9]*[a-z0-9].
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
state (pulumi.Input[str]) – An explanation of the status of the database.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_gcp.spanner.DatabaseIAMBinding(resource_name, opts=None, condition=None, database=None, instance=None, members=None, project=None, role=None, __props__=None, __name__=None, __opts__=None)¶ Three different resources help you manage your IAM policy for a Spanner database. Each of these resources serves a different use case:
spanner.DatabaseIAMPolicy: Authoritative. Sets the IAM policy for the database and replaces any existing policy already attached.
Warning: It’s entirely possibly to lock yourself out of your database using
spanner.DatabaseIAMPolicy. Any permissions granted by default will be removed unless you include them in your config.spanner.DatabaseIAMBinding: Authoritative for a given role. Updates the IAM policy to grant a role to a list of members. Other roles within the IAM policy for the database are preserved.spanner.DatabaseIAMMember: Non-authoritative. Updates the IAM policy to grant a role to a new member. Other members for the role for the database are preserved.
Note:
spanner.DatabaseIAMPolicycannot be used in conjunction withspanner.DatabaseIAMBindingandspanner.DatabaseIAMMemberor they will fight over what your policy should be.Note:
spanner.DatabaseIAMBindingresources can be used in conjunction withspanner.DatabaseIAMMemberresources only if they do not grant privilege to the same role.import pulumi import pulumi_gcp as gcp admin = gcp.organizations.get_iam_policy(binding=[{ "role": "roles/editor", "members": ["user:jane@example.com"], }]) database = gcp.spanner.DatabaseIAMPolicy("database", instance="your-instance-name", database="your-database-name", policy_data=admin.policy_data)
import pulumi import pulumi_gcp as gcp database = gcp.spanner.DatabaseIAMBinding("database", database="your-database-name", instance="your-instance-name", members=["user:jane@example.com"], role="roles/compute.networkUser")
import pulumi import pulumi_gcp as gcp database = gcp.spanner.DatabaseIAMMember("database", database="your-database-name", instance="your-instance-name", member="user:jane@example.com", role="roles/compute.networkUser")
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
database (pulumi.Input[str]) – The name of the Spanner database.
instance (pulumi.Input[str]) – The name of the Spanner instance the database belongs to.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
role (pulumi.Input[str]) – The role that should be applied. Only one
spanner.DatabaseIAMBindingcan be used per role. Note that custom roles must be of the format[projects|organizations]/{parent-name}/roles/{role-name}.
The condition object supports the following:
description(pulumi.Input[str])expression(pulumi.Input[str])title(pulumi.Input[str])
database: pulumi.Output[str] = None¶The name of the Spanner database.
etag: pulumi.Output[str] = None¶(Computed) The etag of the database’s IAM policy.
instance: pulumi.Output[str] = None¶The name of the Spanner instance the database belongs to.
project: pulumi.Output[str] = None¶The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
role: pulumi.Output[str] = None¶The role that should be applied. Only one
spanner.DatabaseIAMBindingcan be used per role. Note that custom roles must be of the format[projects|organizations]/{parent-name}/roles/{role-name}.
- static
get(resource_name, id, opts=None, condition=None, database=None, etag=None, instance=None, members=None, project=None, role=None)¶ Get an existing DatabaseIAMBinding resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
database (pulumi.Input[str]) – The name of the Spanner database.
etag (pulumi.Input[str]) – (Computed) The etag of the database’s IAM policy.
instance (pulumi.Input[str]) – The name of the Spanner instance the database belongs to.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
role (pulumi.Input[str]) – The role that should be applied. Only one
spanner.DatabaseIAMBindingcan be used per role. Note that custom roles must be of the format[projects|organizations]/{parent-name}/roles/{role-name}.
The condition object supports the following:
description(pulumi.Input[str])expression(pulumi.Input[str])title(pulumi.Input[str])
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_gcp.spanner.DatabaseIAMMember(resource_name, opts=None, condition=None, database=None, instance=None, member=None, project=None, role=None, __props__=None, __name__=None, __opts__=None)¶ Three different resources help you manage your IAM policy for a Spanner database. Each of these resources serves a different use case:
spanner.DatabaseIAMPolicy: Authoritative. Sets the IAM policy for the database and replaces any existing policy already attached.
Warning: It’s entirely possibly to lock yourself out of your database using
spanner.DatabaseIAMPolicy. Any permissions granted by default will be removed unless you include them in your config.spanner.DatabaseIAMBinding: Authoritative for a given role. Updates the IAM policy to grant a role to a list of members. Other roles within the IAM policy for the database are preserved.spanner.DatabaseIAMMember: Non-authoritative. Updates the IAM policy to grant a role to a new member. Other members for the role for the database are preserved.
Note:
spanner.DatabaseIAMPolicycannot be used in conjunction withspanner.DatabaseIAMBindingandspanner.DatabaseIAMMemberor they will fight over what your policy should be.Note:
spanner.DatabaseIAMBindingresources can be used in conjunction withspanner.DatabaseIAMMemberresources only if they do not grant privilege to the same role.import pulumi import pulumi_gcp as gcp admin = gcp.organizations.get_iam_policy(binding=[{ "role": "roles/editor", "members": ["user:jane@example.com"], }]) database = gcp.spanner.DatabaseIAMPolicy("database", instance="your-instance-name", database="your-database-name", policy_data=admin.policy_data)
import pulumi import pulumi_gcp as gcp database = gcp.spanner.DatabaseIAMBinding("database", database="your-database-name", instance="your-instance-name", members=["user:jane@example.com"], role="roles/compute.networkUser")
import pulumi import pulumi_gcp as gcp database = gcp.spanner.DatabaseIAMMember("database", database="your-database-name", instance="your-instance-name", member="user:jane@example.com", role="roles/compute.networkUser")
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
database (pulumi.Input[str]) – The name of the Spanner database.
instance (pulumi.Input[str]) – The name of the Spanner instance the database belongs to.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
role (pulumi.Input[str]) – The role that should be applied. Only one
spanner.DatabaseIAMBindingcan be used per role. Note that custom roles must be of the format[projects|organizations]/{parent-name}/roles/{role-name}.
The condition object supports the following:
description(pulumi.Input[str])expression(pulumi.Input[str])title(pulumi.Input[str])
database: pulumi.Output[str] = None¶The name of the Spanner database.
etag: pulumi.Output[str] = None¶(Computed) The etag of the database’s IAM policy.
instance: pulumi.Output[str] = None¶The name of the Spanner instance the database belongs to.
project: pulumi.Output[str] = None¶The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
role: pulumi.Output[str] = None¶The role that should be applied. Only one
spanner.DatabaseIAMBindingcan be used per role. Note that custom roles must be of the format[projects|organizations]/{parent-name}/roles/{role-name}.
- static
get(resource_name, id, opts=None, condition=None, database=None, etag=None, instance=None, member=None, project=None, role=None)¶ Get an existing DatabaseIAMMember resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
database (pulumi.Input[str]) – The name of the Spanner database.
etag (pulumi.Input[str]) – (Computed) The etag of the database’s IAM policy.
instance (pulumi.Input[str]) – The name of the Spanner instance the database belongs to.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
role (pulumi.Input[str]) – The role that should be applied. Only one
spanner.DatabaseIAMBindingcan be used per role. Note that custom roles must be of the format[projects|organizations]/{parent-name}/roles/{role-name}.
The condition object supports the following:
description(pulumi.Input[str])expression(pulumi.Input[str])title(pulumi.Input[str])
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_gcp.spanner.DatabaseIAMPolicy(resource_name, opts=None, database=None, instance=None, policy_data=None, project=None, __props__=None, __name__=None, __opts__=None)¶ Three different resources help you manage your IAM policy for a Spanner database. Each of these resources serves a different use case:
spanner.DatabaseIAMPolicy: Authoritative. Sets the IAM policy for the database and replaces any existing policy already attached.
Warning: It’s entirely possibly to lock yourself out of your database using
spanner.DatabaseIAMPolicy. Any permissions granted by default will be removed unless you include them in your config.spanner.DatabaseIAMBinding: Authoritative for a given role. Updates the IAM policy to grant a role to a list of members. Other roles within the IAM policy for the database are preserved.spanner.DatabaseIAMMember: Non-authoritative. Updates the IAM policy to grant a role to a new member. Other members for the role for the database are preserved.
Note:
spanner.DatabaseIAMPolicycannot be used in conjunction withspanner.DatabaseIAMBindingandspanner.DatabaseIAMMemberor they will fight over what your policy should be.Note:
spanner.DatabaseIAMBindingresources can be used in conjunction withspanner.DatabaseIAMMemberresources only if they do not grant privilege to the same role.import pulumi import pulumi_gcp as gcp admin = gcp.organizations.get_iam_policy(binding=[{ "role": "roles/editor", "members": ["user:jane@example.com"], }]) database = gcp.spanner.DatabaseIAMPolicy("database", instance="your-instance-name", database="your-database-name", policy_data=admin.policy_data)
import pulumi import pulumi_gcp as gcp database = gcp.spanner.DatabaseIAMBinding("database", database="your-database-name", instance="your-instance-name", members=["user:jane@example.com"], role="roles/compute.networkUser")
import pulumi import pulumi_gcp as gcp database = gcp.spanner.DatabaseIAMMember("database", database="your-database-name", instance="your-instance-name", member="user:jane@example.com", role="roles/compute.networkUser")
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
database (pulumi.Input[str]) – The name of the Spanner database.
instance (pulumi.Input[str]) – The name of the Spanner instance the database belongs to.
policy_data (pulumi.Input[str]) – The policy data generated by a
organizations.getIAMPolicydata source.project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
database: pulumi.Output[str] = None¶The name of the Spanner database.
etag: pulumi.Output[str] = None¶(Computed) The etag of the database’s IAM policy.
instance: pulumi.Output[str] = None¶The name of the Spanner instance the database belongs to.
policy_data: pulumi.Output[str] = None¶The policy data generated by a
organizations.getIAMPolicydata source.
project: pulumi.Output[str] = None¶The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- static
get(resource_name, id, opts=None, database=None, etag=None, instance=None, policy_data=None, project=None)¶ Get an existing DatabaseIAMPolicy resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
database (pulumi.Input[str]) – The name of the Spanner database.
etag (pulumi.Input[str]) – (Computed) The etag of the database’s IAM policy.
instance (pulumi.Input[str]) – The name of the Spanner instance the database belongs to.
policy_data (pulumi.Input[str]) – The policy data generated by a
organizations.getIAMPolicydata source.project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_gcp.spanner.Instance(resource_name, opts=None, config=None, display_name=None, labels=None, name=None, num_nodes=None, project=None, __props__=None, __name__=None, __opts__=None)¶ An isolated set of Cloud Spanner resources on which databases can be hosted.
To get more information about Instance, see:
How-to Guides
import pulumi import pulumi_gcp as gcp example = gcp.spanner.Instance("example", config="regional-us-central1", display_name="Test Spanner Instance", labels={ "foo": "bar", }, num_nodes=2)
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
config (pulumi.Input[str]) – The name of the instance’s configuration (similar but not quite the same as a region) which defines 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-centraletc. In order to obtain a valid list please consult the Configuration section of the docs.display_name (pulumi.Input[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.
labels (pulumi.Input[dict]) – An object containing a list of “key”: value pairs. Example: { “name”: “wrench”, “mass”: “1.3kg”, “count”: “3” }.
name (pulumi.Input[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.
num_nodes (pulumi.Input[float]) – The number of nodes allocated to this instance.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
config: pulumi.Output[str] = None¶The name of the instance’s configuration (similar but not quite the same as a region) which defines 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-centraletc. In order to obtain a valid list please consult the Configuration section of the docs.
display_name: pulumi.Output[str] = None¶The descriptive name for this instance as it appears in UIs. Must be unique per project and between 4 and 30 characters in length.
labels: pulumi.Output[dict] = None¶An object containing a list of “key”: value pairs. Example: { “name”: “wrench”, “mass”: “1.3kg”, “count”: “3” }.
name: pulumi.Output[str] = None¶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.
num_nodes: pulumi.Output[float] = None¶The number of nodes allocated to this instance.
project: pulumi.Output[str] = None¶The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
state: pulumi.Output[str] = None¶Instance status: ‘CREATING’ or ‘READY’.
- static
get(resource_name, id, opts=None, config=None, display_name=None, labels=None, name=None, num_nodes=None, project=None, state=None)¶ Get an existing Instance resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
config (pulumi.Input[str]) –
The name of the instance’s configuration (similar but not quite the same as a region) which defines 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-centraletc. In order to obtain a valid list please consult the Configuration section of the docs.display_name (pulumi.Input[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.
labels (pulumi.Input[dict]) – An object containing a list of “key”: value pairs. Example: { “name”: “wrench”, “mass”: “1.3kg”, “count”: “3” }.
name (pulumi.Input[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.
num_nodes (pulumi.Input[float]) – The number of nodes allocated to this instance.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
state (pulumi.Input[str]) – Instance status: ‘CREATING’ or ‘READY’.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_gcp.spanner.InstanceIAMBinding(resource_name, opts=None, condition=None, instance=None, members=None, project=None, role=None, __props__=None, __name__=None, __opts__=None)¶ Three different resources help you manage your IAM policy for a Spanner instance. Each of these resources serves a different use case:
spanner.InstanceIAMPolicy: Authoritative. Sets the IAM policy for the instance and replaces any existing policy already attached.
Warning: It’s entirely possibly to lock yourself out of your instance using
spanner.InstanceIAMPolicy. Any permissions granted by default will be removed unless you include them in your config.spanner.InstanceIAMBinding: Authoritative for a given role. Updates the IAM policy to grant a role to a list of members. Other roles within the IAM policy for the instance are preserved.spanner.InstanceIAMMember: Non-authoritative. Updates the IAM policy to grant a role to a new member. Other members for the role for the instance are preserved.
Note:
spanner.InstanceIAMPolicycannot be used in conjunction withspanner.InstanceIAMBindingandspanner.InstanceIAMMemberor they will fight over what your policy should be.Note:
spanner.InstanceIAMBindingresources can be used in conjunction withspanner.InstanceIAMMemberresources only if they do not grant privilege to the same role.import pulumi import pulumi_gcp as gcp admin = gcp.organizations.get_iam_policy(binding=[{ "role": "roles/editor", "members": ["user:jane@example.com"], }]) instance = gcp.spanner.InstanceIAMPolicy("instance", instance="your-instance-name", policy_data=admin.policy_data)
import pulumi import pulumi_gcp as gcp instance = gcp.spanner.InstanceIAMBinding("instance", instance="your-instance-name", members=["user:jane@example.com"], role="roles/compute.networkUser")
import pulumi import pulumi_gcp as gcp instance = gcp.spanner.InstanceIAMMember("instance", instance="your-instance-name", member="user:jane@example.com", role="roles/compute.networkUser")
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
instance (pulumi.Input[str]) – The name of the instance.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
role (pulumi.Input[str]) – The role that should be applied. Only one
spanner.InstanceIAMBindingcan be used per role. Note that custom roles must be of the format[projects|organizations]/{parent-name}/roles/{role-name}.
The condition object supports the following:
description(pulumi.Input[str])expression(pulumi.Input[str])title(pulumi.Input[str])
etag: pulumi.Output[str] = None¶(Computed) The etag of the instance’s IAM policy.
instance: pulumi.Output[str] = None¶The name of the instance.
project: pulumi.Output[str] = None¶The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
role: pulumi.Output[str] = None¶The role that should be applied. Only one
spanner.InstanceIAMBindingcan be used per role. Note that custom roles must be of the format[projects|organizations]/{parent-name}/roles/{role-name}.
- static
get(resource_name, id, opts=None, condition=None, etag=None, instance=None, members=None, project=None, role=None)¶ Get an existing InstanceIAMBinding resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
etag (pulumi.Input[str]) – (Computed) The etag of the instance’s IAM policy.
instance (pulumi.Input[str]) – The name of the instance.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
role (pulumi.Input[str]) – The role that should be applied. Only one
spanner.InstanceIAMBindingcan be used per role. Note that custom roles must be of the format[projects|organizations]/{parent-name}/roles/{role-name}.
The condition object supports the following:
description(pulumi.Input[str])expression(pulumi.Input[str])title(pulumi.Input[str])
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_gcp.spanner.InstanceIAMMember(resource_name, opts=None, condition=None, instance=None, member=None, project=None, role=None, __props__=None, __name__=None, __opts__=None)¶ Three different resources help you manage your IAM policy for a Spanner instance. Each of these resources serves a different use case:
spanner.InstanceIAMPolicy: Authoritative. Sets the IAM policy for the instance and replaces any existing policy already attached.
Warning: It’s entirely possibly to lock yourself out of your instance using
spanner.InstanceIAMPolicy. Any permissions granted by default will be removed unless you include them in your config.spanner.InstanceIAMBinding: Authoritative for a given role. Updates the IAM policy to grant a role to a list of members. Other roles within the IAM policy for the instance are preserved.spanner.InstanceIAMMember: Non-authoritative. Updates the IAM policy to grant a role to a new member. Other members for the role for the instance are preserved.
Note:
spanner.InstanceIAMPolicycannot be used in conjunction withspanner.InstanceIAMBindingandspanner.InstanceIAMMemberor they will fight over what your policy should be.Note:
spanner.InstanceIAMBindingresources can be used in conjunction withspanner.InstanceIAMMemberresources only if they do not grant privilege to the same role.import pulumi import pulumi_gcp as gcp admin = gcp.organizations.get_iam_policy(binding=[{ "role": "roles/editor", "members": ["user:jane@example.com"], }]) instance = gcp.spanner.InstanceIAMPolicy("instance", instance="your-instance-name", policy_data=admin.policy_data)
import pulumi import pulumi_gcp as gcp instance = gcp.spanner.InstanceIAMBinding("instance", instance="your-instance-name", members=["user:jane@example.com"], role="roles/compute.networkUser")
import pulumi import pulumi_gcp as gcp instance = gcp.spanner.InstanceIAMMember("instance", instance="your-instance-name", member="user:jane@example.com", role="roles/compute.networkUser")
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
instance (pulumi.Input[str]) – The name of the instance.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
role (pulumi.Input[str]) – The role that should be applied. Only one
spanner.InstanceIAMBindingcan be used per role. Note that custom roles must be of the format[projects|organizations]/{parent-name}/roles/{role-name}.
The condition object supports the following:
description(pulumi.Input[str])expression(pulumi.Input[str])title(pulumi.Input[str])
etag: pulumi.Output[str] = None¶(Computed) The etag of the instance’s IAM policy.
instance: pulumi.Output[str] = None¶The name of the instance.
project: pulumi.Output[str] = None¶The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
role: pulumi.Output[str] = None¶The role that should be applied. Only one
spanner.InstanceIAMBindingcan be used per role. Note that custom roles must be of the format[projects|organizations]/{parent-name}/roles/{role-name}.
- static
get(resource_name, id, opts=None, condition=None, etag=None, instance=None, member=None, project=None, role=None)¶ Get an existing InstanceIAMMember resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
etag (pulumi.Input[str]) – (Computed) The etag of the instance’s IAM policy.
instance (pulumi.Input[str]) – The name of the instance.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
role (pulumi.Input[str]) – The role that should be applied. Only one
spanner.InstanceIAMBindingcan be used per role. Note that custom roles must be of the format[projects|organizations]/{parent-name}/roles/{role-name}.
The condition object supports the following:
description(pulumi.Input[str])expression(pulumi.Input[str])title(pulumi.Input[str])
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_gcp.spanner.InstanceIAMPolicy(resource_name, opts=None, instance=None, policy_data=None, project=None, __props__=None, __name__=None, __opts__=None)¶ Three different resources help you manage your IAM policy for a Spanner instance. Each of these resources serves a different use case:
spanner.InstanceIAMPolicy: Authoritative. Sets the IAM policy for the instance and replaces any existing policy already attached.
Warning: It’s entirely possibly to lock yourself out of your instance using
spanner.InstanceIAMPolicy. Any permissions granted by default will be removed unless you include them in your config.spanner.InstanceIAMBinding: Authoritative for a given role. Updates the IAM policy to grant a role to a list of members. Other roles within the IAM policy for the instance are preserved.spanner.InstanceIAMMember: Non-authoritative. Updates the IAM policy to grant a role to a new member. Other members for the role for the instance are preserved.
Note:
spanner.InstanceIAMPolicycannot be used in conjunction withspanner.InstanceIAMBindingandspanner.InstanceIAMMemberor they will fight over what your policy should be.Note:
spanner.InstanceIAMBindingresources can be used in conjunction withspanner.InstanceIAMMemberresources only if they do not grant privilege to the same role.import pulumi import pulumi_gcp as gcp admin = gcp.organizations.get_iam_policy(binding=[{ "role": "roles/editor", "members": ["user:jane@example.com"], }]) instance = gcp.spanner.InstanceIAMPolicy("instance", instance="your-instance-name", policy_data=admin.policy_data)
import pulumi import pulumi_gcp as gcp instance = gcp.spanner.InstanceIAMBinding("instance", instance="your-instance-name", members=["user:jane@example.com"], role="roles/compute.networkUser")
import pulumi import pulumi_gcp as gcp instance = gcp.spanner.InstanceIAMMember("instance", instance="your-instance-name", member="user:jane@example.com", role="roles/compute.networkUser")
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
instance (pulumi.Input[str]) – The name of the instance.
policy_data (pulumi.Input[str]) – The policy data generated by a
organizations.getIAMPolicydata source.project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
etag: pulumi.Output[str] = None¶(Computed) The etag of the instance’s IAM policy.
instance: pulumi.Output[str] = None¶The name of the instance.
policy_data: pulumi.Output[str] = None¶The policy data generated by a
organizations.getIAMPolicydata source.
project: pulumi.Output[str] = None¶The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- static
get(resource_name, id, opts=None, etag=None, instance=None, policy_data=None, project=None)¶ Get an existing InstanceIAMPolicy resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
etag (pulumi.Input[str]) – (Computed) The etag of the instance’s IAM policy.
instance (pulumi.Input[str]) – The name of the instance.
policy_data (pulumi.Input[str]) – The policy data generated by a
organizations.getIAMPolicydata source.project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str