1. Packages
  2. OVH
  3. API Docs
  4. CloudProjectDatabase
  5. PostgresSqlUser
OVHCloud v2.0.7 published on Wednesday, Mar 19, 2025 by OVHcloud

ovh.CloudProjectDatabase.PostgresSqlUser

Explore with Pulumi AI

Import

OVHcloud Managed PostgreSQL clusters users can be imported using the service_name, cluster_id and id of the user, separated by “/” E.g.,

bash

$ pulumi import ovh:CloudProjectDatabase/postgresSqlUser:PostgresSqlUser my_user service_name/cluster_id/id
Copy

Create PostgresSqlUser Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new PostgresSqlUser(name: string, args: PostgresSqlUserArgs, opts?: CustomResourceOptions);
@overload
def PostgresSqlUser(resource_name: str,
                    args: PostgresSqlUserArgs,
                    opts: Optional[ResourceOptions] = None)

@overload
def PostgresSqlUser(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    cluster_id: Optional[str] = None,
                    service_name: Optional[str] = None,
                    name: Optional[str] = None,
                    password_reset: Optional[str] = None,
                    roles: Optional[Sequence[str]] = None)
func NewPostgresSqlUser(ctx *Context, name string, args PostgresSqlUserArgs, opts ...ResourceOption) (*PostgresSqlUser, error)
public PostgresSqlUser(string name, PostgresSqlUserArgs args, CustomResourceOptions? opts = null)
public PostgresSqlUser(String name, PostgresSqlUserArgs args)
public PostgresSqlUser(String name, PostgresSqlUserArgs args, CustomResourceOptions options)
type: ovh:CloudProjectDatabase:PostgresSqlUser
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. PostgresSqlUserArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. PostgresSqlUserArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. PostgresSqlUserArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. PostgresSqlUserArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. PostgresSqlUserArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var postgresSqlUserResource = new Ovh.CloudProjectDatabase.PostgresSqlUser("postgresSqlUserResource", new()
{
    ClusterId = "string",
    ServiceName = "string",
    Name = "string",
    PasswordReset = "string",
    Roles = new[]
    {
        "string",
    },
});
Copy
example, err := CloudProjectDatabase.NewPostgresSqlUser(ctx, "postgresSqlUserResource", &CloudProjectDatabase.PostgresSqlUserArgs{
	ClusterId:     pulumi.String("string"),
	ServiceName:   pulumi.String("string"),
	Name:          pulumi.String("string"),
	PasswordReset: pulumi.String("string"),
	Roles: pulumi.StringArray{
		pulumi.String("string"),
	},
})
Copy
var postgresSqlUserResource = new PostgresSqlUser("postgresSqlUserResource", PostgresSqlUserArgs.builder()
    .clusterId("string")
    .serviceName("string")
    .name("string")
    .passwordReset("string")
    .roles("string")
    .build());
Copy
postgres_sql_user_resource = ovh.cloud_project_database.PostgresSqlUser("postgresSqlUserResource",
    cluster_id="string",
    service_name="string",
    name="string",
    password_reset="string",
    roles=["string"])
Copy
const postgresSqlUserResource = new ovh.cloudprojectdatabase.PostgresSqlUser("postgresSqlUserResource", {
    clusterId: "string",
    serviceName: "string",
    name: "string",
    passwordReset: "string",
    roles: ["string"],
});
Copy
type: ovh:CloudProjectDatabase:PostgresSqlUser
properties:
    clusterId: string
    name: string
    passwordReset: string
    roles:
        - string
    serviceName: string
Copy

PostgresSqlUser Resource Properties

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

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The PostgresSqlUser resource accepts the following input properties:

ClusterId
This property is required.
Changes to this property will trigger replacement.
string
Cluster ID.
ServiceName
This property is required.
Changes to this property will trigger replacement.
string
The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
Name Changes to this property will trigger replacement. string
Name of the user. A user named "avnadmin" is mapped with already created admin user and reset his password instead of creating a new user.
PasswordReset string
Arbitrary string to change to trigger a password update
Roles List<string>
Roles the user belongs to. Available roles:
ClusterId
This property is required.
Changes to this property will trigger replacement.
string
Cluster ID.
ServiceName
This property is required.
Changes to this property will trigger replacement.
string
The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
Name Changes to this property will trigger replacement. string
Name of the user. A user named "avnadmin" is mapped with already created admin user and reset his password instead of creating a new user.
PasswordReset string
Arbitrary string to change to trigger a password update
Roles []string
Roles the user belongs to. Available roles:
clusterId
This property is required.
Changes to this property will trigger replacement.
String
Cluster ID.
serviceName
This property is required.
Changes to this property will trigger replacement.
String
The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
name Changes to this property will trigger replacement. String
Name of the user. A user named "avnadmin" is mapped with already created admin user and reset his password instead of creating a new user.
passwordReset String
Arbitrary string to change to trigger a password update
roles List<String>
Roles the user belongs to. Available roles:
clusterId
This property is required.
Changes to this property will trigger replacement.
string
Cluster ID.
serviceName
This property is required.
Changes to this property will trigger replacement.
string
The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
name Changes to this property will trigger replacement. string
Name of the user. A user named "avnadmin" is mapped with already created admin user and reset his password instead of creating a new user.
passwordReset string
Arbitrary string to change to trigger a password update
roles string[]
Roles the user belongs to. Available roles:
cluster_id
This property is required.
Changes to this property will trigger replacement.
str
Cluster ID.
service_name
This property is required.
Changes to this property will trigger replacement.
str
The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
name Changes to this property will trigger replacement. str
Name of the user. A user named "avnadmin" is mapped with already created admin user and reset his password instead of creating a new user.
password_reset str
Arbitrary string to change to trigger a password update
roles Sequence[str]
Roles the user belongs to. Available roles:
clusterId
This property is required.
Changes to this property will trigger replacement.
String
Cluster ID.
serviceName
This property is required.
Changes to this property will trigger replacement.
String
The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
name Changes to this property will trigger replacement. String
Name of the user. A user named "avnadmin" is mapped with already created admin user and reset his password instead of creating a new user.
passwordReset String
Arbitrary string to change to trigger a password update
roles List<String>
Roles the user belongs to. Available roles:

