Documentation
¶
Overview ¶
A Pulumi package for creating and managing mysql cloud resources.
Index ¶
- func PkgVersion() (semver.Version, error)
- type Database
- func (*Database) ElementType() reflect.Type
- func (i *Database) ToDatabaseOutput() DatabaseOutput
- func (i *Database) ToDatabaseOutputWithContext(ctx context.Context) DatabaseOutput
- func (i *Database) ToDatabasePtrOutput() DatabasePtrOutput
- func (i *Database) ToDatabasePtrOutputWithContext(ctx context.Context) DatabasePtrOutput
- type DatabaseArgs
- type DatabaseArray
- type DatabaseArrayInput
- type DatabaseArrayOutput
- type DatabaseInput
- type DatabaseMap
- type DatabaseMapInput
- type DatabaseMapOutput
- type DatabaseOutput
- func (DatabaseOutput) ElementType() reflect.Type
- func (o DatabaseOutput) ToDatabaseOutput() DatabaseOutput
- func (o DatabaseOutput) ToDatabaseOutputWithContext(ctx context.Context) DatabaseOutput
- func (o DatabaseOutput) ToDatabasePtrOutput() DatabasePtrOutput
- func (o DatabaseOutput) ToDatabasePtrOutputWithContext(ctx context.Context) DatabasePtrOutput
- type DatabasePtrInput
- type DatabasePtrOutput
- type DatabaseState
- type Grant
- type GrantArgs
- type GrantArray
- type GrantArrayInput
- type GrantArrayOutput
- type GrantInput
- type GrantMap
- type GrantMapInput
- type GrantMapOutput
- type GrantOutput
- func (GrantOutput) ElementType() reflect.Type
- func (o GrantOutput) ToGrantOutput() GrantOutput
- func (o GrantOutput) ToGrantOutputWithContext(ctx context.Context) GrantOutput
- func (o GrantOutput) ToGrantPtrOutput() GrantPtrOutput
- func (o GrantOutput) ToGrantPtrOutputWithContext(ctx context.Context) GrantPtrOutput
- type GrantPtrInput
- type GrantPtrOutput
- type GrantState
- type Provider
- func (*Provider) ElementType() reflect.Type
- func (i *Provider) ToProviderOutput() ProviderOutput
- func (i *Provider) ToProviderOutputWithContext(ctx context.Context) ProviderOutput
- func (i *Provider) ToProviderPtrOutput() ProviderPtrOutput
- func (i *Provider) ToProviderPtrOutputWithContext(ctx context.Context) ProviderPtrOutput
- type ProviderArgs
- type ProviderInput
- type ProviderOutput
- func (ProviderOutput) ElementType() reflect.Type
- func (o ProviderOutput) ToProviderOutput() ProviderOutput
- func (o ProviderOutput) ToProviderOutputWithContext(ctx context.Context) ProviderOutput
- func (o ProviderOutput) ToProviderPtrOutput() ProviderPtrOutput
- func (o ProviderOutput) ToProviderPtrOutputWithContext(ctx context.Context) ProviderPtrOutput
- type ProviderPtrInput
- type ProviderPtrOutput
- type Role
- type RoleArgs
- type RoleArray
- type RoleArrayInput
- type RoleArrayOutput
- type RoleInput
- type RoleMap
- type RoleMapInput
- type RoleMapOutput
- type RoleOutput
- func (RoleOutput) ElementType() reflect.Type
- func (o RoleOutput) ToRoleOutput() RoleOutput
- func (o RoleOutput) ToRoleOutputWithContext(ctx context.Context) RoleOutput
- func (o RoleOutput) ToRolePtrOutput() RolePtrOutput
- func (o RoleOutput) ToRolePtrOutputWithContext(ctx context.Context) RolePtrOutput
- type RolePtrInput
- type RolePtrOutput
- type RoleState
- type User
- type UserArgs
- type UserArray
- type UserArrayInput
- type UserArrayOutput
- type UserInput
- type UserMap
- type UserMapInput
- type UserMapOutput
- type UserOutput
- func (UserOutput) ElementType() reflect.Type
- func (o UserOutput) ToUserOutput() UserOutput
- func (o UserOutput) ToUserOutputWithContext(ctx context.Context) UserOutput
- func (o UserOutput) ToUserPtrOutput() UserPtrOutput
- func (o UserOutput) ToUserPtrOutputWithContext(ctx context.Context) UserPtrOutput
- type UserPassword
- func (*UserPassword) ElementType() reflect.Type
- func (i *UserPassword) ToUserPasswordOutput() UserPasswordOutput
- func (i *UserPassword) ToUserPasswordOutputWithContext(ctx context.Context) UserPasswordOutput
- func (i *UserPassword) ToUserPasswordPtrOutput() UserPasswordPtrOutput
- func (i *UserPassword) ToUserPasswordPtrOutputWithContext(ctx context.Context) UserPasswordPtrOutput
- type UserPasswordArgs
- type UserPasswordArray
- type UserPasswordArrayInput
- type UserPasswordArrayOutput
- func (UserPasswordArrayOutput) ElementType() reflect.Type
- func (o UserPasswordArrayOutput) Index(i pulumi.IntInput) UserPasswordOutput
- func (o UserPasswordArrayOutput) ToUserPasswordArrayOutput() UserPasswordArrayOutput
- func (o UserPasswordArrayOutput) ToUserPasswordArrayOutputWithContext(ctx context.Context) UserPasswordArrayOutput
- type UserPasswordInput
- type UserPasswordMap
- type UserPasswordMapInput
- type UserPasswordMapOutput
- func (UserPasswordMapOutput) ElementType() reflect.Type
- func (o UserPasswordMapOutput) MapIndex(k pulumi.StringInput) UserPasswordOutput
- func (o UserPasswordMapOutput) ToUserPasswordMapOutput() UserPasswordMapOutput
- func (o UserPasswordMapOutput) ToUserPasswordMapOutputWithContext(ctx context.Context) UserPasswordMapOutput
- type UserPasswordOutput
- func (UserPasswordOutput) ElementType() reflect.Type
- func (o UserPasswordOutput) ToUserPasswordOutput() UserPasswordOutput
- func (o UserPasswordOutput) ToUserPasswordOutputWithContext(ctx context.Context) UserPasswordOutput
- func (o UserPasswordOutput) ToUserPasswordPtrOutput() UserPasswordPtrOutput
- func (o UserPasswordOutput) ToUserPasswordPtrOutputWithContext(ctx context.Context) UserPasswordPtrOutput
- type UserPasswordPtrInput
- type UserPasswordPtrOutput
- type UserPasswordState
- type UserPtrInput
- type UserPtrOutput
- type UserState
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PkgVersion ¶ added in v2.4.0
PkgVersion uses reflection to determine the version of the current package.
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.
## Example Usage
```go package main
import (
"github.com/pulumi/pulumi-mysql/sdk/v2/go/mysql" "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { _, err := mysql.NewDatabase(ctx, "app", nil) if err != nil { return err } return nil }) }
```
## Import
Databases can be imported using their name, e.g.
```sh
$ pulumi import mysql:index/database:Database example my-example-database
```
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.
func (*Database) ElementType ¶ added in v2.3.2
func (*Database) ToDatabaseOutput ¶ added in v2.3.2
func (i *Database) ToDatabaseOutput() DatabaseOutput
func (*Database) ToDatabaseOutputWithContext ¶ added in v2.3.2
func (i *Database) ToDatabaseOutputWithContext(ctx context.Context) DatabaseOutput
func (*Database) ToDatabasePtrOutput ¶ added in v2.4.1
func (i *Database) ToDatabasePtrOutput() DatabasePtrOutput
func (*Database) ToDatabasePtrOutputWithContext ¶ added in v2.4.1
func (i *Database) ToDatabasePtrOutputWithContext(ctx context.Context) DatabasePtrOutput
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 DatabaseArray ¶ added in v2.4.1
type DatabaseArray []DatabaseInput
func (DatabaseArray) ElementType ¶ added in v2.4.1
func (DatabaseArray) ElementType() reflect.Type
func (DatabaseArray) ToDatabaseArrayOutput ¶ added in v2.4.1
func (i DatabaseArray) ToDatabaseArrayOutput() DatabaseArrayOutput
func (DatabaseArray) ToDatabaseArrayOutputWithContext ¶ added in v2.4.1
func (i DatabaseArray) ToDatabaseArrayOutputWithContext(ctx context.Context) DatabaseArrayOutput
type DatabaseArrayInput ¶ added in v2.4.1
type DatabaseArrayInput interface { pulumi.Input ToDatabaseArrayOutput() DatabaseArrayOutput ToDatabaseArrayOutputWithContext(context.Context) DatabaseArrayOutput }
DatabaseArrayInput is an input type that accepts DatabaseArray and DatabaseArrayOutput values. You can construct a concrete instance of `DatabaseArrayInput` via:
DatabaseArray{ DatabaseArgs{...} }
type DatabaseArrayOutput ¶ added in v2.4.1
type DatabaseArrayOutput struct{ *pulumi.OutputState }
func (DatabaseArrayOutput) ElementType ¶ added in v2.4.1
func (DatabaseArrayOutput) ElementType() reflect.Type
func (DatabaseArrayOutput) Index ¶ added in v2.4.1
func (o DatabaseArrayOutput) Index(i pulumi.IntInput) DatabaseOutput
func (DatabaseArrayOutput) ToDatabaseArrayOutput ¶ added in v2.4.1
func (o DatabaseArrayOutput) ToDatabaseArrayOutput() DatabaseArrayOutput
func (DatabaseArrayOutput) ToDatabaseArrayOutputWithContext ¶ added in v2.4.1
func (o DatabaseArrayOutput) ToDatabaseArrayOutputWithContext(ctx context.Context) DatabaseArrayOutput
type DatabaseInput ¶ added in v2.3.2
type DatabaseInput interface { pulumi.Input ToDatabaseOutput() DatabaseOutput ToDatabaseOutputWithContext(ctx context.Context) DatabaseOutput }
type DatabaseMap ¶ added in v2.4.1
type DatabaseMap map[string]DatabaseInput
func (DatabaseMap) ElementType ¶ added in v2.4.1
func (DatabaseMap) ElementType() reflect.Type
func (DatabaseMap) ToDatabaseMapOutput ¶ added in v2.4.1
func (i DatabaseMap) ToDatabaseMapOutput() DatabaseMapOutput
func (DatabaseMap) ToDatabaseMapOutputWithContext ¶ added in v2.4.1
func (i DatabaseMap) ToDatabaseMapOutputWithContext(ctx context.Context) DatabaseMapOutput
type DatabaseMapInput ¶ added in v2.4.1
type DatabaseMapInput interface { pulumi.Input ToDatabaseMapOutput() DatabaseMapOutput ToDatabaseMapOutputWithContext(context.Context) DatabaseMapOutput }
DatabaseMapInput is an input type that accepts DatabaseMap and DatabaseMapOutput values. You can construct a concrete instance of `DatabaseMapInput` via:
DatabaseMap{ "key": DatabaseArgs{...} }
type DatabaseMapOutput ¶ added in v2.4.1
type DatabaseMapOutput struct{ *pulumi.OutputState }
func (DatabaseMapOutput) ElementType ¶ added in v2.4.1
func (DatabaseMapOutput) ElementType() reflect.Type
func (DatabaseMapOutput) MapIndex ¶ added in v2.4.1
func (o DatabaseMapOutput) MapIndex(k pulumi.StringInput) DatabaseOutput
func (DatabaseMapOutput) ToDatabaseMapOutput ¶ added in v2.4.1
func (o DatabaseMapOutput) ToDatabaseMapOutput() DatabaseMapOutput
func (DatabaseMapOutput) ToDatabaseMapOutputWithContext ¶ added in v2.4.1
func (o DatabaseMapOutput) ToDatabaseMapOutputWithContext(ctx context.Context) DatabaseMapOutput
type DatabaseOutput ¶ added in v2.3.2
type DatabaseOutput struct {
*pulumi.OutputState
}
func (DatabaseOutput) ElementType ¶ added in v2.3.2
func (DatabaseOutput) ElementType() reflect.Type
func (DatabaseOutput) ToDatabaseOutput ¶ added in v2.3.2
func (o DatabaseOutput) ToDatabaseOutput() DatabaseOutput
func (DatabaseOutput) ToDatabaseOutputWithContext ¶ added in v2.3.2
func (o DatabaseOutput) ToDatabaseOutputWithContext(ctx context.Context) DatabaseOutput
func (DatabaseOutput) ToDatabasePtrOutput ¶ added in v2.4.1
func (o DatabaseOutput) ToDatabasePtrOutput() DatabasePtrOutput
func (DatabaseOutput) ToDatabasePtrOutputWithContext ¶ added in v2.4.1
func (o DatabaseOutput) ToDatabasePtrOutputWithContext(ctx context.Context) DatabasePtrOutput
type DatabasePtrInput ¶ added in v2.4.1
type DatabasePtrInput interface { pulumi.Input ToDatabasePtrOutput() DatabasePtrOutput ToDatabasePtrOutputWithContext(ctx context.Context) DatabasePtrOutput }
type DatabasePtrOutput ¶ added in v2.4.1
type DatabasePtrOutput struct {
*pulumi.OutputState
}
func (DatabasePtrOutput) ElementType ¶ added in v2.4.1
func (DatabasePtrOutput) ElementType() reflect.Type
func (DatabasePtrOutput) ToDatabasePtrOutput ¶ added in v2.4.1
func (o DatabasePtrOutput) ToDatabasePtrOutput() DatabasePtrOutput
func (DatabasePtrOutput) ToDatabasePtrOutputWithContext ¶ added in v2.4.1
func (o DatabasePtrOutput) ToDatabasePtrOutputWithContext(ctx context.Context) DatabasePtrOutput
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.
## Examples
### Granting Privileges to a User
```go package main
import (
"github.com/pulumi/pulumi-mysql/sdk/v2/go/mysql" "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { jdoeUser, err := mysql.NewUser(ctx, "jdoeUser", &mysql.UserArgs{ Host: pulumi.String("example.com"), PlaintextPassword: pulumi.String("password"), User: pulumi.String("jdoe"), }) if err != nil { return err } _, err = mysql.NewGrant(ctx, "jdoeGrant", &mysql.GrantArgs{ Database: pulumi.String("app"), Host: jdoeUser.Host, Privileges: pulumi.StringArray{ pulumi.String("SELECT"), pulumi.String("UPDATE"), }, User: jdoeUser.User, }) if err != nil { return err } return nil }) }
```
### Granting Privileges to a Role
```go package main
import (
"github.com/pulumi/pulumi-mysql/sdk/v2/go/mysql" "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { developerRole, err := mysql.NewRole(ctx, "developerRole", nil) if err != nil { return err } _, err = mysql.NewGrant(ctx, "developerGrant", &mysql.GrantArgs{ Database: pulumi.String("app"), Privileges: pulumi.StringArray{ pulumi.String("SELECT"), pulumi.String("UPDATE"), }, Role: developerRole.Name, }) if err != nil { return err } return nil }) }
```
### Adding a Role to a User
```go package main
import (
"github.com/pulumi/pulumi-mysql/sdk/v2/go/mysql" "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { jdoe, err := mysql.NewUser(ctx, "jdoe", &mysql.UserArgs{ Host: pulumi.String("example.com"), PlaintextPassword: pulumi.String("password"), User: pulumi.String("jdoe"), }) if err != nil { return err } developerRole, err := mysql.NewRole(ctx, "developerRole", nil) if err != nil { return err } _, err = mysql.NewGrant(ctx, "developerGrant", &mysql.GrantArgs{ Database: pulumi.String("app"), Host: jdoe.Host, Roles: pulumi.StringArray{ developerRole.Name, }, User: jdoe.User, }) if err != nil { return err } return nil }) }
```
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).
func NewGrant ¶
func NewGrant(ctx *pulumi.Context, name string, args *GrantArgs, opts ...pulumi.ResourceOption) (*Grant, error)
NewGrant registers a new resource with the given unique name, arguments, and options.
func (*Grant) ElementType ¶ added in v2.3.2
func (*Grant) ToGrantOutput ¶ added in v2.3.2
func (i *Grant) ToGrantOutput() GrantOutput
func (*Grant) ToGrantOutputWithContext ¶ added in v2.3.2
func (i *Grant) ToGrantOutputWithContext(ctx context.Context) GrantOutput
func (*Grant) ToGrantPtrOutput ¶ added in v2.4.1
func (i *Grant) ToGrantPtrOutput() GrantPtrOutput
func (*Grant) ToGrantPtrOutputWithContext ¶ added in v2.4.1
func (i *Grant) ToGrantPtrOutputWithContext(ctx context.Context) GrantPtrOutput
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 GrantArray ¶ added in v2.4.1
type GrantArray []GrantInput
func (GrantArray) ElementType ¶ added in v2.4.1
func (GrantArray) ElementType() reflect.Type
func (GrantArray) ToGrantArrayOutput ¶ added in v2.4.1
func (i GrantArray) ToGrantArrayOutput() GrantArrayOutput
func (GrantArray) ToGrantArrayOutputWithContext ¶ added in v2.4.1
func (i GrantArray) ToGrantArrayOutputWithContext(ctx context.Context) GrantArrayOutput
type GrantArrayInput ¶ added in v2.4.1
type GrantArrayInput interface { pulumi.Input ToGrantArrayOutput() GrantArrayOutput ToGrantArrayOutputWithContext(context.Context) GrantArrayOutput }
GrantArrayInput is an input type that accepts GrantArray and GrantArrayOutput values. You can construct a concrete instance of `GrantArrayInput` via:
GrantArray{ GrantArgs{...} }
type GrantArrayOutput ¶ added in v2.4.1
type GrantArrayOutput struct{ *pulumi.OutputState }
func (GrantArrayOutput) ElementType ¶ added in v2.4.1
func (GrantArrayOutput) ElementType() reflect.Type
func (GrantArrayOutput) Index ¶ added in v2.4.1
func (o GrantArrayOutput) Index(i pulumi.IntInput) GrantOutput
func (GrantArrayOutput) ToGrantArrayOutput ¶ added in v2.4.1
func (o GrantArrayOutput) ToGrantArrayOutput() GrantArrayOutput
func (GrantArrayOutput) ToGrantArrayOutputWithContext ¶ added in v2.4.1
func (o GrantArrayOutput) ToGrantArrayOutputWithContext(ctx context.Context) GrantArrayOutput
type GrantInput ¶ added in v2.3.2
type GrantInput interface { pulumi.Input ToGrantOutput() GrantOutput ToGrantOutputWithContext(ctx context.Context) GrantOutput }
type GrantMap ¶ added in v2.4.1
type GrantMap map[string]GrantInput
func (GrantMap) ElementType ¶ added in v2.4.1
func (GrantMap) ToGrantMapOutput ¶ added in v2.4.1
func (i GrantMap) ToGrantMapOutput() GrantMapOutput
func (GrantMap) ToGrantMapOutputWithContext ¶ added in v2.4.1
func (i GrantMap) ToGrantMapOutputWithContext(ctx context.Context) GrantMapOutput
type GrantMapInput ¶ added in v2.4.1
type GrantMapInput interface { pulumi.Input ToGrantMapOutput() GrantMapOutput ToGrantMapOutputWithContext(context.Context) GrantMapOutput }
GrantMapInput is an input type that accepts GrantMap and GrantMapOutput values. You can construct a concrete instance of `GrantMapInput` via:
GrantMap{ "key": GrantArgs{...} }
type GrantMapOutput ¶ added in v2.4.1
type GrantMapOutput struct{ *pulumi.OutputState }
func (GrantMapOutput) ElementType ¶ added in v2.4.1
func (GrantMapOutput) ElementType() reflect.Type
func (GrantMapOutput) MapIndex ¶ added in v2.4.1
func (o GrantMapOutput) MapIndex(k pulumi.StringInput) GrantOutput
func (GrantMapOutput) ToGrantMapOutput ¶ added in v2.4.1
func (o GrantMapOutput) ToGrantMapOutput() GrantMapOutput
func (GrantMapOutput) ToGrantMapOutputWithContext ¶ added in v2.4.1
func (o GrantMapOutput) ToGrantMapOutputWithContext(ctx context.Context) GrantMapOutput
type GrantOutput ¶ added in v2.3.2
type GrantOutput struct {
*pulumi.OutputState
}
func (GrantOutput) ElementType ¶ added in v2.3.2
func (GrantOutput) ElementType() reflect.Type
func (GrantOutput) ToGrantOutput ¶ added in v2.3.2
func (o GrantOutput) ToGrantOutput() GrantOutput
func (GrantOutput) ToGrantOutputWithContext ¶ added in v2.3.2
func (o GrantOutput) ToGrantOutputWithContext(ctx context.Context) GrantOutput
func (GrantOutput) ToGrantPtrOutput ¶ added in v2.4.1
func (o GrantOutput) ToGrantPtrOutput() GrantPtrOutput
func (GrantOutput) ToGrantPtrOutputWithContext ¶ added in v2.4.1
func (o GrantOutput) ToGrantPtrOutputWithContext(ctx context.Context) GrantPtrOutput
type GrantPtrInput ¶ added in v2.4.1
type GrantPtrInput interface { pulumi.Input ToGrantPtrOutput() GrantPtrOutput ToGrantPtrOutputWithContext(ctx context.Context) GrantPtrOutput }
type GrantPtrOutput ¶ added in v2.4.1
type GrantPtrOutput struct {
*pulumi.OutputState
}
func (GrantPtrOutput) ElementType ¶ added in v2.4.1
func (GrantPtrOutput) ElementType() reflect.Type
func (GrantPtrOutput) ToGrantPtrOutput ¶ added in v2.4.1
func (o GrantPtrOutput) ToGrantPtrOutput() GrantPtrOutput
func (GrantPtrOutput) ToGrantPtrOutputWithContext ¶ added in v2.4.1
func (o GrantPtrOutput) ToGrantPtrOutputWithContext(ctx context.Context) GrantPtrOutput
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.
func (*Provider) ElementType ¶ added in v2.3.2
func (*Provider) ToProviderOutput ¶ added in v2.3.2
func (i *Provider) ToProviderOutput() ProviderOutput
func (*Provider) ToProviderOutputWithContext ¶ added in v2.3.2
func (i *Provider) ToProviderOutputWithContext(ctx context.Context) ProviderOutput
func (*Provider) ToProviderPtrOutput ¶ added in v2.4.1
func (i *Provider) ToProviderPtrOutput() ProviderPtrOutput
func (*Provider) ToProviderPtrOutputWithContext ¶ added in v2.4.1
func (i *Provider) ToProviderPtrOutputWithContext(ctx context.Context) ProviderPtrOutput
type ProviderArgs ¶
type ProviderArgs struct { AuthenticationPlugin pulumi.StringPtrInput Endpoint pulumi.StringInput MaxConnLifetimeSec pulumi.IntPtrInput MaxOpenConns pulumi.IntPtrInput Password pulumi.StringPtrInput Proxy pulumi.StringPtrInput Tls pulumi.StringPtrInput Username pulumi.StringInput }
The set of arguments for constructing a Provider resource.
func (ProviderArgs) ElementType ¶
func (ProviderArgs) ElementType() reflect.Type
type ProviderInput ¶ added in v2.3.2
type ProviderInput interface { pulumi.Input ToProviderOutput() ProviderOutput ToProviderOutputWithContext(ctx context.Context) ProviderOutput }
type ProviderOutput ¶ added in v2.3.2
type ProviderOutput struct {
*pulumi.OutputState
}
func (ProviderOutput) ElementType ¶ added in v2.3.2
func (ProviderOutput) ElementType() reflect.Type
func (ProviderOutput) ToProviderOutput ¶ added in v2.3.2
func (o ProviderOutput) ToProviderOutput() ProviderOutput
func (ProviderOutput) ToProviderOutputWithContext ¶ added in v2.3.2
func (o ProviderOutput) ToProviderOutputWithContext(ctx context.Context) ProviderOutput
func (ProviderOutput) ToProviderPtrOutput ¶ added in v2.4.1
func (o ProviderOutput) ToProviderPtrOutput() ProviderPtrOutput
func (ProviderOutput) ToProviderPtrOutputWithContext ¶ added in v2.4.1
func (o ProviderOutput) ToProviderPtrOutputWithContext(ctx context.Context) ProviderPtrOutput
type ProviderPtrInput ¶ added in v2.4.1
type ProviderPtrInput interface { pulumi.Input ToProviderPtrOutput() ProviderPtrOutput ToProviderPtrOutputWithContext(ctx context.Context) ProviderPtrOutput }
type ProviderPtrOutput ¶ added in v2.4.1
type ProviderPtrOutput struct {
*pulumi.OutputState
}
func (ProviderPtrOutput) ElementType ¶ added in v2.4.1
func (ProviderPtrOutput) ElementType() reflect.Type
func (ProviderPtrOutput) ToProviderPtrOutput ¶ added in v2.4.1
func (o ProviderPtrOutput) ToProviderPtrOutput() ProviderPtrOutput
func (ProviderPtrOutput) ToProviderPtrOutputWithContext ¶ added in v2.4.1
func (o ProviderPtrOutput) ToProviderPtrOutputWithContext(ctx context.Context) ProviderPtrOutput
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.
## Example Usage
```go package main
import (
"github.com/pulumi/pulumi-mysql/sdk/v2/go/mysql" "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { _, err := mysql.NewRole(ctx, "developer", nil) if err != nil { return err } return nil }) }
```
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).
func NewRole ¶
func NewRole(ctx *pulumi.Context, name string, args *RoleArgs, opts ...pulumi.ResourceOption) (*Role, error)
NewRole registers a new resource with the given unique name, arguments, and options.
func (*Role) ElementType ¶ added in v2.3.2
func (*Role) ToRoleOutput ¶ added in v2.3.2
func (i *Role) ToRoleOutput() RoleOutput
func (*Role) ToRoleOutputWithContext ¶ added in v2.3.2
func (i *Role) ToRoleOutputWithContext(ctx context.Context) RoleOutput
func (*Role) ToRolePtrOutput ¶ added in v2.4.1
func (i *Role) ToRolePtrOutput() RolePtrOutput
func (*Role) ToRolePtrOutputWithContext ¶ added in v2.4.1
func (i *Role) ToRolePtrOutputWithContext(ctx context.Context) RolePtrOutput
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 RoleArray ¶ added in v2.4.1
type RoleArray []RoleInput
func (RoleArray) ElementType ¶ added in v2.4.1
func (RoleArray) ToRoleArrayOutput ¶ added in v2.4.1
func (i RoleArray) ToRoleArrayOutput() RoleArrayOutput
func (RoleArray) ToRoleArrayOutputWithContext ¶ added in v2.4.1
func (i RoleArray) ToRoleArrayOutputWithContext(ctx context.Context) RoleArrayOutput
type RoleArrayInput ¶ added in v2.4.1
type RoleArrayInput interface { pulumi.Input ToRoleArrayOutput() RoleArrayOutput ToRoleArrayOutputWithContext(context.Context) RoleArrayOutput }
RoleArrayInput is an input type that accepts RoleArray and RoleArrayOutput values. You can construct a concrete instance of `RoleArrayInput` via:
RoleArray{ RoleArgs{...} }
type RoleArrayOutput ¶ added in v2.4.1
type RoleArrayOutput struct{ *pulumi.OutputState }
func (RoleArrayOutput) ElementType ¶ added in v2.4.1
func (RoleArrayOutput) ElementType() reflect.Type
func (RoleArrayOutput) Index ¶ added in v2.4.1
func (o RoleArrayOutput) Index(i pulumi.IntInput) RoleOutput
func (RoleArrayOutput) ToRoleArrayOutput ¶ added in v2.4.1
func (o RoleArrayOutput) ToRoleArrayOutput() RoleArrayOutput
func (RoleArrayOutput) ToRoleArrayOutputWithContext ¶ added in v2.4.1
func (o RoleArrayOutput) ToRoleArrayOutputWithContext(ctx context.Context) RoleArrayOutput
type RoleInput ¶ added in v2.3.2
type RoleInput interface { pulumi.Input ToRoleOutput() RoleOutput ToRoleOutputWithContext(ctx context.Context) RoleOutput }
type RoleMap ¶ added in v2.4.1
func (RoleMap) ElementType ¶ added in v2.4.1
func (RoleMap) ToRoleMapOutput ¶ added in v2.4.1
func (i RoleMap) ToRoleMapOutput() RoleMapOutput
func (RoleMap) ToRoleMapOutputWithContext ¶ added in v2.4.1
func (i RoleMap) ToRoleMapOutputWithContext(ctx context.Context) RoleMapOutput
type RoleMapInput ¶ added in v2.4.1
type RoleMapInput interface { pulumi.Input ToRoleMapOutput() RoleMapOutput ToRoleMapOutputWithContext(context.Context) RoleMapOutput }
RoleMapInput is an input type that accepts RoleMap and RoleMapOutput values. You can construct a concrete instance of `RoleMapInput` via:
RoleMap{ "key": RoleArgs{...} }
type RoleMapOutput ¶ added in v2.4.1
type RoleMapOutput struct{ *pulumi.OutputState }
func (RoleMapOutput) ElementType ¶ added in v2.4.1
func (RoleMapOutput) ElementType() reflect.Type
func (RoleMapOutput) MapIndex ¶ added in v2.4.1
func (o RoleMapOutput) MapIndex(k pulumi.StringInput) RoleOutput
func (RoleMapOutput) ToRoleMapOutput ¶ added in v2.4.1
func (o RoleMapOutput) ToRoleMapOutput() RoleMapOutput
func (RoleMapOutput) ToRoleMapOutputWithContext ¶ added in v2.4.1
func (o RoleMapOutput) ToRoleMapOutputWithContext(ctx context.Context) RoleMapOutput
type RoleOutput ¶ added in v2.3.2
type RoleOutput struct {
*pulumi.OutputState
}
func (RoleOutput) ElementType ¶ added in v2.3.2
func (RoleOutput) ElementType() reflect.Type
func (RoleOutput) ToRoleOutput ¶ added in v2.3.2
func (o RoleOutput) ToRoleOutput() RoleOutput
func (RoleOutput) ToRoleOutputWithContext ¶ added in v2.3.2
func (o RoleOutput) ToRoleOutputWithContext(ctx context.Context) RoleOutput
func (RoleOutput) ToRolePtrOutput ¶ added in v2.4.1
func (o RoleOutput) ToRolePtrOutput() RolePtrOutput
func (RoleOutput) ToRolePtrOutputWithContext ¶ added in v2.4.1
func (o RoleOutput) ToRolePtrOutputWithContext(ctx context.Context) RolePtrOutput
type RolePtrInput ¶ added in v2.4.1
type RolePtrInput interface { pulumi.Input ToRolePtrOutput() RolePtrOutput ToRolePtrOutputWithContext(ctx context.Context) RolePtrOutput }
type RolePtrOutput ¶ added in v2.4.1
type RolePtrOutput struct {
*pulumi.OutputState
}
func (RolePtrOutput) ElementType ¶ added in v2.4.1
func (RolePtrOutput) ElementType() reflect.Type
func (RolePtrOutput) ToRolePtrOutput ¶ added in v2.4.1
func (o RolePtrOutput) ToRolePtrOutput() RolePtrOutput
func (RolePtrOutput) ToRolePtrOutputWithContext ¶ added in v2.4.1
func (o RolePtrOutput) ToRolePtrOutputWithContext(ctx context.Context) RolePtrOutput
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`. // // Deprecated: Please use plaintext_password instead 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.
## Examples
### Basic Usage
```go package main
import (
"github.com/pulumi/pulumi-mysql/sdk/v2/go/mysql" "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { _, err := mysql.NewUser(ctx, "jdoe", &mysql.UserArgs{ Host: pulumi.String("example.com"), PlaintextPassword: pulumi.String("password"), User: pulumi.String("jdoe"), }) if err != nil { return err } return nil }) }
```
### Example Usage with an Authentication Plugin
```go package main
import (
"github.com/pulumi/pulumi-mysql/sdk/v2/go/mysql" "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { _, err := mysql.NewUser(ctx, "nologin", &mysql.UserArgs{ AuthPlugin: pulumi.String("mysql_no_login"), Host: pulumi.String("example.com"), User: pulumi.String("nologin"), }) if err != nil { return err } return nil }) }
```
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).
func NewUser ¶
func NewUser(ctx *pulumi.Context, name string, args *UserArgs, opts ...pulumi.ResourceOption) (*User, error)
NewUser registers a new resource with the given unique name, arguments, and options.
func (*User) ElementType ¶ added in v2.3.2
func (*User) ToUserOutput ¶ added in v2.3.2
func (i *User) ToUserOutput() UserOutput
func (*User) ToUserOutputWithContext ¶ added in v2.3.2
func (i *User) ToUserOutputWithContext(ctx context.Context) UserOutput
func (*User) ToUserPtrOutput ¶ added in v2.4.1
func (i *User) ToUserPtrOutput() UserPtrOutput
func (*User) ToUserPtrOutputWithContext ¶ added in v2.4.1
func (i *User) ToUserPtrOutputWithContext(ctx context.Context) UserPtrOutput
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`. // // Deprecated: Please use plaintext_password instead 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 UserArray ¶ added in v2.4.1
type UserArray []UserInput
func (UserArray) ElementType ¶ added in v2.4.1
func (UserArray) ToUserArrayOutput ¶ added in v2.4.1
func (i UserArray) ToUserArrayOutput() UserArrayOutput
func (UserArray) ToUserArrayOutputWithContext ¶ added in v2.4.1
func (i UserArray) ToUserArrayOutputWithContext(ctx context.Context) UserArrayOutput
type UserArrayInput ¶ added in v2.4.1
type UserArrayInput interface { pulumi.Input ToUserArrayOutput() UserArrayOutput ToUserArrayOutputWithContext(context.Context) UserArrayOutput }
UserArrayInput is an input type that accepts UserArray and UserArrayOutput values. You can construct a concrete instance of `UserArrayInput` via:
UserArray{ UserArgs{...} }
type UserArrayOutput ¶ added in v2.4.1
type UserArrayOutput struct{ *pulumi.OutputState }
func (UserArrayOutput) ElementType ¶ added in v2.4.1
func (UserArrayOutput) ElementType() reflect.Type
func (UserArrayOutput) Index ¶ added in v2.4.1
func (o UserArrayOutput) Index(i pulumi.IntInput) UserOutput
func (UserArrayOutput) ToUserArrayOutput ¶ added in v2.4.1
func (o UserArrayOutput) ToUserArrayOutput() UserArrayOutput
func (UserArrayOutput) ToUserArrayOutputWithContext ¶ added in v2.4.1
func (o UserArrayOutput) ToUserArrayOutputWithContext(ctx context.Context) UserArrayOutput
type UserInput ¶ added in v2.3.2
type UserInput interface { pulumi.Input ToUserOutput() UserOutput ToUserOutputWithContext(ctx context.Context) UserOutput }
type UserMap ¶ added in v2.4.1
func (UserMap) ElementType ¶ added in v2.4.1
func (UserMap) ToUserMapOutput ¶ added in v2.4.1
func (i UserMap) ToUserMapOutput() UserMapOutput
func (UserMap) ToUserMapOutputWithContext ¶ added in v2.4.1
func (i UserMap) ToUserMapOutputWithContext(ctx context.Context) UserMapOutput
type UserMapInput ¶ added in v2.4.1
type UserMapInput interface { pulumi.Input ToUserMapOutput() UserMapOutput ToUserMapOutputWithContext(context.Context) UserMapOutput }
UserMapInput is an input type that accepts UserMap and UserMapOutput values. You can construct a concrete instance of `UserMapInput` via:
UserMap{ "key": UserArgs{...} }
type UserMapOutput ¶ added in v2.4.1
type UserMapOutput struct{ *pulumi.OutputState }
func (UserMapOutput) ElementType ¶ added in v2.4.1
func (UserMapOutput) ElementType() reflect.Type
func (UserMapOutput) MapIndex ¶ added in v2.4.1
func (o UserMapOutput) MapIndex(k pulumi.StringInput) UserOutput
func (UserMapOutput) ToUserMapOutput ¶ added in v2.4.1
func (o UserMapOutput) ToUserMapOutput() UserMapOutput
func (UserMapOutput) ToUserMapOutputWithContext ¶ added in v2.4.1
func (o UserMapOutput) ToUserMapOutputWithContext(ctx context.Context) UserMapOutput
type UserOutput ¶ added in v2.3.2
type UserOutput struct {
*pulumi.OutputState
}
func (UserOutput) ElementType ¶ added in v2.3.2
func (UserOutput) ElementType() reflect.Type
func (UserOutput) ToUserOutput ¶ added in v2.3.2
func (o UserOutput) ToUserOutput() UserOutput
func (UserOutput) ToUserOutputWithContext ¶ added in v2.3.2
func (o UserOutput) ToUserOutputWithContext(ctx context.Context) UserOutput
func (UserOutput) ToUserPtrOutput ¶ added in v2.4.1
func (o UserOutput) ToUserPtrOutput() UserPtrOutput
func (UserOutput) ToUserPtrOutputWithContext ¶ added in v2.4.1
func (o UserOutput) ToUserPtrOutputWithContext(ctx context.Context) UserPtrOutput
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"` }
The `UserPassword` resource sets and manages a password for a given user on a MySQL server.
> **NOTE on MySQL Passwords:** This resource conflicts with the `password`
argument for `User`. This resource uses PGP encryption to avoid storing unencrypted passwords in the provider state.
> **NOTE on How Passwords are Created:** This resource **automatically**
generates a **random** password. The password will be a random UUID.
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.
func (*UserPassword) ElementType ¶ added in v2.3.2
func (*UserPassword) ElementType() reflect.Type
func (*UserPassword) ToUserPasswordOutput ¶ added in v2.3.2
func (i *UserPassword) ToUserPasswordOutput() UserPasswordOutput
func (*UserPassword) ToUserPasswordOutputWithContext ¶ added in v2.3.2
func (i *UserPassword) ToUserPasswordOutputWithContext(ctx context.Context) UserPasswordOutput
func (*UserPassword) ToUserPasswordPtrOutput ¶ added in v2.4.1
func (i *UserPassword) ToUserPasswordPtrOutput() UserPasswordPtrOutput
func (*UserPassword) ToUserPasswordPtrOutputWithContext ¶ added in v2.4.1
func (i *UserPassword) ToUserPasswordPtrOutputWithContext(ctx context.Context) UserPasswordPtrOutput
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 UserPasswordArray ¶ added in v2.4.1
type UserPasswordArray []UserPasswordInput
func (UserPasswordArray) ElementType ¶ added in v2.4.1
func (UserPasswordArray) ElementType() reflect.Type
func (UserPasswordArray) ToUserPasswordArrayOutput ¶ added in v2.4.1
func (i UserPasswordArray) ToUserPasswordArrayOutput() UserPasswordArrayOutput
func (UserPasswordArray) ToUserPasswordArrayOutputWithContext ¶ added in v2.4.1
func (i UserPasswordArray) ToUserPasswordArrayOutputWithContext(ctx context.Context) UserPasswordArrayOutput
type UserPasswordArrayInput ¶ added in v2.4.1
type UserPasswordArrayInput interface { pulumi.Input ToUserPasswordArrayOutput() UserPasswordArrayOutput ToUserPasswordArrayOutputWithContext(context.Context) UserPasswordArrayOutput }
UserPasswordArrayInput is an input type that accepts UserPasswordArray and UserPasswordArrayOutput values. You can construct a concrete instance of `UserPasswordArrayInput` via:
UserPasswordArray{ UserPasswordArgs{...} }
type UserPasswordArrayOutput ¶ added in v2.4.1
type UserPasswordArrayOutput struct{ *pulumi.OutputState }
func (UserPasswordArrayOutput) ElementType ¶ added in v2.4.1
func (UserPasswordArrayOutput) ElementType() reflect.Type
func (UserPasswordArrayOutput) Index ¶ added in v2.4.1
func (o UserPasswordArrayOutput) Index(i pulumi.IntInput) UserPasswordOutput
func (UserPasswordArrayOutput) ToUserPasswordArrayOutput ¶ added in v2.4.1
func (o UserPasswordArrayOutput) ToUserPasswordArrayOutput() UserPasswordArrayOutput
func (UserPasswordArrayOutput) ToUserPasswordArrayOutputWithContext ¶ added in v2.4.1
func (o UserPasswordArrayOutput) ToUserPasswordArrayOutputWithContext(ctx context.Context) UserPasswordArrayOutput
type UserPasswordInput ¶ added in v2.3.2
type UserPasswordInput interface { pulumi.Input ToUserPasswordOutput() UserPasswordOutput ToUserPasswordOutputWithContext(ctx context.Context) UserPasswordOutput }
type UserPasswordMap ¶ added in v2.4.1
type UserPasswordMap map[string]UserPasswordInput
func (UserPasswordMap) ElementType ¶ added in v2.4.1
func (UserPasswordMap) ElementType() reflect.Type
func (UserPasswordMap) ToUserPasswordMapOutput ¶ added in v2.4.1
func (i UserPasswordMap) ToUserPasswordMapOutput() UserPasswordMapOutput
func (UserPasswordMap) ToUserPasswordMapOutputWithContext ¶ added in v2.4.1
func (i UserPasswordMap) ToUserPasswordMapOutputWithContext(ctx context.Context) UserPasswordMapOutput
type UserPasswordMapInput ¶ added in v2.4.1
type UserPasswordMapInput interface { pulumi.Input ToUserPasswordMapOutput() UserPasswordMapOutput ToUserPasswordMapOutputWithContext(context.Context) UserPasswordMapOutput }
UserPasswordMapInput is an input type that accepts UserPasswordMap and UserPasswordMapOutput values. You can construct a concrete instance of `UserPasswordMapInput` via:
UserPasswordMap{ "key": UserPasswordArgs{...} }
type UserPasswordMapOutput ¶ added in v2.4.1
type UserPasswordMapOutput struct{ *pulumi.OutputState }
func (UserPasswordMapOutput) ElementType ¶ added in v2.4.1
func (UserPasswordMapOutput) ElementType() reflect.Type
func (UserPasswordMapOutput) MapIndex ¶ added in v2.4.1
func (o UserPasswordMapOutput) MapIndex(k pulumi.StringInput) UserPasswordOutput
func (UserPasswordMapOutput) ToUserPasswordMapOutput ¶ added in v2.4.1
func (o UserPasswordMapOutput) ToUserPasswordMapOutput() UserPasswordMapOutput
func (UserPasswordMapOutput) ToUserPasswordMapOutputWithContext ¶ added in v2.4.1
func (o UserPasswordMapOutput) ToUserPasswordMapOutputWithContext(ctx context.Context) UserPasswordMapOutput
type UserPasswordOutput ¶ added in v2.3.2
type UserPasswordOutput struct {
*pulumi.OutputState
}
func (UserPasswordOutput) ElementType ¶ added in v2.3.2
func (UserPasswordOutput) ElementType() reflect.Type
func (UserPasswordOutput) ToUserPasswordOutput ¶ added in v2.3.2
func (o UserPasswordOutput) ToUserPasswordOutput() UserPasswordOutput
func (UserPasswordOutput) ToUserPasswordOutputWithContext ¶ added in v2.3.2
func (o UserPasswordOutput) ToUserPasswordOutputWithContext(ctx context.Context) UserPasswordOutput
func (UserPasswordOutput) ToUserPasswordPtrOutput ¶ added in v2.4.1
func (o UserPasswordOutput) ToUserPasswordPtrOutput() UserPasswordPtrOutput
func (UserPasswordOutput) ToUserPasswordPtrOutputWithContext ¶ added in v2.4.1
func (o UserPasswordOutput) ToUserPasswordPtrOutputWithContext(ctx context.Context) UserPasswordPtrOutput
type UserPasswordPtrInput ¶ added in v2.4.1
type UserPasswordPtrInput interface { pulumi.Input ToUserPasswordPtrOutput() UserPasswordPtrOutput ToUserPasswordPtrOutputWithContext(ctx context.Context) UserPasswordPtrOutput }
type UserPasswordPtrOutput ¶ added in v2.4.1
type UserPasswordPtrOutput struct {
*pulumi.OutputState
}
func (UserPasswordPtrOutput) ElementType ¶ added in v2.4.1
func (UserPasswordPtrOutput) ElementType() reflect.Type
func (UserPasswordPtrOutput) ToUserPasswordPtrOutput ¶ added in v2.4.1
func (o UserPasswordPtrOutput) ToUserPasswordPtrOutput() UserPasswordPtrOutput
func (UserPasswordPtrOutput) ToUserPasswordPtrOutputWithContext ¶ added in v2.4.1
func (o UserPasswordPtrOutput) ToUserPasswordPtrOutputWithContext(ctx context.Context) UserPasswordPtrOutput
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 UserPtrInput ¶ added in v2.4.1
type UserPtrInput interface { pulumi.Input ToUserPtrOutput() UserPtrOutput ToUserPtrOutputWithContext(ctx context.Context) UserPtrOutput }
type UserPtrOutput ¶ added in v2.4.1
type UserPtrOutput struct {
*pulumi.OutputState
}
func (UserPtrOutput) ElementType ¶ added in v2.4.1
func (UserPtrOutput) ElementType() reflect.Type
func (UserPtrOutput) ToUserPtrOutput ¶ added in v2.4.1
func (o UserPtrOutput) ToUserPtrOutput() UserPtrOutput
func (UserPtrOutput) ToUserPtrOutputWithContext ¶ added in v2.4.1
func (o UserPtrOutput) ToUserPtrOutputWithContext(ctx context.Context) UserPtrOutput
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`. // // Deprecated: Please use plaintext_password instead 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 }