sql

package
v0.14.4-dev Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2018 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](/docs/providers/google/index.html#beta-features), 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](/docs/providers/google/index.html#beta-features), 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](/docs/providers/google/index.html#beta-features),
	// 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](/docs/providers/google/index.html#beta-features),
	// 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.

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. `POSTGRES_9_6` support is in [Beta](/docs/providers/google/index.html#beta-features).

func (*DatabaseInstance) FirstIpAddress

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

The first IPv4 address of the addresses assigned. This is 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

A name for this whitelist entry.

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) 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) 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. `POSTGRES_9_6` support is in [Beta](/docs/providers/google/index.html#beta-features).
	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{}
	// A name for this whitelist entry.
	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.
	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. `POSTGRES_9_6` support is in [Beta](/docs/providers/google/index.html#beta-features).
	DatabaseVersion interface{}
	// The first IPv4 address of the addresses assigned. This is
	// 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{}
	// A name for this whitelist entry.
	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 URI of the created resource.
	SelfLink     interface{}
	ServerCaCert 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](/docs/providers/google/index.html#beta-features),
	// 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](/docs/providers/google/index.html#beta-features),
	// 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 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](/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 first generation SQL instances. Don't set this field for second generation SQL 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 first generation SQL instances. Don't set this field for second generation
	// SQL 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 first generation SQL instances. Don't set this field for second generation
	// SQL 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