Outputs

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

CreatedAt string
Date of the creation of the user.
Id string
The provider-assigned unique ID for this managed resource.
Password string
(Sensitive) Password of the user.
Status string
Current status of the user.
CreatedAt string
Date of the creation of the user.
Id string
The provider-assigned unique ID for this managed resource.
Password string
(Sensitive) Password of the user.
Status string
Current status of the user.
createdAt String
Date of the creation of the user.
id String
The provider-assigned unique ID for this managed resource.
password String
(Sensitive) Password of the user.
status String
Current status of the user.
createdAt string
Date of the creation of the user.
id string
The provider-assigned unique ID for this managed resource.
password string
(Sensitive) Password of the user.
status string
Current status of the user.
created_at str
Date of the creation of the user.
id str
The provider-assigned unique ID for this managed resource.
password str
(Sensitive) Password of the user.
status str
Current status of the user.
createdAt String
Date of the creation of the user.
id String
The provider-assigned unique ID for this managed resource.
password String
(Sensitive) Password of the user.
status String
Current status of the user.

Look up Existing PostgresSqlUser Resource

Get an existing PostgresSqlUser 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?: PostgresSqlUserState, opts?: CustomResourceOptions): PostgresSqlUser
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        cluster_id: Optional[str] = None,
        created_at: Optional[str] = None,
        name: Optional[str] = None,
        password: Optional[str] = None,
        password_reset: Optional[str] = None,
        roles: Optional[Sequence[str]] = None,
        service_name: Optional[str] = None,
        status: Optional[str] = None) -> PostgresSqlUser
func GetPostgresSqlUser(ctx *Context, name string, id IDInput, state *PostgresSqlUserState, opts ...ResourceOption) (*PostgresSqlUser, error)
public static PostgresSqlUser Get(string name, Input<string> id, PostgresSqlUserState? state, CustomResourceOptions? opts = null)
public static PostgresSqlUser get(String name, Output<String> id, PostgresSqlUserState state, CustomResourceOptions options)
resources:  _:    type: ovh:CloudProjectDatabase:PostgresSqlUser    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
ClusterId Changes to this property will trigger replacement. string
Cluster ID.
CreatedAt string
Date of the creation of the user.
Name Changes to this property will trigger replacement. string
Name of the user. A user named "avnadmin" is mapped with already created admin user and reset his password instead of creating a new user.
Password string
(Sensitive) Password of the user.
PasswordReset string
Arbitrary string to change to trigger a password update
Roles List<string>
Roles the user belongs to. Available roles:
ServiceName Changes to this property will trigger replacement. string
The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
Status string
Current status of the user.
ClusterId Changes to this property will trigger replacement. string
Cluster ID.
CreatedAt string
Date of the creation of the user.
Name Changes to this property will trigger replacement. string
Name of the user. A user named "avnadmin" is mapped with already created admin user and reset his password instead of creating a new user.
Password string
(Sensitive) Password of the user.
PasswordReset string
Arbitrary string to change to trigger a password update
Roles []string
Roles the user belongs to. Available roles:
ServiceName Changes to this property will trigger replacement. string
The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
Status string
Current status of the user.
clusterId Changes to this property will trigger replacement. String
Cluster ID.
createdAt String
Date of the creation of the user.
name Changes to this property will trigger replacement. String
Name of the user. A user named "avnadmin" is mapped with already created admin user and reset his password instead of creating a new user.
password String
(Sensitive) Password of the user.
passwordReset String
Arbitrary string to change to trigger a password update
roles List<String>
Roles the user belongs to. Available roles:
serviceName Changes to this property will trigger replacement. String
The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
status String
Current status of the user.
clusterId Changes to this property will trigger replacement. string
Cluster ID.
createdAt string
Date of the creation of the user.
name Changes to this property will trigger replacement. string
Name of the user. A user named "avnadmin" is mapped with already created admin user and reset his password instead of creating a new user.
password string
(Sensitive) Password of the user.
passwordReset string
Arbitrary string to change to trigger a password update
roles string[]
Roles the user belongs to. Available roles:
serviceName Changes to this property will trigger replacement. string
The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
status string
Current status of the user.
cluster_id Changes to this property will trigger replacement. str
Cluster ID.
created_at str
Date of the creation of the user.
name Changes to this property will trigger replacement. str
Name of the user. A user named "avnadmin" is mapped with already created admin user and reset his password instead of creating a new user.
password str
(Sensitive) Password of the user.
password_reset str
Arbitrary string to change to trigger a password update
roles Sequence[str]
Roles the user belongs to. Available roles:
service_name Changes to this property will trigger replacement. str
The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
status str
Current status of the user.
clusterId Changes to this property will trigger replacement. String
Cluster ID.
createdAt String
Date of the creation of the user.
name Changes to this property will trigger replacement. String
Name of the user. A user named "avnadmin" is mapped with already created admin user and reset his password instead of creating a new user.
password String
(Sensitive) Password of the user.
passwordReset String
Arbitrary string to change to trigger a password update
roles List<String>
Roles the user belongs to. Available roles:
serviceName Changes to this property will trigger replacement. String
The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
status String
Current status of the user.

Package Details

Repository
ovh ovh/pulumi-ovh
License
Apache-2.0
Notes
This Pulumi package is based on the ovh Terraform Provider.