sql

package
v0.18.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 5, 2019 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Database

type Database struct {
	// contains filtered or unexported fields
}

Creates a new Google SQL Database on a Google SQL Database Instance. For more information, see the [official documentation](https://cloud.google.com/sql/), or the [JSON API](https://cloud.google.com/sql/docs/admin-api/v1beta4/databases).

func GetDatabase

func GetDatabase(ctx *pulumi.Context,
	name string, id pulumi.ID, state *DatabaseState, opts ...pulumi.ResourceOpt) (*Database, error)

GetDatabase gets an existing Database resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewDatabase

func NewDatabase(ctx *pulumi.Context,
	name string, args *DatabaseArgs, opts ...pulumi.ResourceOpt) (*Database, error)

NewDatabase registers a new resource with the given unique name, arguments, and options.

func (*Database) Charset

func (r *Database) Charset() *pulumi.StringOutput

The charset value. See MySQL's [Supported Character Sets and Collations](https://dev.mysql.com/doc/refman/5.7/en/charset-charsets.html) and Postgres' [Character Set Support](https://www.postgresql.org/docs/9.6/static/multibyte.html) 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.

func (*Database) Collation

func (r *Database) Collation() *pulumi.StringOutput

The collation value. See MySQL's [Supported Character Sets and Collations](https://dev.mysql.com/doc/refman/5.7/en/charset-charsets.html) and Postgres' [Collation Support](https://www.postgresql.org/docs/9.6/static/collation.html) 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.

func (*Database) ID

func (r *Database) ID() *pulumi.IDOutput

ID is this resource's unique identifier assigned by its provider.

func (*Database) Instance

func (r *Database) Instance() *pulumi.StringOutput

The name of containing instance.

func (*Database) Name

func (r *Database) Name() *pulumi.StringOutput

The name of the database.

func (*Database) Project

func (r *Database) Project() *pulumi.StringOutput

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

func (r *Database) SelfLink() *pulumi.StringOutput

The URI of the created resource.

func (*Database) URN

func (r *Database) URN() *pulumi.URNOutput

URN is this resource's unique name assigned by Pulumi.

type DatabaseArgs

type DatabaseArgs struct {
	// The charset value. See MySQL's
	// [Supported Character Sets and Collations](https://dev.mysql.com/doc/refman/5.7/en/charset-charsets.html)
	// and Postgres' [Character Set Support](https://www.postgresql.org/docs/9.6/static/multibyte.html)
	// 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.
	Charset interface{}
	// The collation value. See MySQL's
	// [Supported Character Sets and Collations](https://dev.mysql.com/doc/refman/5.7/en/charset-charsets.html)
	// and Postgres' [Collation Support](https://www.postgresql.org/docs/9.6/static/collation.html)
	// 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.
	Collation interface{}
	// The name of containing instance.
	Instance interface{}
	// The name of the database.
	Name interface{}
	// The ID of the project in which the resource belongs. If it
	// is not provided, the provider project is used.
	Project interface{}
}

The set of arguments for constructing a Database resource.

type DatabaseInstance

type DatabaseInstance struct {
	// contains filtered or unexported fields
}

Creates a new Google SQL Database Instance. For more information, see the [official documentation](https://cloud.google.com/sql/), or the [JSON API](https://cloud.google.com/sql/docs/admin-api/v1beta4/instances).

> **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.

func GetDatabaseInstance

func GetDatabaseInstance(ctx *pulumi.Context,
	name string, id pulumi.ID, state *DatabaseInstanceState, opts ...pulumi.ResourceOpt) (*DatabaseInstance, error)

GetDatabaseInstance gets an existing DatabaseInstance resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewDatabaseInstance

func NewDatabaseInstance(ctx *pulumi.Context,
	name string, args *DatabaseInstanceArgs, opts ...pulumi.ResourceOpt) (*DatabaseInstance, error)

NewDatabaseInstance registers a new resource with the given unique name, arguments, and options.

func (*DatabaseInstance) ConnectionName

func (r *DatabaseInstance) ConnectionName() *pulumi.StringOutput

The connection name of the instance to be used in connection strings. For example, when connecting with [Cloud SQL Proxy](https://cloud.google.com/sql/docs/mysql/connect-admin-proxy).

func (*DatabaseInstance) DatabaseVersion

func (r *DatabaseInstance) DatabaseVersion() *pulumi.StringOutput

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](https://cloud.google.com/sql/docs/1st-2nd-gen-differences) for more information.

func (*DatabaseInstance) FirstIpAddress

func (r *DatabaseInstance) FirstIpAddress() *pulumi.StringOutput

The first IPv4 address of any type assigned. This is to support accessing the [first address in the list in a terraform output](https://github.com/terraform-providers/terraform-provider-google/issues/912) when the resource is configured with a `count`.

func (*DatabaseInstance) ID

func (r *DatabaseInstance) ID() *pulumi.IDOutput

ID is this resource's unique identifier assigned by its provider.

func (*DatabaseInstance) IpAddresses

func (r *DatabaseInstance) IpAddresses() *pulumi.ArrayOutput

func (*DatabaseInstance) MasterInstanceName

func (r *DatabaseInstance) MasterInstanceName() *pulumi.StringOutput

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.

func (*DatabaseInstance) Name

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](https://cloud.google.com/sql/docs/delete-instance).

func (*DatabaseInstance) PrivateIpAddress added in v0.18.0

func (r *DatabaseInstance) PrivateIpAddress() *pulumi.StringOutput

The first private (`PRIVATE`) IPv4 address assigned. This is a workaround for an [issue fixed in Terraform 0.12](https://github.com/hashicorp/terraform/issues/17048) but also provides a convenient way to access an IP of a specific type without performing filtering in a Terraform config.

func (*DatabaseInstance) Project

func (r *DatabaseInstance) Project() *pulumi.StringOutput

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

func (*DatabaseInstance) PublicIpAddress added in v0.18.0

func (r *DatabaseInstance) PublicIpAddress() *pulumi.StringOutput

The first public (`PRIMARY`) IPv4 address assigned. This is a workaround for an [issue fixed in Terraform 0.12](https://github.com/hashicorp/terraform/issues/17048) but also provides a convenient way to access an IP of a specific type without performing filtering in a Terraform config.

func (*DatabaseInstance) Region

func (r *DatabaseInstance) Region() *pulumi.StringOutput

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](https://cloud.google.com/sql/docs/mysql/instance-locations). 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.

func (*DatabaseInstance) ReplicaConfiguration

func (r *DatabaseInstance) ReplicaConfiguration() *pulumi.Output

The configuration for replication. The configuration is detailed below.

func (r *DatabaseInstance) SelfLink() *pulumi.StringOutput

The URI of the created resource.

func (*DatabaseInstance) ServerCaCert

func (r *DatabaseInstance) ServerCaCert() *pulumi.Output

func (*DatabaseInstance) ServiceAccountEmailAddress added in v0.16.0

func (r *DatabaseInstance) ServiceAccountEmailAddress() *pulumi.StringOutput

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

func (*DatabaseInstance) Settings

func (r *DatabaseInstance) Settings() *pulumi.Output

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

func (*DatabaseInstance) URN

func (r *DatabaseInstance) URN() *pulumi.URNOutput

URN is this resource's unique name assigned by Pulumi.

type DatabaseInstanceArgs

type DatabaseInstanceArgs struct {
	// 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](https://cloud.google.com/sql/docs/1st-2nd-gen-differences)
	// for more information.
	DatabaseVersion interface{}
	// 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.
	MasterInstanceName interface{}
	// 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](https://cloud.google.com/sql/docs/delete-instance).
	Name interface{}
	// The ID of the project in which the resource belongs. If it
	// is not provided, the provider project is used.
	Project interface{}
	// 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](https://cloud.google.com/sql/docs/mysql/instance-locations).
	// 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.
	Region interface{}
	// The configuration for replication. The
	// configuration is detailed below.
	ReplicaConfiguration interface{}
	// The settings to use for the database. The
	// configuration is detailed below.
	Settings interface{}
}

The set of arguments for constructing a DatabaseInstance resource.

type DatabaseInstanceState

type DatabaseInstanceState struct {
	// The connection name of the instance to be used in
	// connection strings. For example, when connecting with [Cloud SQL Proxy](https://cloud.google.com/sql/docs/mysql/connect-admin-proxy).
	ConnectionName interface{}
	// 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](https://cloud.google.com/sql/docs/1st-2nd-gen-differences)
	// for more information.
	DatabaseVersion interface{}
	// The first IPv4 address of any type assigned. This is to
	// support accessing the [first address in the list in a terraform output](https://github.com/terraform-providers/terraform-provider-google/issues/912)
	// when the resource is configured with a `count`.
	FirstIpAddress interface{}
	IpAddresses    interface{}
	// 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.
	MasterInstanceName interface{}
	// 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](https://cloud.google.com/sql/docs/delete-instance).
	Name interface{}
	// The first private (`PRIVATE`) IPv4 address assigned. This is
	// a workaround for an [issue fixed in Terraform 0.12](https://github.com/hashicorp/terraform/issues/17048)
	// but also provides a convenient way to access an IP of a specific type without
	// performing filtering in a Terraform config.
	PrivateIpAddress interface{}
	// The ID of the project in which the resource belongs. If it
	// is not provided, the provider project is used.
	Project interface{}
	// The first public (`PRIMARY`) IPv4 address assigned. This is
	// a workaround for an [issue fixed in Terraform 0.12](https://github.com/hashicorp/terraform/issues/17048)
	// but also provides a convenient way to access an IP of a specific type without
	// performing filtering in a Terraform config.
	PublicIpAddress interface{}
	// 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](https://cloud.google.com/sql/docs/mysql/instance-locations).
	// 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.
	Region interface{}
	// The configuration for replication. The
	// configuration is detailed below.
	ReplicaConfiguration interface{}
	// The URI of the created resource.
	SelfLink     interface{}
	ServerCaCert interface{}
	// The service account email address assigned to the
	// instance. This property is applicable only to Second Generation instances.
	ServiceAccountEmailAddress interface{}
	// The settings to use for the database. The
	// configuration is detailed below.
	Settings interface{}
}

Input properties used for looking up and filtering DatabaseInstance resources.

type DatabaseState

type DatabaseState struct {
	// The charset value. See MySQL's
	// [Supported Character Sets and Collations](https://dev.mysql.com/doc/refman/5.7/en/charset-charsets.html)
	// and Postgres' [Character Set Support](https://www.postgresql.org/docs/9.6/static/multibyte.html)
	// 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.
	Charset interface{}
	// The collation value. See MySQL's
	// [Supported Character Sets and Collations](https://dev.mysql.com/doc/refman/5.7/en/charset-charsets.html)
	// and Postgres' [Collation Support](https://www.postgresql.org/docs/9.6/static/collation.html)
	// 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.
	Collation interface{}
	// The name of containing instance.
	Instance interface{}
	// The name of the database.
	Name interface{}
	// The ID of the project in which the resource belongs. If it
	// is not provided, the provider project is used.
	Project interface{}
	// The URI of the created resource.
	SelfLink interface{}
}

Input properties used for looking up and filtering Database resources.

type SslCert added in v0.16.4

type SslCert struct {
	// contains filtered or unexported fields
}

Creates a new Google SQL SSL Cert on a Google SQL Instance. For more information, see the [official documentation](https://cloud.google.com/sql/), or the [JSON API](https://cloud.google.com/sql/docs/mysql/admin-api/v1beta4/sslCerts).

> **Note:** All arguments including the private key will be stored in the raw state as plain-text. [Read more about sensitive data in state](https://www.terraform.io/docs/state/sensitive-data.html).

func GetSslCert added in v0.16.4

func GetSslCert(ctx *pulumi.Context,
	name string, id pulumi.ID, state *SslCertState, opts ...pulumi.ResourceOpt) (*SslCert, error)

GetSslCert gets an existing SslCert resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewSslCert added in v0.16.4

func NewSslCert(ctx *pulumi.Context,
	name string, args *SslCertArgs, opts ...pulumi.ResourceOpt) (*SslCert, error)

NewSslCert registers a new resource with the given unique name, arguments, and options.

func (*SslCert) Cert added in v0.16.4

func (r *SslCert) Cert() *pulumi.StringOutput

The actual certificate data for this client certificate.

func (*SslCert) CertSerialNumber added in v0.16.4

func (r *SslCert) CertSerialNumber() *pulumi.StringOutput

The serial number extracted from the certificate data.

func (*SslCert) CommonName added in v0.16.4

func (r *SslCert) CommonName() *pulumi.StringOutput

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.

func (*SslCert) CreateTime added in v0.16.4

func (r *SslCert) CreateTime() *pulumi.StringOutput

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

func (*SslCert) ExpirationTime added in v0.16.4

func (r *SslCert) ExpirationTime() *pulumi.StringOutput

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

func (*SslCert) ID added in v0.16.4

func (r *SslCert) ID() *pulumi.IDOutput

ID is this resource's unique identifier assigned by its provider.

func (*SslCert) Instance added in v0.16.4

func (r *SslCert) Instance() *pulumi.StringOutput

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

func (*SslCert) PrivateKey added in v0.16.4

func (r *SslCert) PrivateKey() *pulumi.StringOutput

The private key associated with the client certificate.

func (*SslCert) Project added in v0.18.1

func (r *SslCert) Project() *pulumi.StringOutput

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

func (*SslCert) ServerCaCert added in v0.16.4

func (r *SslCert) ServerCaCert() *pulumi.StringOutput

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

func (*SslCert) Sha1Fingerprint added in v0.16.4

func (r *SslCert) Sha1Fingerprint() *pulumi.StringOutput

The SHA1 Fingerprint of the certificate.

func (*SslCert) URN added in v0.16.4

func (r *SslCert) URN() *pulumi.URNOutput

URN is this resource's unique name assigned by Pulumi.

type SslCertArgs added in v0.16.4

type SslCertArgs struct {
	// 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.
	CommonName interface{}
	// The name of the Cloud SQL instance. Changing this
	// forces a new resource to be created.
	Instance interface{}
	// The ID of the project in which the resource belongs. If it
	// is not provided, the provider project is used.
	Project interface{}
}

The set of arguments for constructing a SslCert resource.

type SslCertState added in v0.16.4

type SslCertState struct {
	// The actual certificate data for this client certificate.
	Cert interface{}
	// The serial number extracted from the certificate data.
	CertSerialNumber interface{}
	// 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.
	CommonName interface{}
	// The time when the certificate was created in RFC 3339 format,
	// for example 2012-11-15T16:19:00.094Z.
	CreateTime interface{}
	// The time when the certificate expires in RFC 3339 format,
	// for example 2012-11-15T16:19:00.094Z.
	ExpirationTime interface{}
	// The name of the Cloud SQL instance. Changing this
	// forces a new resource to be created.
	Instance interface{}
	// The private key associated with the client certificate.
	PrivateKey interface{}
	// The ID of the project in which the resource belongs. If it
	// is not provided, the provider project is used.
	Project interface{}
	// The CA cert of the server this client cert was generated from.
	ServerCaCert interface{}
	// The SHA1 Fingerprint of the certificate.
	Sha1Fingerprint interface{}
}

Input properties used for looking up and filtering SslCert resources.

type User

type User struct {
	// contains filtered or unexported fields
}

Creates a new Google SQL User on a Google SQL User Instance. For more information, see the [official documentation](https://cloud.google.com/sql/), or the [JSON API](https://cloud.google.com/sql/docs/admin-api/v1beta4/users).

> **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](https://www.terraform.io/docs/state/sensitive-data.html). Passwords will not be retrieved when running "terraform import".

func GetUser

func GetUser(ctx *pulumi.Context,
	name string, id pulumi.ID, state *UserState, opts ...pulumi.ResourceOpt) (*User, error)

GetUser gets an existing User resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewUser

func NewUser(ctx *pulumi.Context,
	name string, args *UserArgs, opts ...pulumi.ResourceOpt) (*User, error)

NewUser registers a new resource with the given unique name, arguments, and options.

func (*User) Host

func (r *User) Host() *pulumi.StringOutput

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.

func (*User) ID

func (r *User) ID() *pulumi.IDOutput

ID is this resource's unique identifier assigned by its provider.

func (*User) Instance

func (r *User) Instance() *pulumi.StringOutput

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

func (*User) Name

func (r *User) Name() *pulumi.StringOutput

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

func (*User) Password

func (r *User) Password() *pulumi.StringOutput

The password for the user. Can be updated.

func (*User) Project

func (r *User) Project() *pulumi.StringOutput

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

func (*User) URN

func (r *User) URN() *pulumi.URNOutput

URN is this resource's unique name assigned by Pulumi.

type UserArgs

type UserArgs struct {
	// 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.
	Host interface{}
	// The name of the Cloud SQL instance. Changing this
	// forces a new resource to be created.
	Instance interface{}
	// The name of the user. Changing this forces a new resource
	// to be created.
	Name interface{}
	// The password for the user. Can be updated.
	Password interface{}
	// The ID of the project in which the resource belongs. If it
	// is not provided, the provider project is used.
	Project interface{}
}

The set of arguments for constructing a User resource.

type UserState

type UserState struct {
	// 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.
	Host interface{}
	// The name of the Cloud SQL instance. Changing this
	// forces a new resource to be created.
	Instance interface{}
	// The name of the user. Changing this forces a new resource
	// to be created.
	Name interface{}
	// The password for the user. Can be updated.
	Password interface{}
	// The ID of the project in which the resource belongs. If it
	// is not provided, the provider project is used.
	Project interface{}
}

Input properties used for looking up and filtering User resources.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL