UserArgs

data class UserArgs(val deletionPolicy: Output<String>? = null, val host: Output<String>? = null, val instance: Output<String>? = null, val name: Output<String>? = null, val password: Output<String>? = null, val passwordPolicy: Output<UserPasswordPolicyArgs>? = null, val project: Output<String>? = null, val type: Output<String>? = null) : ConvertibleToJava<UserArgs>

Creates a new Google SQL User on a Google SQL User Instance. For more information, see the official documentation, or the JSON API.

Note: All arguments including the username and password will be stored in the raw state as plain-text.

Import

SQL users for MySQL databases can be imported using the project, instance, host and name, e.g.

$ pulumi import gcp:sql/user:User users my-project/main-instance/my-domain.com/me

SQL users for PostgreSQL databases can be imported using the project, instance and name, e.g.

$ pulumi import gcp:sql/user:User users my-project/main-instance/me

Constructors

Link copied to clipboard
constructor(deletionPolicy: Output<String>? = null, host: Output<String>? = null, instance: Output<String>? = null, name: Output<String>? = null, password: Output<String>? = null, passwordPolicy: Output<UserPasswordPolicyArgs>? = null, project: Output<String>? = null, type: Output<String>? = null)

Properties

Link copied to clipboard
val deletionPolicy: Output<String>? = null

The deletion policy for the user. Setting ABANDON allows the resource to be abandoned rather than deleted. This is useful for Postgres, where users cannot be deleted from the API if they have been granted SQL roles. Possible values are: ABANDON.

Link copied to clipboard
val host: Output<String>? = null

The host the user can connect from. This is only supported for BUILT_IN users in MySQL instances. Don't set this field for PostgreSQL and SQL Server instances. Can be an IP address. Changing this forces a new resource to be created.

Link copied to clipboard
val instance: Output<String>? = null

The name of the Cloud SQL instance. Changing this forces a new resource to be created.

Link copied to clipboard
val name: Output<String>? = null

The name of the user. Changing this forces a new resource to be created.

Link copied to clipboard
val password: Output<String>? = null

The password for the user. Can be updated. For Postgres instances this is a Required field, unless type is set to either CLOUD_IAM_USER or CLOUD_IAM_SERVICE_ACCOUNT. Don't set this field for CLOUD_IAM_USER and CLOUD_IAM_SERVICE_ACCOUNT user types for any Cloud SQL instance.

Link copied to clipboard
Link copied to clipboard
val project: Output<String>? = null

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

Link copied to clipboard
val type: Output<String>? = null

The user type. It determines the method to authenticate the user during login. The default is the database's built-in user type. Flags include "BUILT_IN", "CLOUD_IAM_USER", or "CLOUD_IAM_SERVICE_ACCOUNT".

Functions

Link copied to clipboard
open override fun toJava(): UserArgs