User
The rabbitmq.User
resource creates and manages a user.
Note: All arguments including username and password will be stored in the raw state as plain-text. Read more about sensitive data in state.
Example Usage
using Pulumi;
using RabbitMQ = Pulumi.RabbitMQ;
class MyStack : Stack
{
public MyStack()
{
var test = new RabbitMQ.User("test", new RabbitMQ.UserArgs
{
Password = "foobar",
Tags =
{
"administrator",
"management",
},
});
}
}
package main
import (
"github.com/pulumi/pulumi-rabbitmq/sdk/v2/go/rabbitmq"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := rabbitmq.NewUser(ctx, "test", &rabbitmq.UserArgs{
Password: pulumi.String("foobar"),
Tags: pulumi.StringArray{
pulumi.String("administrator"),
pulumi.String("management"),
},
})
if err != nil {
return err
}
return nil
})
}
import pulumi
import pulumi_rabbitmq as rabbitmq
test = rabbitmq.User("test",
password="foobar",
tags=[
"administrator",
"management",
])
import * as pulumi from "@pulumi/pulumi";
import * as rabbitmq from "@pulumi/rabbitmq";
const test = new rabbitmq.User("test", {
password: "foobar",
tags: [
"administrator",
"management",
],
});
Create a User Resource
new User(name: string, args: UserArgs, opts?: CustomResourceOptions);
def User(resource_name: str, opts: Optional[ResourceOptions] = None, name: Optional[str] = None, password: Optional[str] = None, tags: 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)
- 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:
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
@staticmethod
def get(resource_name: str, id: str, opts: Optional[ResourceOptions] = None, name: Optional[str] = None, password: Optional[str] = None, tags: Optional[Sequence[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)
- 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:
Import
Users can be imported using the name
, e.g.
$ pulumi import rabbitmq:index/user:User test mctest
Package Details
- Repository
- https://github.com/pulumi/pulumi-rabbitmq
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
rabbitmq
Terraform Provider.