UserArgs class
The set of arguments for User. The set of arguments for User.
Constructors
-
UserArgs({Input<
List< ? databaseRoles, Input<String> ?>String?> ? deletionPolicy, Input<String?> ? host, required Input<String> instance, Input<String?> ? name, Input<String?> ? password, Input<UserPasswordPolicy?> ? passwordPolicy, Input<String?> ? passwordWo, Input<int?> ? passwordWoVersion, Input<String?> ? project, Input<String?> ? type}) -
Creates a new UserArgs.
databaseRolesA list of database roles to be assigned to the user.deletionPolicyWhether Terraform will be prevented from destroying the resource. Defaults to "DELETE".hostThe host the user can connect from. This is only supportedinstanceThe name of the Cloud SQL instance. Changing thisnameThe name of the user. Changing this forces a new resourcepasswordThe password for the user. Can be updated. For PostgrespasswordPolicyOptional.passwordWoNOTE: This field is write-only and its value will not be updated in state as part of read operations.passwordWoVersionAn integer value used to trigger an update forpasswordWo. This property should be incremented when updatingpasswordWo. For more info see updating write-only arguments.projectThe ID of the project in which the resource belongs. If ittypeThe user type. It determines the method to authenticate theconst -
UserArgs.fromMap(Map<
String, dynamic> map) -
factory
Properties
-
databaseRoles
→ Input<
List< ?String> ?> -
A list of database roles to be assigned to the user.
This option is only available for MySQL 8+ and PostgreSQL instances. You
can include predefined Cloud SQL roles, like cloudsqlsuperuser, or your
own custom roles. Custom roles must be created in the database before
you can assign them. You can create roles using the CREATE ROLE
statement for both MySQL and PostgreSQL.
Note: This property is write-only and will not be read from the API.
Caution: Existing database roles will be overwriten with new values from this field.
final
-
deletionPolicy
→ Input<
String?> ? -
Whether Terraform will be prevented from destroying the resource. Defaults to "DELETE".
When a 'terraform destroy' or 'pulumi up' would delete the resource,
the command will fail if this field is set to "PREVENT" in Terraform state.
When set to "ABANDON", the command will remove the resource from Terraform
management without updating or deleting the resource in the API. This is useful
for Postgres, where users cannot be deleted from the API if they have been granted SQL roles.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
host
→ Input<
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.
final
-
instance
→ Input<
String> -
The name of the Cloud SQL instance. Changing this
forces a new resource to be created.
final
-
name
→ Input<
String?> ? -
The name of the user. Changing this forces a new resource
to be created.
final
-
password
→ Input<
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.
final
-
passwordPolicy
→ Input<
UserPasswordPolicy?> ? -
final
-
passwordWo
→ Input<
String?> ? -
NOTE: This field is write-only and its value will not be updated in state as part of read operations.
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.
final
-
passwordWoVersion
→ Input<
int?> ? -
An integer value used to trigger an update for
passwordWo. This property should be incremented when updatingpasswordWo. For more info see updating write-only arguments.final -
project
→ Input<
String?> ? -
The ID of the project in which the resource belongs. If it
is not provided, the provider project is used.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
type
→ Input<
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", "CLOUD_IAM_SERVICE_ACCOUNT", "CLOUD_IAM_GROUP",
"CLOUD_IAM_GROUP_USER" and "CLOUD_IAM_GROUP_SERVICE_ACCOUNT" for
Postgres
and MySQL.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toMap(
) → Map< String, dynamic> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited