User

class User : KotlinCustomResource

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

Properties

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

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>

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 id: Output<String>
Link copied to clipboard
val instance: Output<String>

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

Link copied to clipboard
val name: Output<String>

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

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

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>

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 pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val type: Output<String>?

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".

Link copied to clipboard
val urn: Output<String>