sql

class pulumi_gcp.sql.Database(resource_name, opts=None, charset=None, collation=None, instance=None, name=None, project=None, __name__=None, __opts__=None)

Creates a new Google SQL Database on a Google SQL Database Instance. For more information, see the official documentation, or the JSON API.

Parameters:
  • resource_name (str) – The name of the resource.
  • opts (pulumi.ResourceOptions) – Options for the resource.
  • charset (pulumi.Input[str]) – The charset value. See MySQL’s Supported Character Sets and Collations and Postgres’ Character Set Support for more details and supported values. Postgres databases are in beta and have limited charset support; they only support a value of UTF8 at creation time.
  • collation (pulumi.Input[str]) –

    The collation value. See MySQL’s Supported Character Sets and Collations and Postgres’ Collation Support for more details and supported values. Postgres databases are in beta and have limited collation support; they only support a value of en_US.UTF8 at creation time.

  • instance (pulumi.Input[str]) – The name of containing instance.
  • name (pulumi.Input[str]) – The name of the database.
  • project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
charset = None

The charset value. See MySQL’s Supported Character Sets and Collations and Postgres’ Character Set Support for more details and supported values. Postgres databases are in beta and have limited charset support; they only support a value of UTF8 at creation time.

collation = None

The collation value. See MySQL’s Supported Character Sets and Collations and Postgres’ Collation Support for more details and supported values. Postgres databases are in beta and have limited collation support; they only support a value of en_US.UTF8 at creation time.

instance = None

The name of containing instance.

name = None

The name of the database.

project = None

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

The URI of the created resource.

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.sql.DatabaseInstance(resource_name, opts=None, database_version=None, master_instance_name=None, name=None, project=None, region=None, replica_configuration=None, settings=None, __name__=None, __opts__=None)

Creates a new Google SQL Database Instance. For more information, see the official documentation, or the JSON API.

NOTE on ``google_sql_database_instance``: - Second-generation instances include a default ‘root’@’%’ user with no password. This user will be deleted by Terraform on instance creation. You should use google_sql_user to define a custom user with a restricted host and strong password.
Parameters:
  • resource_name (str) – The name of the resource.
  • opts (pulumi.ResourceOptions) – Options for the resource.
  • database_version (pulumi.Input[str]) – The MySQL version to use. Can be MYSQL_5_6, MYSQL_5_7 or POSTGRES_9_6 for second-generation instances, or MYSQL_5_5 or MYSQL_5_6 for first-generation instances. See Second Generation Capabilities for more information. POSTGRES_9_6 support is in beta.
  • master_instance_name (pulumi.Input[str]) – The name of the instance that will act as the master in the replication setup. Note, this requires the master to have binary_log_enabled set, as well as existing backups.
  • name (pulumi.Input[str]) – The name of the instance. If the name is left blank, Terraform will randomly generate one when the instance is first created. This is done because after a name is used, it cannot be reused for up to one week.
  • project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
  • region (pulumi.Input[str]) – The region the instance will sit in. Note, first-generation Cloud SQL instance regions do not line up with the Google Compute Engine (GCE) regions, and Cloud SQL is not available in all regions - choose from one of the options listed here. A valid region must be provided to use this resource. If a region is not provided in the resource definition, the provider region will be used instead, but this will be an apply-time error for all first-generation instances and for second-generation instances if the provider region is not supported with Cloud SQL. If you choose not to provide the region argument for this resource, make sure you understand this.
  • replica_configuration (pulumi.Input[dict]) – The configuration for replication. The configuration is detailed below.
  • settings (pulumi.Input[dict]) – The settings to use for the database. The configuration is detailed below.
connection_name = None

The connection name of the instance to be used in connection strings.

database_version = None

The MySQL version to use. Can be MYSQL_5_6, MYSQL_5_7 or POSTGRES_9_6 for second-generation instances, or MYSQL_5_5 or MYSQL_5_6 for first-generation instances. See Second Generation Capabilities for more information. POSTGRES_9_6 support is in beta.

