ovh.CloudProject.User
Explore with Pulumi AI
Creates a user in a public cloud project.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as ovh from "@ovhcloud/pulumi-ovh";
const user1 = new ovh.cloudproject.User("user1", {serviceName: "XXX"});
import pulumi
import pulumi_ovh as ovh
user1 = ovh.cloud_project.User("user1", service_name="XXX")
package main
import (
"github.com/ovh/pulumi-ovh/sdk/go/ovh/CloudProject"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := CloudProject.NewUser(ctx, "user1", &CloudProject.UserArgs{
ServiceName: pulumi.String("XXX"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ovh = Pulumi.Ovh;
return await Deployment.RunAsync(() =>
{
var user1 = new Ovh.CloudProject.User("user1", new()
{
ServiceName = "XXX",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ovh.CloudProject.User;
import com.pulumi.ovh.CloudProject.UserArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var user1 = new User("user1", UserArgs.builder()
.serviceName("XXX")
.build());
}
}
resources:
user1:
type: ovh:CloudProject:User
properties:
serviceName: XXX
Create User Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new User(name: string, args: UserArgs, opts?: CustomResourceOptions);
@overload
def User(resource_name: str,
args: UserArgs,
opts: Optional[ResourceOptions] = None)
@overload
def User(resource_name: str,
opts: Optional[ResourceOptions] = None,
service_name: Optional[str] = None,
description: Optional[str] = None,
openstack_rc: Optional[Mapping[str, str]] = None,
role_name: Optional[str] = None,
role_names: Optional[Sequence[str]] = None)
func NewUser(ctx *Context, name string, args UserArgs, opts ...ResourceOption) (*User, error)
public User(string name, UserArgs args, CustomResourceOptions? opts = null)
type: ovh:CloudProject:User
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- 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.
- args UserArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control 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.
- name String
- The unique name of the resource.
- args UserArgs
- 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 userResource = new Ovh.CloudProject.User("userResource", new()
{
ServiceName = "string",
Description = "string",
OpenstackRc =
{
{ "string", "string" },
},
RoleName = "string",
RoleNames = new[]
{
"string",
},
});
example, err := CloudProject.NewUser(ctx, "userResource", &CloudProject.UserArgs{
ServiceName: pulumi.String("string"),
Description: pulumi.String("string"),
OpenstackRc: pulumi.StringMap{
"string": pulumi.String("string"),
},
RoleName: pulumi.String("string"),
RoleNames: pulumi.StringArray{
pulumi.String("string"),
},
})
var userResource = new User("userResource", UserArgs.builder()
.serviceName("string")
.description("string")
.openstackRc(Map.of("string", "string"))
.roleName("string")
.roleNames("string")
.build());
user_resource = ovh.cloud_project.User("userResource",
service_name="string",
description="string",
openstack_rc={
"string": "string",
},
role_name="string",
role_names=["string"])
const userResource = new ovh.cloudproject.User("userResource", {
serviceName: "string",
description: "string",
openstackRc: {
string: "string",
},
roleName: "string",
roleNames: ["string"],
});
type: ovh:CloudProject:User
properties:
description: string
openstackRc:
string: string
roleName: string
roleNames:
- string
serviceName: string
User 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 User resource accepts the following input properties:
- Service
Name string - The id of the public cloud project. If omitted,
the
OVH_CLOUD_PROJECT_SERVICE
environment variable is used. - Description string
- A description associated with the user.
- Openstack
Rc Dictionary<string, string> - a convenient map representing an openstack_rc file. Note: no password nor sensitive token is set in this map.
- Role
Name string - The name of a role. See
role_names
. - Role
Names List<string> - A list of role names. Values can be:
- administrator,
- ai_training_operator
- ai_training_read
- authentication
- backup_operator
- compute_operator
- image_operator
- infrastructure_supervisor
- network_operator
- network_security_operator
- objectstore_operator
- volume_operator
- Service
Name string - The id of the public cloud project. If omitted,
the
OVH_CLOUD_PROJECT_SERVICE
environment variable is used. - Description string
- A description associated with the user.
- Openstack
Rc map[string]string - a convenient map representing an openstack_rc file. Note: no password nor sensitive token is set in this map.
- Role
Name string - The name of a role. See
role_names
. - Role
Names []string - A list of role names. Values can be:
- administrator,
- ai_training_operator
- ai_training_read
- authentication
- backup_operator
- compute_operator
- image_operator
- infrastructure_supervisor
- network_operator
- network_security_operator
- objectstore_operator
- volume_operator
- service
Name String - The id of the public cloud project. If omitted,
the
OVH_CLOUD_PROJECT_SERVICE
environment variable is used. - description String
- A description associated with the user.
- openstack
Rc Map<String,String> - a convenient map representing an openstack_rc file. Note: no password nor sensitive token is set in this map.
- role
Name String - The name of a role. See
role_names
. - role
Names List<String> - A list of role names. Values can be:
- administrator,
- ai_training_operator
- ai_training_read
- authentication
- backup_operator
- compute_operator
- image_operator
- infrastructure_supervisor
- network_operator
- network_security_operator
- objectstore_operator
- volume_operator
- service
Name string - The id of the public cloud project. If omitted,
the
OVH_CLOUD_PROJECT_SERVICE
environment variable is used. - description string
- A description associated with the user.
- openstack
Rc {[key: string]: string} - a convenient map representing an openstack_rc file. Note: no password nor sensitive token is set in this map.
- role
Name string - The name of a role. See
role_names
. - role
Names string[] - A list of role names. Values can be:
- administrator,
- ai_training_operator
- ai_training_read
- authentication
- backup_operator
- compute_operator
- image_operator
- infrastructure_supervisor
- network_operator
- network_security_operator
- objectstore_operator
- volume_operator
- service_
name str - The id of the public cloud project. If omitted,
the
OVH_CLOUD_PROJECT_SERVICE
environment variable is used. - description str
- A description associated with the user.
- openstack_
rc Mapping[str, str] - a convenient map representing an openstack_rc file. Note: no password nor sensitive token is set in this map.
- role_
name str - The name of a role. See
role_names
. - role_
names Sequence[str] - A list of role names. Values can be:
- administrator,
- ai_training_operator
- ai_training_read
- authentication
- backup_operator
- compute_operator
- image_operator
- infrastructure_supervisor
- network_operator
- network_security_operator
- objectstore_operator
- volume_operator
- service
Name String - The id of the public cloud project. If omitted,
the
OVH_CLOUD_PROJECT_SERVICE
environment variable is used. - description String
- A description associated with the user.
- openstack
Rc Map<String> - a convenient map representing an openstack_rc file. Note: no password nor sensitive token is set in this map.
- role
Name String - The name of a role. See
role_names
. - role
Names List<String> - A list of role names. Values can be:
- administrator,
- ai_training_operator
- ai_training_read
- authentication
- backup_operator
- compute_operator
- image_operator
- infrastructure_supervisor
- network_operator
- network_security_operator
- objectstore_operator
- volume_operator
Outputs
All input properties are implicitly available as output properties. Additionally, the User resource produces the following output properties:
- Creation
Date string - the date the user was created.
- Id string
- The provider-assigned unique ID for this managed resource.
- Password string
- (Sensitive) the password generated for the user. The password can be used with the Openstack API. This attribute is sensitive and will only be retrieve once during creation.
- Roles
List<User
Role> - A list of roles associated with the user.
- Status string
- the status of the user. should be normally set to 'ok'.
- Username string
- the username generated for the user. This username can be used with the Openstack API.
- Creation
Date string - the date the user was created.
- Id string
- The provider-assigned unique ID for this managed resource.
- Password string
- (Sensitive) the password generated for the user. The password can be used with the Openstack API. This attribute is sensitive and will only be retrieve once during creation.
- Roles
[]User
Role - A list of roles associated with the user.
- Status string
- the status of the user. should be normally set to 'ok'.
- Username string
- the username generated for the user. This username can be used with the Openstack API.
- creation
Date String - the date the user was created.
- id String
- The provider-assigned unique ID for this managed resource.
- password String
- (Sensitive) the password generated for the user. The password can be used with the Openstack API. This attribute is sensitive and will only be retrieve once during creation.
- roles
List<User
Role> - A list of roles associated with the user.
- status String
- the status of the user. should be normally set to 'ok'.
- username String
- the username generated for the user. This username can be used with the Openstack API.
- creation
Date string - the date the user was created.
- id string
- The provider-assigned unique ID for this managed resource.
- password string
- (Sensitive) the password generated for the user. The password can be used with the Openstack API. This attribute is sensitive and will only be retrieve once during creation.
- roles
User
Role[] - A list of roles associated with the user.
- status string
- the status of the user. should be normally set to 'ok'.
- username string
- the username generated for the user. This username can be used with the Openstack API.
- creation_
date str - the date the user was created.
- id str
- The provider-assigned unique ID for this managed resource.
- password str
- (Sensitive) the password generated for the user. The password can be used with the Openstack API. This attribute is sensitive and will only be retrieve once during creation.
- roles
Sequence[cloudproject.
User Role] - A list of roles associated with the user.
- status str
- the status of the user. should be normally set to 'ok'.
- username str
- the username generated for the user. This username can be used with the Openstack API.
- creation
Date String - the date the user was created.
- id String
- The provider-assigned unique ID for this managed resource.
- password String
- (Sensitive) the password generated for the user. The password can be used with the Openstack API. This attribute is sensitive and will only be retrieve once during creation.
- roles List<Property Map>
- A list of roles associated with the user.
- status String
- the status of the user. should be normally set to 'ok'.
- username String
- the username generated for the user. This username can be used with the Openstack API.
Look up 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
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
creation_date: Optional[str] = None,
description: Optional[str] = None,
openstack_rc: Optional[Mapping[str, str]] = None,
password: Optional[str] = None,
role_name: Optional[str] = None,
role_names: Optional[Sequence[str]] = None,
roles: Optional[Sequence[_cloudproject.UserRoleArgs]] = None,
service_name: Optional[str] = None,
status: Optional[str] = None,
username: Optional[str] = None) -> User
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)
public static User get(String name, Output<String> id, UserState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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.
- 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.
- Creation
Date string - the date the user was created.
- Description string
- A description associated with the user.
- Openstack
Rc Dictionary<string, string> - a convenient map representing an openstack_rc file. Note: no password nor sensitive token is set in this map.
- Password string
- (Sensitive) the password generated for the user. The password can be used with the Openstack API. This attribute is sensitive and will only be retrieve once during creation.
- Role
Name string - The name of a role. See
role_names
. - Role
Names List<string> - A list of role names. Values can be:
- administrator,
- ai_training_operator
- ai_training_read
- authentication
- backup_operator
- compute_operator
- image_operator
- infrastructure_supervisor
- network_operator
- network_security_operator
- objectstore_operator
- volume_operator
- Roles
List<User
Role> - A list of roles associated with the user.
- Service
Name string - The id of the public cloud project. If omitted,
the
OVH_CLOUD_PROJECT_SERVICE
environment variable is used. - Status string
- the status of the user. should be normally set to 'ok'.
- Username string
- the username generated for the user. This username can be used with the Openstack API.
- Creation
Date string - the date the user was created.
- Description string
- A description associated with the user.
- Openstack
Rc map[string]string - a convenient map representing an openstack_rc file. Note: no password nor sensitive token is set in this map.
- Password string
- (Sensitive) the password generated for the user. The password can be used with the Openstack API. This attribute is sensitive and will only be retrieve once during creation.
- Role
Name string - The name of a role. See
role_names
. - Role
Names []string - A list of role names. Values can be:
- administrator,
- ai_training_operator
- ai_training_read
- authentication
- backup_operator
- compute_operator
- image_operator
- infrastructure_supervisor
- network_operator
- network_security_operator
- objectstore_operator
- volume_operator
- Roles
[]User
Role Args - A list of roles associated with the user.
- Service
Name string - The id of the public cloud project. If omitted,
the
OVH_CLOUD_PROJECT_SERVICE
environment variable is used. - Status string
- the status of the user. should be normally set to 'ok'.
- Username string
- the username generated for the user. This username can be used with the Openstack API.
- creation
Date String - the date the user was created.
- description String
- A description associated with the user.
- openstack
Rc Map<String,String> - a convenient map representing an openstack_rc file. Note: no password nor sensitive token is set in this map.
- password String
- (Sensitive) the password generated for the user. The password can be used with the Openstack API. This attribute is sensitive and will only be retrieve once during creation.
- role
Name String - The name of a role. See
role_names
. - role
Names List<String> - A list of role names. Values can be:
- administrator,
- ai_training_operator
- ai_training_read
- authentication
- backup_operator
- compute_operator
- image_operator
- infrastructure_supervisor
- network_operator
- network_security_operator
- objectstore_operator
- volume_operator
- roles
List<User
Role> - A list of roles associated with the user.
- service
Name String - The id of the public cloud project. If omitted,
the
OVH_CLOUD_PROJECT_SERVICE
environment variable is used. - status String
- the status of the user. should be normally set to 'ok'.
- username String
- the username generated for the user. This username can be used with the Openstack API.
- creation
Date string - the date the user was created.
- description string
- A description associated with the user.
- openstack
Rc {[key: string]: string} - a convenient map representing an openstack_rc file. Note: no password nor sensitive token is set in this map.
- password string
- (Sensitive) the password generated for the user. The password can be used with the Openstack API. This attribute is sensitive and will only be retrieve once during creation.
- role
Name string - The name of a role. See
role_names
. - role
Names string[] - A list of role names. Values can be:
- administrator,
- ai_training_operator
- ai_training_read
- authentication
- backup_operator
- compute_operator
- image_operator
- infrastructure_supervisor
- network_operator
- network_security_operator
- objectstore_operator
- volume_operator
- roles
User
Role[] - A list of roles associated with the user.
- service
Name string - The id of the public cloud project. If omitted,
the
OVH_CLOUD_PROJECT_SERVICE
environment variable is used. - status string
- the status of the user. should be normally set to 'ok'.
- username string
- the username generated for the user. This username can be used with the Openstack API.
- creation_
date str - the date the user was created.
- description str
- A description associated with the user.
- openstack_
rc Mapping[str, str] - a convenient map representing an openstack_rc file. Note: no password nor sensitive token is set in this map.
- password str
- (Sensitive) the password generated for the user. The password can be used with the Openstack API. This attribute is sensitive and will only be retrieve once during creation.
- role_
name str - The name of a role. See
role_names
. - role_
names Sequence[str] - A list of role names. Values can be:
- administrator,
- ai_training_operator
- ai_training_read
- authentication
- backup_operator
- compute_operator
- image_operator
- infrastructure_supervisor
- network_operator
- network_security_operator
- objectstore_operator
- volume_operator
- roles
Sequence[cloudproject.
User Role Args] - A list of roles associated with the user.
- service_
name str - The id of the public cloud project. If omitted,
the
OVH_CLOUD_PROJECT_SERVICE
environment variable is used. - status str
- the status of the user. should be normally set to 'ok'.
- username str
- the username generated for the user. This username can be used with the Openstack API.
- creation
Date String - the date the user was created.
- description String
- A description associated with the user.
- openstack
Rc Map<String> - a convenient map representing an openstack_rc file. Note: no password nor sensitive token is set in this map.
- password String
- (Sensitive) the password generated for the user. The password can be used with the Openstack API. This attribute is sensitive and will only be retrieve once during creation.
- role
Name String - The name of a role. See
role_names
. - role
Names List<String> - A list of role names. Values can be:
- administrator,
- ai_training_operator
- ai_training_read
- authentication
- backup_operator
- compute_operator
- image_operator
- infrastructure_supervisor
- network_operator
- network_security_operator
- objectstore_operator
- volume_operator
- roles List<Property Map>
- A list of roles associated with the user.
- service
Name String - The id of the public cloud project. If omitted,
the
OVH_CLOUD_PROJECT_SERVICE
environment variable is used. - status String
- the status of the user. should be normally set to 'ok'.
- username String
- the username generated for the user. This username can be used with the Openstack API.
Supporting Types
UserRole, UserRoleArgs
- Description string
- A description associated with the user.
- Id string
- id of the role
- Name string
- name of the role
- Permissions List<string>
- list of permissions associated with the role
- Description string
- A description associated with the user.
- Id string
- id of the role
- Name string
- name of the role
- Permissions []string
- list of permissions associated with the role
- description String
- A description associated with the user.
- id String
- id of the role
- name String
- name of the role
- permissions List<String>
- list of permissions associated with the role
- description string
- A description associated with the user.
- id string
- id of the role
- name string
- name of the role
- permissions string[]
- list of permissions associated with the role
- description str
- A description associated with the user.
- id str
- id of the role
- name str
- name of the role
- permissions Sequence[str]
- list of permissions associated with the role
- description String
- A description associated with the user.
- id String
- id of the role
- name String
- name of the role
- permissions List<String>
- list of permissions associated with the role
Package Details
- Repository
- ovh ovh/pulumi-ovh
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
ovh
Terraform Provider.