Documentation
¶
Overview ¶
A Pulumi package for creating and managing mysql cloud resources.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Database ¶
type Database struct { pulumi.CustomResourceState // The default character set to use when // a table is created without specifying an explicit character set. Defaults // to "utf8". DefaultCharacterSet pulumi.StringPtrOutput `pulumi:"defaultCharacterSet"` // The default collation to use when a table // is created without specifying an explicit collation. Defaults to // “utf8GeneralCi“. Each character set has its own set of collations, so // changing the character set requires also changing the collation. DefaultCollation pulumi.StringPtrOutput `pulumi:"defaultCollation"` // The name of the database. This must be unique within // a given MySQL server and may or may not be case-sensitive depending on // the operating system on which the MySQL server is running. Name pulumi.StringOutput `pulumi:"name"` }
The “.Database“ resource creates and manages a database on a MySQL server.
> **Caution:** The “.Database“ resource can completely delete your database just as easily as it can create it. To avoid costly accidents, consider setting [“preventDestroy“](https://www.terraform.io/docs/configuration/resources.html#prevent_destroy) on your database resources as an extra safety measure.
func GetDatabase ¶
func GetDatabase(ctx *pulumi.Context, name string, id pulumi.IDInput, state *DatabaseState, opts ...pulumi.ResourceOption) (*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.ResourceOption) (*Database, error)
NewDatabase registers a new resource with the given unique name, arguments, and options.
type DatabaseArgs ¶
type DatabaseArgs struct { // The default character set to use when // a table is created without specifying an explicit character set. Defaults // to "utf8". DefaultCharacterSet pulumi.StringPtrInput // The default collation to use when a table // is created without specifying an explicit collation. Defaults to // “utf8GeneralCi“. Each character set has its own set of collations, so // changing the character set requires also changing the collation. DefaultCollation pulumi.StringPtrInput // The name of the database. This must be unique within // a given MySQL server and may or may not be case-sensitive depending on // the operating system on which the MySQL server is running. Name pulumi.StringPtrInput }
The set of arguments for constructing a Database resource.
func (DatabaseArgs) ElementType ¶
func (DatabaseArgs) ElementType() reflect.Type
type DatabaseState ¶
type DatabaseState struct { // The default character set to use when // a table is created without specifying an explicit character set. Defaults // to "utf8". DefaultCharacterSet pulumi.StringPtrInput // The default collation to use when a table // is created without specifying an explicit collation. Defaults to // “utf8GeneralCi“. Each character set has its own set of collations, so // changing the character set requires also changing the collation. DefaultCollation pulumi.StringPtrInput // The name of the database. This must be unique within // a given MySQL server and may or may not be case-sensitive depending on // the operating system on which the MySQL server is running. Name pulumi.StringPtrInput }
func (DatabaseState) ElementType ¶
func (DatabaseState) ElementType() reflect.Type
type Grant ¶
type Grant struct { pulumi.CustomResourceState // The database to grant privileges on. Database pulumi.StringOutput `pulumi:"database"` // Whether to also give the user privileges to grant the same privileges to other users. Grant pulumi.BoolPtrOutput `pulumi:"grant"` // The source host of the user. Defaults to "localhost". Conflicts with `role`. Host pulumi.StringPtrOutput `pulumi:"host"` // A list of privileges to grant to the user. Refer to a list of privileges (such as [here](https://dev.mysql.com/doc/refman/5.5/en/grant.html)) for applicable privileges. Conflicts with `roles`. Privileges pulumi.StringArrayOutput `pulumi:"privileges"` // The role to grant `privileges` to. Conflicts with `user` and `host`. Role pulumi.StringPtrOutput `pulumi:"role"` // A list of rols to grant to the user. Conflicts with `privileges`. Roles pulumi.StringArrayOutput `pulumi:"roles"` // Which table to grant `privileges` on. Defaults to `*`, which is all tables. Table pulumi.StringPtrOutput `pulumi:"table"` // An TLS-Option for the `GRANT` statement. The value is suffixed to `REQUIRE`. A value of 'SSL' will generate a `GRANT ... REQUIRE SSL` statement. See the [MYSQL `GRANT` documentation](https://dev.mysql.com/doc/refman/5.7/en/grant.html) for more. Ignored if MySQL version is under 5.7.0. TlsOption pulumi.StringPtrOutput `pulumi:"tlsOption"` // The name of the user. Conflicts with `role`. User pulumi.StringPtrOutput `pulumi:"user"` }
The “.Grant“ resource creates and manages privileges given to a user on a MySQL server.
func GetGrant ¶
func GetGrant(ctx *pulumi.Context, name string, id pulumi.IDInput, state *GrantState, opts ...pulumi.ResourceOption) (*Grant, error)
GetGrant gets an existing Grant resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).
type GrantArgs ¶
type GrantArgs struct { // The database to grant privileges on. Database pulumi.StringInput // Whether to also give the user privileges to grant the same privileges to other users. Grant pulumi.BoolPtrInput // The source host of the user. Defaults to "localhost". Conflicts with `role`. Host pulumi.StringPtrInput // A list of privileges to grant to the user. Refer to a list of privileges (such as [here](https://dev.mysql.com/doc/refman/5.5/en/grant.html)) for applicable privileges. Conflicts with `roles`. Privileges pulumi.StringArrayInput // The role to grant `privileges` to. Conflicts with `user` and `host`. Role pulumi.StringPtrInput // A list of rols to grant to the user. Conflicts with `privileges`. Roles pulumi.StringArrayInput // Which table to grant `privileges` on. Defaults to `*`, which is all tables. Table pulumi.StringPtrInput // An TLS-Option for the `GRANT` statement. The value is suffixed to `REQUIRE`. A value of 'SSL' will generate a `GRANT ... REQUIRE SSL` statement. See the [MYSQL `GRANT` documentation](https://dev.mysql.com/doc/refman/5.7/en/grant.html) for more. Ignored if MySQL version is under 5.7.0. TlsOption pulumi.StringPtrInput // The name of the user. Conflicts with `role`. User pulumi.StringPtrInput }
The set of arguments for constructing a Grant resource.
func (GrantArgs) ElementType ¶
type GrantState ¶
type GrantState struct { // The database to grant privileges on. Database pulumi.StringPtrInput // Whether to also give the user privileges to grant the same privileges to other users. Grant pulumi.BoolPtrInput // The source host of the user. Defaults to "localhost". Conflicts with `role`. Host pulumi.StringPtrInput // A list of privileges to grant to the user. Refer to a list of privileges (such as [here](https://dev.mysql.com/doc/refman/5.5/en/grant.html)) for applicable privileges. Conflicts with `roles`. Privileges pulumi.StringArrayInput // The role to grant `privileges` to. Conflicts with `user` and `host`. Role pulumi.StringPtrInput // A list of rols to grant to the user. Conflicts with `privileges`. Roles pulumi.StringArrayInput // Which table to grant `privileges` on. Defaults to `*`, which is all tables. Table pulumi.StringPtrInput // An TLS-Option for the `GRANT` statement. The value is suffixed to `REQUIRE`. A value of 'SSL' will generate a `GRANT ... REQUIRE SSL` statement. See the [MYSQL `GRANT` documentation](https://dev.mysql.com/doc/refman/5.7/en/grant.html) for more. Ignored if MySQL version is under 5.7.0. TlsOption pulumi.StringPtrInput // The name of the user. Conflicts with `role`. User pulumi.StringPtrInput }
func (GrantState) ElementType ¶
func (GrantState) ElementType() reflect.Type
type Provider ¶
type Provider struct {
pulumi.ProviderResourceState
}
The provider type for the mysql package. By default, resources use package-wide configuration settings, however an explicit `Provider` instance may be created and passed during resource construction to achieve fine-grained programmatic control over provider settings. See the [documentation](https://www.pulumi.com/docs/reference/programming-model/#providers) for more information.
func NewProvider ¶
func NewProvider(ctx *pulumi.Context, name string, args *ProviderArgs, opts ...pulumi.ResourceOption) (*Provider, error)
NewProvider registers a new resource with the given unique name, arguments, and options.
type ProviderArgs ¶
type ProviderArgs struct { AuthenticationPlugin pulumi.StringPtrInput Endpoint pulumi.StringPtrInput MaxConnLifetimeSec pulumi.IntPtrInput MaxOpenConns pulumi.IntPtrInput Password pulumi.StringPtrInput Proxy pulumi.StringPtrInput Tls pulumi.StringPtrInput Username pulumi.StringPtrInput }
The set of arguments for constructing a Provider resource.
func (ProviderArgs) ElementType ¶
func (ProviderArgs) ElementType() reflect.Type
type Role ¶
type Role struct { pulumi.CustomResourceState // The name of the role. Name pulumi.StringOutput `pulumi:"name"` }
The “.Role“ resource creates and manages a user on a MySQL server.
> **Note:** MySQL introduced roles in version 8. They do not work on MySQL 5 and lower.
func GetRole ¶
func GetRole(ctx *pulumi.Context, name string, id pulumi.IDInput, state *RoleState, opts ...pulumi.ResourceOption) (*Role, error)
GetRole gets an existing Role resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).
type RoleArgs ¶
type RoleArgs struct { // The name of the role. Name pulumi.StringPtrInput }
The set of arguments for constructing a Role resource.
func (RoleArgs) ElementType ¶
type RoleState ¶
type RoleState struct { // The name of the role. Name pulumi.StringPtrInput }
func (RoleState) ElementType ¶
type User ¶
type User struct { pulumi.CustomResourceState // Use an [authentication plugin][ref-auth-plugins] to authenticate the user instead of using password authentication. Description of the fields allowed in the block below. Conflicts with `password` and `plaintextPassword`. AuthPlugin pulumi.StringPtrOutput `pulumi:"authPlugin"` // The source host of the user. Defaults to "localhost". Host pulumi.StringPtrOutput `pulumi:"host"` // Deprecated alias of `plaintextPassword`, whose value is *stored as plaintext in state*. Prefer to use `plaintextPassword` instead, which stores the password as an unsalted hash. Conflicts with `authPlugin`. Password pulumi.StringPtrOutput `pulumi:"password"` // The password for the user. This must be provided in plain text, so the data source for it must be secured. An _unsalted_ hash of the provided password is stored in state. Conflicts with `authPlugin`. PlaintextPassword pulumi.StringPtrOutput `pulumi:"plaintextPassword"` // An TLS-Option for the `CREATE USER` or `ALTER USER` statement. The value is suffixed to `REQUIRE`. A value of 'SSL' will generate a `CREATE USER ... REQUIRE SSL` statement. See the [MYSQL `CREATE USER` documentation](https://dev.mysql.com/doc/refman/5.7/en/create-user.html) for more. Ignored if MySQL version is under 5.7.0. TlsOption pulumi.StringPtrOutput `pulumi:"tlsOption"` // The name of the user. User pulumi.StringOutput `pulumi:"user"` }
The “.User“ resource creates and manages a user on a MySQL server.
> **Note:** The password for the user is provided in plain text, and is obscured by an unsalted hash in the state [Read more about sensitive data in state](https://www.terraform.io/docs/state/sensitive-data.html). Care is required when using this resource, to avoid disclosing the password.
func GetUser ¶
func GetUser(ctx *pulumi.Context, name string, id pulumi.IDInput, state *UserState, opts ...pulumi.ResourceOption) (*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).
type UserArgs ¶
type UserArgs struct { // Use an [authentication plugin][ref-auth-plugins] to authenticate the user instead of using password authentication. Description of the fields allowed in the block below. Conflicts with `password` and `plaintextPassword`. AuthPlugin pulumi.StringPtrInput // The source host of the user. Defaults to "localhost". Host pulumi.StringPtrInput // Deprecated alias of `plaintextPassword`, whose value is *stored as plaintext in state*. Prefer to use `plaintextPassword` instead, which stores the password as an unsalted hash. Conflicts with `authPlugin`. Password pulumi.StringPtrInput // The password for the user. This must be provided in plain text, so the data source for it must be secured. An _unsalted_ hash of the provided password is stored in state. Conflicts with `authPlugin`. PlaintextPassword pulumi.StringPtrInput // An TLS-Option for the `CREATE USER` or `ALTER USER` statement. The value is suffixed to `REQUIRE`. A value of 'SSL' will generate a `CREATE USER ... REQUIRE SSL` statement. See the [MYSQL `CREATE USER` documentation](https://dev.mysql.com/doc/refman/5.7/en/create-user.html) for more. Ignored if MySQL version is under 5.7.0. TlsOption pulumi.StringPtrInput // The name of the user. User pulumi.StringInput }
The set of arguments for constructing a User resource.
func (UserArgs) ElementType ¶
type UserPassword ¶
type UserPassword struct { pulumi.CustomResourceState // The encrypted password, base64 encoded. EncryptedPassword pulumi.StringOutput `pulumi:"encryptedPassword"` // The source host of the user. Defaults to `localhost`. Host pulumi.StringPtrOutput `pulumi:"host"` // The fingerprint of the PGP key used to encrypt the password KeyFingerprint pulumi.StringOutput `pulumi:"keyFingerprint"` // Either a base-64 encoded PGP public key, or a keybase username in the form `keybase:some_person_that_exists`. PgpKey pulumi.StringOutput `pulumi:"pgpKey"` // The IAM user to associate with this access key. User pulumi.StringOutput `pulumi:"user"` }
func GetUserPassword ¶
func GetUserPassword(ctx *pulumi.Context, name string, id pulumi.IDInput, state *UserPasswordState, opts ...pulumi.ResourceOption) (*UserPassword, error)
GetUserPassword gets an existing UserPassword 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 NewUserPassword ¶
func NewUserPassword(ctx *pulumi.Context, name string, args *UserPasswordArgs, opts ...pulumi.ResourceOption) (*UserPassword, error)
NewUserPassword registers a new resource with the given unique name, arguments, and options.
type UserPasswordArgs ¶
type UserPasswordArgs struct { // The source host of the user. Defaults to `localhost`. Host pulumi.StringPtrInput // Either a base-64 encoded PGP public key, or a keybase username in the form `keybase:some_person_that_exists`. PgpKey pulumi.StringInput // The IAM user to associate with this access key. User pulumi.StringInput }
The set of arguments for constructing a UserPassword resource.
func (UserPasswordArgs) ElementType ¶
func (UserPasswordArgs) ElementType() reflect.Type
type UserPasswordState ¶
type UserPasswordState struct { // The encrypted password, base64 encoded. EncryptedPassword pulumi.StringPtrInput // The source host of the user. Defaults to `localhost`. Host pulumi.StringPtrInput // The fingerprint of the PGP key used to encrypt the password KeyFingerprint pulumi.StringPtrInput // Either a base-64 encoded PGP public key, or a keybase username in the form `keybase:some_person_that_exists`. PgpKey pulumi.StringPtrInput // The IAM user to associate with this access key. User pulumi.StringPtrInput }
func (UserPasswordState) ElementType ¶
func (UserPasswordState) ElementType() reflect.Type
type UserState ¶
type UserState struct { // Use an [authentication plugin][ref-auth-plugins] to authenticate the user instead of using password authentication. Description of the fields allowed in the block below. Conflicts with `password` and `plaintextPassword`. AuthPlugin pulumi.StringPtrInput // The source host of the user. Defaults to "localhost". Host pulumi.StringPtrInput // Deprecated alias of `plaintextPassword`, whose value is *stored as plaintext in state*. Prefer to use `plaintextPassword` instead, which stores the password as an unsalted hash. Conflicts with `authPlugin`. Password pulumi.StringPtrInput // The password for the user. This must be provided in plain text, so the data source for it must be secured. An _unsalted_ hash of the provided password is stored in state. Conflicts with `authPlugin`. PlaintextPassword pulumi.StringPtrInput // An TLS-Option for the `CREATE USER` or `ALTER USER` statement. The value is suffixed to `REQUIRE`. A value of 'SSL' will generate a `CREATE USER ... REQUIRE SSL` statement. See the [MYSQL `CREATE USER` documentation](https://dev.mysql.com/doc/refman/5.7/en/create-user.html) for more. Ignored if MySQL version is under 5.7.0. TlsOption pulumi.StringPtrInput // The name of the user. User pulumi.StringPtrInput }