sql

package
v1.1.0 Latest Latest
Warning

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

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

Documentation

Overview

nolint: lll Package sql exports types, functions, subpackages for provisioning sql resources.

> This provider is a derived work of the [Terraform Provider](https://github.com/terraform-providers/terraform-provider-google) > distributed under [MPL 2.0](https://www.mozilla.org/en-US/MPL/2.0/). If you encounter a bug or missing feature, > first check the [`pulumi/pulumi-gcp` repo](https://github.com/pulumi/pulumi-gcp/issues); however, if that doesn't turn up anything, > please consult the source [`terraform-providers/terraform-provider-google` repo](https://github.com/terraform-providers/terraform-provider-google/issues).

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
}

> This content is derived from https://github.com/terraform-providers/terraform-provider-google/blob/master/website/docs/r/sql_database.html.markdown.

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

func (*Database) Collation

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

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

func (*Database) Name

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

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

func (*Database) URN

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

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

type DatabaseArgs

type DatabaseArgs struct {
	Charset   interface{}
	Collation interface{}
	Instance  interface{}
	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 `sql.DatabaseInstance`:** - Second-generation instances include a default 'root'@'%' user with no password. This user will be deleted by this provider on instance creation. You should use `sql.User` to define a custom user with a restricted host and strong password.

> This content is derived from https://github.com/terraform-providers/terraform-provider-google/blob/master/website/docs/r/sql_database_instance.html.markdown.

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 or PostgreSQL version to use. Can be `MYSQL_5_6`, `MYSQL_5_7`, `POSTGRES_9_6` or `POSTGRES_11` (beta) 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

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 `binaryLogEnabled` set, as well as existing backups.

func (*DatabaseInstance) Name

The name of the instance. If the name is left blank, this provider 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 provides a convenient way to access an IP of a specific type without performing filtering.

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 provides a convenient way to access an IP of a specific type without performing filtering.

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 or PostgreSQL version to
	// use. Can be `MYSQL_5_6`, `MYSQL_5_7`, `POSTGRES_9_6` or `POSTGRES_11` (beta) 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
	// `binaryLogEnabled` set, as well as existing backups.
	MasterInstanceName interface{}
	// The name of the instance. If the name is left
	// blank, this provider 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 or PostgreSQL version to
	// use. Can be `MYSQL_5_6`, `MYSQL_5_7`, `POSTGRES_9_6` or `POSTGRES_11` (beta) 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{}
	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
	// `binaryLogEnabled` set, as well as existing backups.
	MasterInstanceName interface{}
	// The name of the instance. If the name is left
	// blank, this provider 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 provides a convenient way to access an IP of a specific type without
	// performing filtering.
	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 provides a convenient way to access an IP of a specific type without
	// performing filtering.
	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 {
	Charset   interface{}
	Collation interface{}
	Instance  interface{}
	Name      interface{}
	// The ID of the project in which the resource belongs.
	// If it is not provided, the provider project is used.
	Project  interface{}
	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).

> This content is derived from https://github.com/terraform-providers/terraform-provider-google/blob/master/website/docs/r/sql_ssl_cert.html.markdown.

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

> This content is derived from https://github.com/terraform-providers/terraform-provider-google/blob/master/website/docs/r/sql_user.html.markdown.

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