tencentcloud.TdmqRabbitmqUser
Explore with Pulumi AI
Provides a resource to create a tdmq rabbitmq_user
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const zones = tencentcloud.getAvailabilityZones({
name: "ap-guangzhou-6",
});
// create vpc
const vpc = new tencentcloud.Vpc("vpc", {cidrBlock: "10.0.0.0/16"});
// create vpc subnet
const subnet = new tencentcloud.Subnet("subnet", {
vpcId: vpc.vpcId,
availabilityZone: "ap-guangzhou-6",
cidrBlock: "10.0.20.0/28",
isMulticast: false,
});
// create rabbitmq instance
const exampleTdmqRabbitmqVipInstance = new tencentcloud.TdmqRabbitmqVipInstance("exampleTdmqRabbitmqVipInstance", {
zoneIds: [zones.then(zones => zones.zones?.[0]?.id)],
vpcId: vpc.vpcId,
subnetId: subnet.subnetId,
clusterName: "tf-example-rabbitmq-vip-instance",
nodeSpec: "rabbit-vip-basic-1",
nodeNum: 1,
storageSize: 200,
enableCreateDefaultHaMirrorQueue: false,
autoRenewFlag: true,
timeSpan: 1,
});
// create rabbitmq user
const exampleTdmqRabbitmqUser = new tencentcloud.TdmqRabbitmqUser("exampleTdmqRabbitmqUser", {
instanceId: exampleTdmqRabbitmqVipInstance.tdmqRabbitmqVipInstanceId,
user: "tf-example-user",
password: "$Password",
description: "desc.",
tags: [
"management",
"monitoring",
"example",
],
maxConnections: 3,
maxChannels: 3,
});
import pulumi
import pulumi_tencentcloud as tencentcloud
zones = tencentcloud.get_availability_zones(name="ap-guangzhou-6")
# create vpc
vpc = tencentcloud.Vpc("vpc", cidr_block="10.0.0.0/16")
# create vpc subnet
subnet = tencentcloud.Subnet("subnet",
vpc_id=vpc.vpc_id,
availability_zone="ap-guangzhou-6",
cidr_block="10.0.20.0/28",
is_multicast=False)
# create rabbitmq instance
example_tdmq_rabbitmq_vip_instance = tencentcloud.TdmqRabbitmqVipInstance("exampleTdmqRabbitmqVipInstance",
zone_ids=[zones.zones[0].id],
vpc_id=vpc.vpc_id,
subnet_id=subnet.subnet_id,
cluster_name="tf-example-rabbitmq-vip-instance",
node_spec="rabbit-vip-basic-1",
node_num=1,
storage_size=200,
enable_create_default_ha_mirror_queue=False,
auto_renew_flag=True,
time_span=1)
# create rabbitmq user
example_tdmq_rabbitmq_user = tencentcloud.TdmqRabbitmqUser("exampleTdmqRabbitmqUser",
instance_id=example_tdmq_rabbitmq_vip_instance.tdmq_rabbitmq_vip_instance_id,
user="tf-example-user",
password="$Password",
description="desc.",
tags=[
"management",
"monitoring",
"example",
],
max_connections=3,
max_channels=3)
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
zones, err := tencentcloud.GetAvailabilityZones(ctx, &tencentcloud.GetAvailabilityZonesArgs{
Name: pulumi.StringRef("ap-guangzhou-6"),
}, nil)
if err != nil {
return err
}
// create vpc
vpc, err := tencentcloud.NewVpc(ctx, "vpc", &tencentcloud.VpcArgs{
CidrBlock: pulumi.String("10.0.0.0/16"),
})
if err != nil {
return err
}
// create vpc subnet
subnet, err := tencentcloud.NewSubnet(ctx, "subnet", &tencentcloud.SubnetArgs{
VpcId: vpc.VpcId,
AvailabilityZone: pulumi.String("ap-guangzhou-6"),
CidrBlock: pulumi.String("10.0.20.0/28"),
IsMulticast: pulumi.Bool(false),
})
if err != nil {
return err
}
// create rabbitmq instance
exampleTdmqRabbitmqVipInstance, err := tencentcloud.NewTdmqRabbitmqVipInstance(ctx, "exampleTdmqRabbitmqVipInstance", &tencentcloud.TdmqRabbitmqVipInstanceArgs{
ZoneIds: pulumi.Float64Array{
pulumi.String(zones.Zones[0].Id),
},
VpcId: vpc.VpcId,
SubnetId: subnet.SubnetId,
ClusterName: pulumi.String("tf-example-rabbitmq-vip-instance"),
NodeSpec: pulumi.String("rabbit-vip-basic-1"),
NodeNum: pulumi.Float64(1),
StorageSize: pulumi.Float64(200),
EnableCreateDefaultHaMirrorQueue: pulumi.Bool(false),
AutoRenewFlag: pulumi.Bool(true),
TimeSpan: pulumi.Float64(1),
})
if err != nil {
return err
}
// create rabbitmq user
_, err = tencentcloud.NewTdmqRabbitmqUser(ctx, "exampleTdmqRabbitmqUser", &tencentcloud.TdmqRabbitmqUserArgs{
InstanceId: exampleTdmqRabbitmqVipInstance.TdmqRabbitmqVipInstanceId,
User: pulumi.String("tf-example-user"),
Password: pulumi.String("$Password"),
Description: pulumi.String("desc."),
Tags: pulumi.StringArray{
pulumi.String("management"),
pulumi.String("monitoring"),
pulumi.String("example"),
},
MaxConnections: pulumi.Float64(3),
MaxChannels: pulumi.Float64(3),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;
return await Deployment.RunAsync(() =>
{
var zones = Tencentcloud.GetAvailabilityZones.Invoke(new()
{
Name = "ap-guangzhou-6",
});
// create vpc
var vpc = new Tencentcloud.Vpc("vpc", new()
{
CidrBlock = "10.0.0.0/16",
});
// create vpc subnet
var subnet = new Tencentcloud.Subnet("subnet", new()
{
VpcId = vpc.VpcId,
AvailabilityZone = "ap-guangzhou-6",
CidrBlock = "10.0.20.0/28",
IsMulticast = false,
});
// create rabbitmq instance
var exampleTdmqRabbitmqVipInstance = new Tencentcloud.TdmqRabbitmqVipInstance("exampleTdmqRabbitmqVipInstance", new()
{
ZoneIds = new[]
{
zones.Apply(getAvailabilityZonesResult => getAvailabilityZonesResult.Zones[0]?.Id),
},
VpcId = vpc.VpcId,
SubnetId = subnet.SubnetId,
ClusterName = "tf-example-rabbitmq-vip-instance",
NodeSpec = "rabbit-vip-basic-1",
NodeNum = 1,
StorageSize = 200,
EnableCreateDefaultHaMirrorQueue = false,
AutoRenewFlag = true,
TimeSpan = 1,
});
// create rabbitmq user
var exampleTdmqRabbitmqUser = new Tencentcloud.TdmqRabbitmqUser("exampleTdmqRabbitmqUser", new()
{
InstanceId = exampleTdmqRabbitmqVipInstance.TdmqRabbitmqVipInstanceId,
User = "tf-example-user",
Password = "$Password",
Description = "desc.",
Tags = new[]
{
"management",
"monitoring",
"example",
},
MaxConnections = 3,
MaxChannels = 3,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.TencentcloudFunctions;
import com.pulumi.tencentcloud.inputs.GetAvailabilityZonesArgs;
import com.pulumi.tencentcloud.Vpc;
import com.pulumi.tencentcloud.VpcArgs;
import com.pulumi.tencentcloud.Subnet;
import com.pulumi.tencentcloud.SubnetArgs;
import com.pulumi.tencentcloud.TdmqRabbitmqVipInstance;
import com.pulumi.tencentcloud.TdmqRabbitmqVipInstanceArgs;
import com.pulumi.tencentcloud.TdmqRabbitmqUser;
import com.pulumi.tencentcloud.TdmqRabbitmqUserArgs;
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) {
final var zones = TencentcloudFunctions.getAvailabilityZones(GetAvailabilityZonesArgs.builder()
.name("ap-guangzhou-6")
.build());
// create vpc
var vpc = new Vpc("vpc", VpcArgs.builder()
.cidrBlock("10.0.0.0/16")
.build());
// create vpc subnet
var subnet = new Subnet("subnet", SubnetArgs.builder()
.vpcId(vpc.vpcId())
.availabilityZone("ap-guangzhou-6")
.cidrBlock("10.0.20.0/28")
.isMulticast(false)
.build());
// create rabbitmq instance
var exampleTdmqRabbitmqVipInstance = new TdmqRabbitmqVipInstance("exampleTdmqRabbitmqVipInstance", TdmqRabbitmqVipInstanceArgs.builder()
.zoneIds(zones.applyValue(getAvailabilityZonesResult -> getAvailabilityZonesResult.zones()[0].id()))
.vpcId(vpc.vpcId())
.subnetId(subnet.subnetId())
.clusterName("tf-example-rabbitmq-vip-instance")
.nodeSpec("rabbit-vip-basic-1")
.nodeNum(1)
.storageSize(200)
.enableCreateDefaultHaMirrorQueue(false)
.autoRenewFlag(true)
.timeSpan(1)
.build());
// create rabbitmq user
var exampleTdmqRabbitmqUser = new TdmqRabbitmqUser("exampleTdmqRabbitmqUser", TdmqRabbitmqUserArgs.builder()
.instanceId(exampleTdmqRabbitmqVipInstance.tdmqRabbitmqVipInstanceId())
.user("tf-example-user")
.password("$Password")
.description("desc.")
.tags(
"management",
"monitoring",
"example")
.maxConnections(3)
.maxChannels(3)
.build());
}
}
resources:
# create vpc
vpc:
type: tencentcloud:Vpc
properties:
cidrBlock: 10.0.0.0/16
# create vpc subnet
subnet:
type: tencentcloud:Subnet
properties:
vpcId: ${vpc.vpcId}
availabilityZone: ap-guangzhou-6
cidrBlock: 10.0.20.0/28
isMulticast: false
# create rabbitmq instance
exampleTdmqRabbitmqVipInstance:
type: tencentcloud:TdmqRabbitmqVipInstance
properties:
zoneIds:
- ${zones.zones[0].id}
vpcId: ${vpc.vpcId}
subnetId: ${subnet.subnetId}
clusterName: tf-example-rabbitmq-vip-instance
nodeSpec: rabbit-vip-basic-1
nodeNum: 1
storageSize: 200
enableCreateDefaultHaMirrorQueue: false
autoRenewFlag: true
timeSpan: 1
# create rabbitmq user
exampleTdmqRabbitmqUser:
type: tencentcloud:TdmqRabbitmqUser
properties:
instanceId: ${exampleTdmqRabbitmqVipInstance.tdmqRabbitmqVipInstanceId}
user: tf-example-user
password: $Password
description: desc.
tags:
- management
- monitoring
- example
maxConnections: 3
maxChannels: 3
variables:
zones:
fn::invoke:
function: tencentcloud:getAvailabilityZones
arguments:
name: ap-guangzhou-6
Create TdmqRabbitmqUser Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new TdmqRabbitmqUser(name: string, args: TdmqRabbitmqUserArgs, opts?: CustomResourceOptions);
@overload
def TdmqRabbitmqUser(resource_name: str,
args: TdmqRabbitmqUserArgs,
opts: Optional[ResourceOptions] = None)
@overload
def TdmqRabbitmqUser(resource_name: str,
opts: Optional[ResourceOptions] = None,
instance_id: Optional[str] = None,
password: Optional[str] = None,
user: Optional[str] = None,
description: Optional[str] = None,
max_channels: Optional[float] = None,
max_connections: Optional[float] = None,
tags: Optional[Sequence[str]] = None,
tdmq_rabbitmq_user_id: Optional[str] = None)
func NewTdmqRabbitmqUser(ctx *Context, name string, args TdmqRabbitmqUserArgs, opts ...ResourceOption) (*TdmqRabbitmqUser, error)
public TdmqRabbitmqUser(string name, TdmqRabbitmqUserArgs args, CustomResourceOptions? opts = null)
public TdmqRabbitmqUser(String name, TdmqRabbitmqUserArgs args)
public TdmqRabbitmqUser(String name, TdmqRabbitmqUserArgs args, CustomResourceOptions options)
type: tencentcloud:TdmqRabbitmqUser
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 TdmqRabbitmqUserArgs
- 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 TdmqRabbitmqUserArgs
- 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 TdmqRabbitmqUserArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args TdmqRabbitmqUserArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args TdmqRabbitmqUserArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
TdmqRabbitmqUser 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 TdmqRabbitmqUser resource accepts the following input properties:
- Instance
Id string - Cluster instance ID.
- Password string
- Password, used when logging in.
- User string
- Username, used when logging in.
- Description string
- Describe.
- Max
Channels double - The maximum number of channels for this user, if not filled in, there is no limit.
- Max
Connections double - The maximum number of connections for this user, if not filled in, there is no limit.
- List<string>
- User tag, used to determine the permission range for changing user access to RabbitMQ Management. Management: regular console user, monitoring: management console user, other values: non console user.
- Tdmq
Rabbitmq stringUser Id - ID of the resource.
- Instance
Id string - Cluster instance ID.
- Password string
- Password, used when logging in.
- User string
- Username, used when logging in.
- Description string
- Describe.
- Max
Channels float64 - The maximum number of channels for this user, if not filled in, there is no limit.
- Max
Connections float64 - The maximum number of connections for this user, if not filled in, there is no limit.
- []string
- User tag, used to determine the permission range for changing user access to RabbitMQ Management. Management: regular console user, monitoring: management console user, other values: non console user.
- Tdmq
Rabbitmq stringUser Id - ID of the resource.
- instance
Id String - Cluster instance ID.
- password String
- Password, used when logging in.
- user String
- Username, used when logging in.
- description String
- Describe.
- max
Channels Double - The maximum number of channels for this user, if not filled in, there is no limit.
- max
Connections Double - The maximum number of connections for this user, if not filled in, there is no limit.
- List<String>
- User tag, used to determine the permission range for changing user access to RabbitMQ Management. Management: regular console user, monitoring: management console user, other values: non console user.
- tdmq
Rabbitmq StringUser Id - ID of the resource.
- instance
Id string - Cluster instance ID.
- password string
- Password, used when logging in.
- user string
- Username, used when logging in.
- description string
- Describe.
- max
Channels number - The maximum number of channels for this user, if not filled in, there is no limit.
- max
Connections number - The maximum number of connections for this user, if not filled in, there is no limit.
- string[]
- User tag, used to determine the permission range for changing user access to RabbitMQ Management. Management: regular console user, monitoring: management console user, other values: non console user.
- tdmq
Rabbitmq stringUser Id - ID of the resource.
- instance_
id str - Cluster instance ID.
- password str
- Password, used when logging in.
- user str
- Username, used when logging in.
- description str
- Describe.
- max_
channels float - The maximum number of channels for this user, if not filled in, there is no limit.
- max_
connections float - The maximum number of connections for this user, if not filled in, there is no limit.
- Sequence[str]
- User tag, used to determine the permission range for changing user access to RabbitMQ Management. Management: regular console user, monitoring: management console user, other values: non console user.
- tdmq_
rabbitmq_ struser_ id - ID of the resource.
- instance
Id String - Cluster instance ID.
- password String
- Password, used when logging in.
- user String
- Username, used when logging in.
- description String
- Describe.
- max
Channels Number - The maximum number of channels for this user, if not filled in, there is no limit.
- max
Connections Number - The maximum number of connections for this user, if not filled in, there is no limit.
- List<String>
- User tag, used to determine the permission range for changing user access to RabbitMQ Management. Management: regular console user, monitoring: management console user, other values: non console user.
- tdmq
Rabbitmq StringUser Id - ID of the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the TdmqRabbitmqUser 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 string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing TdmqRabbitmqUser Resource
Get an existing TdmqRabbitmqUser 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?: TdmqRabbitmqUserState, opts?: CustomResourceOptions): TdmqRabbitmqUser
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
instance_id: Optional[str] = None,
max_channels: Optional[float] = None,
max_connections: Optional[float] = None,
password: Optional[str] = None,
tags: Optional[Sequence[str]] = None,
tdmq_rabbitmq_user_id: Optional[str] = None,
user: Optional[str] = None) -> TdmqRabbitmqUser
func GetTdmqRabbitmqUser(ctx *Context, name string, id IDInput, state *TdmqRabbitmqUserState, opts ...ResourceOption) (*TdmqRabbitmqUser, error)
public static TdmqRabbitmqUser Get(string name, Input<string> id, TdmqRabbitmqUserState? state, CustomResourceOptions? opts = null)
public static TdmqRabbitmqUser get(String name, Output<String> id, TdmqRabbitmqUserState state, CustomResourceOptions options)
resources: _: type: tencentcloud:TdmqRabbitmqUser get: id: ${id}
- 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.
- Description string
- Describe.
- Instance
Id string - Cluster instance ID.
- Max
Channels double - The maximum number of channels for this user, if not filled in, there is no limit.
- Max
Connections double - The maximum number of connections for this user, if not filled in, there is no limit.
- Password string
- Password, used when logging in.
- List<string>
- User tag, used to determine the permission range for changing user access to RabbitMQ Management. Management: regular console user, monitoring: management console user, other values: non console user.
- Tdmq
Rabbitmq stringUser Id - ID of the resource.
- User string
- Username, used when logging in.
- Description string
- Describe.
- Instance
Id string - Cluster instance ID.
- Max
Channels float64 - The maximum number of channels for this user, if not filled in, there is no limit.
- Max
Connections float64 - The maximum number of connections for this user, if not filled in, there is no limit.
- Password string
- Password, used when logging in.
- []string
- User tag, used to determine the permission range for changing user access to RabbitMQ Management. Management: regular console user, monitoring: management console user, other values: non console user.
- Tdmq
Rabbitmq stringUser Id - ID of the resource.
- User string
- Username, used when logging in.
- description String
- Describe.
- instance
Id String - Cluster instance ID.
- max
Channels Double - The maximum number of channels for this user, if not filled in, there is no limit.
- max
Connections Double - The maximum number of connections for this user, if not filled in, there is no limit.
- password String
- Password, used when logging in.
- List<String>
- User tag, used to determine the permission range for changing user access to RabbitMQ Management. Management: regular console user, monitoring: management console user, other values: non console user.
- tdmq
Rabbitmq StringUser Id - ID of the resource.
- user String
- Username, used when logging in.
- description string
- Describe.
- instance
Id string - Cluster instance ID.
- max
Channels number - The maximum number of channels for this user, if not filled in, there is no limit.
- max
Connections number - The maximum number of connections for this user, if not filled in, there is no limit.
- password string
- Password, used when logging in.
- string[]
- User tag, used to determine the permission range for changing user access to RabbitMQ Management. Management: regular console user, monitoring: management console user, other values: non console user.
- tdmq
Rabbitmq stringUser Id - ID of the resource.
- user string
- Username, used when logging in.
- description str
- Describe.
- instance_
id str - Cluster instance ID.
- max_
channels float - The maximum number of channels for this user, if not filled in, there is no limit.
- max_
connections float - The maximum number of connections for this user, if not filled in, there is no limit.
- password str
- Password, used when logging in.
- Sequence[str]
- User tag, used to determine the permission range for changing user access to RabbitMQ Management. Management: regular console user, monitoring: management console user, other values: non console user.
- tdmq_
rabbitmq_ struser_ id - ID of the resource.
- user str
- Username, used when logging in.
- description String
- Describe.
- instance
Id String - Cluster instance ID.
- max
Channels Number - The maximum number of channels for this user, if not filled in, there is no limit.
- max
Connections Number - The maximum number of connections for this user, if not filled in, there is no limit.
- password String
- Password, used when logging in.
- List<String>
- User tag, used to determine the permission range for changing user access to RabbitMQ Management. Management: regular console user, monitoring: management console user, other values: non console user.
- tdmq
Rabbitmq StringUser Id - ID of the resource.
- user String
- Username, used when logging in.
Import
tdmq rabbitmq_user can be imported using the id, e.g.
$ pulumi import tencentcloud:index/tdmqRabbitmqUser:TdmqRabbitmqUser example amqp-8xzx822q#tf-example-user
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- tencentcloud tencentcloudstack/terraform-provider-tencentcloud
- License
- Notes
- This Pulumi package is based on the
tencentcloud
Terraform Provider.