first_ip_address = None

The first IPv4 address of the addresses assigned. This is is to support accessing the first address in the list in a terraform output when the resource is configured with a count.

master_instance_name = None

The name of the instance that will act as the master in the replication setup. Note, this requires the master to have binary_log_enabled set, as well as existing backups.

name = None

The name of the instance. If the name is left blank, Terraform will randomly generate one when the instance is first created. This is done because after a name is used, it cannot be reused for up to one week.

project = None

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

region = None

The region the instance will sit in. Note, first-generation Cloud SQL instance regions do not line up with the Google Compute Engine (GCE) regions, and Cloud SQL is not available in all regions - choose from one of the options listed here. A valid region must be provided to use this resource. If a region is not provided in the resource definition, the provider region will be used instead, but this will be an apply-time error for all first-generation instances and for second-generation instances if the provider region is not supported with Cloud SQL. If you choose not to provide the region argument for this resource, make sure you understand this.

replica_configuration = None

The configuration for replication. The configuration is detailed below.

The URI of the created resource.

service_account_email_address = None

The service account email address assigned to the instance. This property is applicable only to Second Generation instances.

settings = None

The settings to use for the database. The configuration is detailed below.

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.sql.SslCert(resource_name, opts=None, common_name=None, instance=None, __name__=None, __opts__=None)

Creates a new Google SQL SSL Cert on a Google SQL Instance. For more information, see the official documentation, or the JSON API.

Note: All arguments including the private key will be stored in the raw state as plain-text. Read more about sensitive data in state.
Parameters:
  • resource_name (str) – The name of the resource.
  • opts (pulumi.ResourceOptions) – Options for the resource.
  • common*name (pulumi.Input[str]) –

    The common name to be used in the certificate to identify the client. Constrained to [a-zA-Z.-* ]+. Changing this forces a new resource to be created.

  • instance (pulumi.Input[str]) – The name of the Cloud SQL instance. Changing this forces a new resource to be created.
cert = None

The actual certificate data for this client certificate.

cert_serial_number = None

The serial number extracted from the certificate data.

common_name = None

The common name to be used in the certificate to identify the client. Constrained to [a-zA-Z.-_ ]+. Changing this forces a new resource to be created.

create_time = None

The time when the certificate was created in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.

expiration_time = None

The time when the certificate expires in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.

instance = None

The name of the Cloud SQL instance. Changing this forces a new resource to be created.

private_key = None

The private key associated with the client certificate.

server_ca_cert = None

The CA cert of the server this client cert was generated from.

sha1_fingerprint = None

The SHA1 Fingerprint of the certificate.

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.sql.User(resource_name, opts=None, host=None, instance=None, name=None, password=None, project=None, __name__=None, __opts__=None)

Creates a new Google SQL User on a Google SQL User Instance. For more information, see the official documentation, or the JSON API.

Note: All arguments including the username and password will be stored in the raw state as plain-text. Read more about sensitive data in state. Passwords will not be retrieved when running “terraform import”.
Parameters:
  • resource_name (str) – The name of the resource.
  • opts (pulumi.ResourceOptions) – Options for the resource.
  • host (pulumi.Input[str]) – The host the user can connect from. This is only supported for MySQL instances. Don’t set this field for PostgreSQL instances. Can be an IP address. Changing this forces a new resource to be created.
  • instance (pulumi.Input[str]) – The name of the Cloud SQL instance. Changing this forces a new resource to be created.
  • name (pulumi.Input[str]) – The name of the user. Changing this forces a new resource to be created.
  • password (pulumi.Input[str]) – The password for the user. Can be updated.
  • project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
host = None

The host the user can connect from. This is only supported for MySQL instances. Don’t set this field for PostgreSQL instances. Can be an IP address. Changing this forces a new resource to be created.

instance = None

The name of the Cloud SQL instance. Changing this forces a new resource to be created.

name = None

The name of the user. Changing this forces a new resource to be created.

password = None

The password for the user. Can be updated.

project = None

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