User

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

Create a User Resource

new User(name: string, args: UserArgs, opts?: CustomResourceOptions);
def User(resource_name, opts=None, host=None, instance=None, name=None, password=None, project=None, __props__=None);
func NewUser(ctx *Context, name string, args UserArgs, opts ...ResourceOption) (*User, error)
public User(string name, UserArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args UserArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args UserArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args UserArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

User Resource Properties

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

Inputs

The User resource accepts the following input properties:

Instance string

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

Host string

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

Name string

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

Password string

The password for the user. Can be updated. For Postgres instances this is a Required field.

Project string

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

Instance string

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

Host string

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

Name string

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

Password string

The password for the user. Can be updated. For Postgres instances this is a Required field.

Project string

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

instance string

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

host string

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

name string

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

password string

The password for the user. Can be updated. For Postgres instances this is a Required field.

project string

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

instance str

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

host str

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

name str

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

password str

The password for the user. Can be updated. For Postgres instances this is a Required field.

project str

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

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.

Look up an Existing User Resource

Get an existing User 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?: UserState, opts?: CustomResourceOptions): User
static get(resource_name, id, opts=None, host=None, instance=None, name=None, password=None, project=None, __props__=None);
func GetUser(ctx *Context, name string, id IDInput, state *UserState, opts ...ResourceOption) (*User, error)
public static User Get(string name, Input<string> id, UserState? state, CustomResourceOptions? opts = null)
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.

The following state arguments are supported:

Host string

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

Instance string

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

Name string

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

Password string

The password for the user. Can be updated. For Postgres instances this is a Required field.

Project string

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

Host string

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

Instance string

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

Name string

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

Password string

The password for the user. Can be updated. For Postgres instances this is a Required field.

Project string

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

host string

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

instance string

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

name string

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

password string

The password for the user. Can be updated. For Postgres instances this is a Required field.

project string

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

host str

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

instance str

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

name str

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

password str

The password for the user. Can be updated. For Postgres instances this is a Required field.

project str

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

Package Details

Repository
https://github.com/pulumi/pulumi-gcp
License
Apache-2.0
Notes
This Pulumi package is based on the google-beta Terraform Provider.