1. Packages
  2. MySQL
  3. API Docs
  4. UserPassword
MySQL v3.2.3 published on Tuesday, Feb 27, 2024 by Pulumi

mysql.UserPassword

Explore with Pulumi AI

mysql logo
MySQL v3.2.3 published on Tuesday, Feb 27, 2024 by Pulumi

    The mysql.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 mysql.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.

    Create UserPassword Resource

    new UserPassword(name: string, args: UserPasswordArgs, opts?: CustomResourceOptions);
    @overload
    def UserPassword(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     host: Optional[str] = None,
                     pgp_key: Optional[str] = None,
                     user: Optional[str] = None)
    @overload
    def UserPassword(resource_name: str,
                     args: UserPasswordArgs,
                     opts: Optional[ResourceOptions] = None)
    func NewUserPassword(ctx *Context, name string, args UserPasswordArgs, opts ...ResourceOption) (*UserPassword, error)
    public UserPassword(string name, UserPasswordArgs args, CustomResourceOptions? opts = null)
    public UserPassword(String name, UserPasswordArgs args)
    public UserPassword(String name, UserPasswordArgs args, CustomResourceOptions options)
    
    type: mysql:UserPassword
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args UserPasswordArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args UserPasswordArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args UserPasswordArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args UserPasswordArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args UserPasswordArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    UserPassword Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The UserPassword resource accepts the following input properties:

    PgpKey string
    Either a base-64 encoded PGP public key, or a keybase username in the form keybase:some_person_that_exists.
    User string
    The IAM user to associate with this access key.
    Host string
    The source host of the user. Defaults to localhost.
    PgpKey string
    Either a base-64 encoded PGP public key, or a keybase username in the form keybase:some_person_that_exists.
    User string
    The IAM user to associate with this access key.
    Host string
    The source host of the user. Defaults to localhost.
    pgpKey String
    Either a base-64 encoded PGP public key, or a keybase username in the form keybase:some_person_that_exists.
    user String
    The IAM user to associate with this access key.
    host String
    The source host of the user. Defaults to localhost.
    pgpKey string
    Either a base-64 encoded PGP public key, or a keybase username in the form keybase:some_person_that_exists.
    user string
    The IAM user to associate with this access key.
    host string
    The source host of the user. Defaults to localhost.
    pgp_key str
    Either a base-64 encoded PGP public key, or a keybase username in the form keybase:some_person_that_exists.
    user str
    The IAM user to associate with this access key.
    host str
    The source host of the user. Defaults to localhost.
    pgpKey String
    Either a base-64 encoded PGP public key, or a keybase username in the form keybase:some_person_that_exists.
    user String
    The IAM user to associate with this access key.
    host String
    The source host of the user. Defaults to localhost.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the UserPassword resource produces the following output properties:

    EncryptedPassword string
    The encrypted password, base64 encoded.
    Id string
    The provider-assigned unique ID for this managed resource.
    KeyFingerprint string
    The fingerprint of the PGP key used to encrypt the password
    EncryptedPassword string
    The encrypted password, base64 encoded.
    Id string
    The provider-assigned unique ID for this managed resource.
    KeyFingerprint string
    The fingerprint of the PGP key used to encrypt the password
    encryptedPassword String
    The encrypted password, base64 encoded.
    id String
    The provider-assigned unique ID for this managed resource.
    keyFingerprint String
    The fingerprint of the PGP key used to encrypt the password
    encryptedPassword string
    The encrypted password, base64 encoded.
    id string
    The provider-assigned unique ID for this managed resource.
    keyFingerprint string
    The fingerprint of the PGP key used to encrypt the password
    encrypted_password str
    The encrypted password, base64 encoded.
    id str
    The provider-assigned unique ID for this managed resource.
    key_fingerprint str
    The fingerprint of the PGP key used to encrypt the password
    encryptedPassword String
    The encrypted password, base64 encoded.
    id String
    The provider-assigned unique ID for this managed resource.
    keyFingerprint String
    The fingerprint of the PGP key used to encrypt the password

    Look up Existing UserPassword Resource

    Get an existing UserPassword resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: UserPasswordState, opts?: CustomResourceOptions): UserPassword
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            encrypted_password: Optional[str] = None,
            host: Optional[str] = None,
            key_fingerprint: Optional[str] = None,
            pgp_key: Optional[str] = None,
            user: Optional[str] = None) -> UserPassword
    func GetUserPassword(ctx *Context, name string, id IDInput, state *UserPasswordState, opts ...ResourceOption) (*UserPassword, error)
    public static UserPassword Get(string name, Input<string> id, UserPasswordState? state, CustomResourceOptions? opts = null)
    public static UserPassword get(String name, Output<String> id, UserPasswordState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    EncryptedPassword string
    The encrypted password, base64 encoded.
    Host string
    The source host of the user. Defaults to localhost.
    KeyFingerprint string
    The fingerprint of the PGP key used to encrypt the password
    PgpKey string
    Either a base-64 encoded PGP public key, or a keybase username in the form keybase:some_person_that_exists.
    User string
    The IAM user to associate with this access key.
    EncryptedPassword string
    The encrypted password, base64 encoded.
    Host string
    The source host of the user. Defaults to localhost.
    KeyFingerprint string
    The fingerprint of the PGP key used to encrypt the password
    PgpKey string
    Either a base-64 encoded PGP public key, or a keybase username in the form keybase:some_person_that_exists.
    User string
    The IAM user to associate with this access key.
    encryptedPassword String
    The encrypted password, base64 encoded.
    host String
    The source host of the user. Defaults to localhost.
    keyFingerprint String
    The fingerprint of the PGP key used to encrypt the password
    pgpKey String
    Either a base-64 encoded PGP public key, or a keybase username in the form keybase:some_person_that_exists.
    user String
    The IAM user to associate with this access key.
    encryptedPassword string
    The encrypted password, base64 encoded.
    host string
    The source host of the user. Defaults to localhost.
    keyFingerprint string
    The fingerprint of the PGP key used to encrypt the password
    pgpKey string
    Either a base-64 encoded PGP public key, or a keybase username in the form keybase:some_person_that_exists.
    user string
    The IAM user to associate with this access key.
    encrypted_password str
    The encrypted password, base64 encoded.
    host str
    The source host of the user. Defaults to localhost.
    key_fingerprint str
    The fingerprint of the PGP key used to encrypt the password
    pgp_key str
    Either a base-64 encoded PGP public key, or a keybase username in the form keybase:some_person_that_exists.
    user str
    The IAM user to associate with this access key.
    encryptedPassword String
    The encrypted password, base64 encoded.
    host String
    The source host of the user. Defaults to localhost.
    keyFingerprint String
    The fingerprint of the PGP key used to encrypt the password
    pgpKey String
    Either a base-64 encoded PGP public key, or a keybase username in the form keybase:some_person_that_exists.
    user String
    The IAM user to associate with this access key.

    Package Details

    Repository
    MySQL pulumi/pulumi-mysql
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the mysql Terraform Provider.
    mysql logo
    MySQL v3.2.3 published on Tuesday, Feb 27, 2024 by Pulumi