volcengine.rabbitmq.InstancePlugin
Explore with Pulumi AI
Provides a resource to manage rabbitmq instance plugin
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as volcengine from "@pulumi/volcengine";
import * as volcengine from "@volcengine/pulumi";
const fooZones = volcengine.ecs.Zones({});
const fooVpc = new volcengine.vpc.Vpc("fooVpc", {
vpcName: "acc-test-vpc",
cidrBlock: "172.16.0.0/16",
});
const fooSubnet = new volcengine.vpc.Subnet("fooSubnet", {
subnetName: "acc-test-subnet",
cidrBlock: "172.16.0.0/24",
zoneId: fooZones.then(fooZones => fooZones.zones?.[0]?.id),
vpcId: fooVpc.id,
});
const fooInstance = new volcengine.rabbitmq.Instance("fooInstance", {
zoneIds: [
fooZones.then(fooZones => fooZones.zones?.[0]?.id),
fooZones.then(fooZones => fooZones.zones?.[1]?.id),
fooZones.then(fooZones => fooZones.zones?.[2]?.id),
],
subnetId: fooSubnet.id,
version: "3.8.18",
userName: "acc-test-user",
userPassword: "93f0cb0614Aab12",
computeSpec: "rabbitmq.n3.x2.small",
storageSpace: 300,
instanceName: "acc-test-rabbitmq",
instanceDescription: "acc-test",
chargeInfo: {
chargeType: "PostPaid",
},
projectName: "default",
tags: [{
key: "k1",
value: "v1",
}],
});
const fooInstancePlugin = new volcengine.rabbitmq.InstancePlugin("fooInstancePlugin", {
instanceId: fooInstance.id,
pluginName: "rabbitmq_shovel",
});
import pulumi
import pulumi_volcengine as volcengine
foo_zones = volcengine.ecs.zones()
foo_vpc = volcengine.vpc.Vpc("fooVpc",
vpc_name="acc-test-vpc",
cidr_block="172.16.0.0/16")
foo_subnet = volcengine.vpc.Subnet("fooSubnet",
subnet_name="acc-test-subnet",
cidr_block="172.16.0.0/24",
zone_id=foo_zones.zones[0].id,
vpc_id=foo_vpc.id)
foo_instance = volcengine.rabbitmq.Instance("fooInstance",
zone_ids=[
foo_zones.zones[0].id,
foo_zones.zones[1].id,
foo_zones.zones[2].id,
],
subnet_id=foo_subnet.id,
version="3.8.18",
user_name="acc-test-user",
user_password="93f0cb0614Aab12",
compute_spec="rabbitmq.n3.x2.small",
storage_space=300,
instance_name="acc-test-rabbitmq",
instance_description="acc-test",
charge_info=volcengine.rabbitmq.InstanceChargeInfoArgs(
charge_type="PostPaid",
),
project_name="default",
tags=[volcengine.rabbitmq.InstanceTagArgs(
key="k1",
value="v1",
)])
foo_instance_plugin = volcengine.rabbitmq.InstancePlugin("fooInstancePlugin",
instance_id=foo_instance.id,
plugin_name="rabbitmq_shovel")
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/ecs"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/rabbitmq"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/vpc"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
fooZones, err := ecs.Zones(ctx, nil, nil)
if err != nil {
return err
}
fooVpc, err := vpc.NewVpc(ctx, "fooVpc", &vpc.VpcArgs{
VpcName: pulumi.String("acc-test-vpc"),
CidrBlock: pulumi.String("172.16.0.0/16"),
})
if err != nil {
return err
}
fooSubnet, err := vpc.NewSubnet(ctx, "fooSubnet", &vpc.SubnetArgs{
SubnetName: pulumi.String("acc-test-subnet"),
CidrBlock: pulumi.String("172.16.0.0/24"),
ZoneId: pulumi.String(fooZones.Zones[0].Id),
VpcId: fooVpc.ID(),
})
if err != nil {
return err
}
fooInstance, err := rabbitmq.NewInstance(ctx, "fooInstance", &rabbitmq.InstanceArgs{
ZoneIds: pulumi.StringArray{
pulumi.String(fooZones.Zones[0].Id),
pulumi.String(fooZones.Zones[1].Id),
pulumi.String(fooZones.Zones[2].Id),
},
SubnetId: fooSubnet.ID(),
Version: pulumi.String("3.8.18"),
UserName: pulumi.String("acc-test-user"),
UserPassword: pulumi.String("93f0cb0614Aab12"),
ComputeSpec: pulumi.String("rabbitmq.n3.x2.small"),
StorageSpace: pulumi.Int(300),
InstanceName: pulumi.String("acc-test-rabbitmq"),
InstanceDescription: pulumi.String("acc-test"),
ChargeInfo: &rabbitmq.InstanceChargeInfoArgs{
ChargeType: pulumi.String("PostPaid"),
},
ProjectName: pulumi.String("default"),
Tags: rabbitmq.InstanceTagArray{
&rabbitmq.InstanceTagArgs{
Key: pulumi.String("k1"),
Value: pulumi.String("v1"),
},
},
})
if err != nil {
return err
}
_, err = rabbitmq.NewInstancePlugin(ctx, "fooInstancePlugin", &rabbitmq.InstancePluginArgs{
InstanceId: fooInstance.ID(),
PluginName: pulumi.String("rabbitmq_shovel"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Volcengine = Pulumi.Volcengine;
return await Deployment.RunAsync(() =>
{
var fooZones = Volcengine.Ecs.Zones.Invoke();
var fooVpc = new Volcengine.Vpc.Vpc("fooVpc", new()
{
VpcName = "acc-test-vpc",
CidrBlock = "172.16.0.0/16",
});
var fooSubnet = new Volcengine.Vpc.Subnet("fooSubnet", new()
{
SubnetName = "acc-test-subnet",
CidrBlock = "172.16.0.0/24",
ZoneId = fooZones.Apply(zonesResult => zonesResult.Zones[0]?.Id),
VpcId = fooVpc.Id,
});
var fooInstance = new Volcengine.Rabbitmq.Instance("fooInstance", new()
{
ZoneIds = new[]
{
fooZones.Apply(zonesResult => zonesResult.Zones[0]?.Id),
fooZones.Apply(zonesResult => zonesResult.Zones[1]?.Id),
fooZones.Apply(zonesResult => zonesResult.Zones[2]?.Id),
},
SubnetId = fooSubnet.Id,
Version = "3.8.18",
UserName = "acc-test-user",
UserPassword = "93f0cb0614Aab12",
ComputeSpec = "rabbitmq.n3.x2.small",
StorageSpace = 300,
InstanceName = "acc-test-rabbitmq",
InstanceDescription = "acc-test",
ChargeInfo = new Volcengine.Rabbitmq.Inputs.InstanceChargeInfoArgs
{
ChargeType = "PostPaid",
},
ProjectName = "default",
Tags = new[]
{
new Volcengine.Rabbitmq.Inputs.InstanceTagArgs
{
Key = "k1",
Value = "v1",
},
},
});
var fooInstancePlugin = new Volcengine.Rabbitmq.InstancePlugin("fooInstancePlugin", new()
{
InstanceId = fooInstance.Id,
PluginName = "rabbitmq_shovel",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.volcengine.ecs.EcsFunctions;
import com.pulumi.volcengine.ecs.inputs.ZonesArgs;
import com.pulumi.volcengine.vpc.Vpc;
import com.pulumi.volcengine.vpc.VpcArgs;
import com.pulumi.volcengine.vpc.Subnet;
import com.pulumi.volcengine.vpc.SubnetArgs;
import com.pulumi.volcengine.rabbitmq.Instance;
import com.pulumi.volcengine.rabbitmq.InstanceArgs;
import com.pulumi.volcengine.rabbitmq.inputs.InstanceChargeInfoArgs;
import com.pulumi.volcengine.rabbitmq.inputs.InstanceTagArgs;
import com.pulumi.volcengine.rabbitmq.InstancePlugin;
import com.pulumi.volcengine.rabbitmq.InstancePluginArgs;
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 fooZones = EcsFunctions.Zones();
var fooVpc = new Vpc("fooVpc", VpcArgs.builder()
.vpcName("acc-test-vpc")
.cidrBlock("172.16.0.0/16")
.build());
var fooSubnet = new Subnet("fooSubnet", SubnetArgs.builder()
.subnetName("acc-test-subnet")
.cidrBlock("172.16.0.0/24")
.zoneId(fooZones.applyValue(zonesResult -> zonesResult.zones()[0].id()))
.vpcId(fooVpc.id())
.build());
var fooInstance = new Instance("fooInstance", InstanceArgs.builder()
.zoneIds(
fooZones.applyValue(zonesResult -> zonesResult.zones()[0].id()),
fooZones.applyValue(zonesResult -> zonesResult.zones()[1].id()),
fooZones.applyValue(zonesResult -> zonesResult.zones()[2].id()))
.subnetId(fooSubnet.id())
.version("3.8.18")
.userName("acc-test-user")
.userPassword("93f0cb0614Aab12")
.computeSpec("rabbitmq.n3.x2.small")
.storageSpace(300)
.instanceName("acc-test-rabbitmq")
.instanceDescription("acc-test")
.chargeInfo(InstanceChargeInfoArgs.builder()
.chargeType("PostPaid")
.build())
.projectName("default")
.tags(InstanceTagArgs.builder()
.key("k1")
.value("v1")
.build())
.build());
var fooInstancePlugin = new InstancePlugin("fooInstancePlugin", InstancePluginArgs.builder()
.instanceId(fooInstance.id())
.pluginName("rabbitmq_shovel")
.build());
}
}
resources:
fooVpc:
type: volcengine:vpc:Vpc
properties:
vpcName: acc-test-vpc
cidrBlock: 172.16.0.0/16
fooSubnet:
type: volcengine:vpc:Subnet
properties:
subnetName: acc-test-subnet
cidrBlock: 172.16.0.0/24
zoneId: ${fooZones.zones[0].id}
vpcId: ${fooVpc.id}
fooInstance:
type: volcengine:rabbitmq:Instance
properties:
zoneIds:
- ${fooZones.zones[0].id}
- ${fooZones.zones[1].id}
- ${fooZones.zones[2].id}
subnetId: ${fooSubnet.id}
version: 3.8.18
userName: acc-test-user
userPassword: 93f0cb0614Aab12
computeSpec: rabbitmq.n3.x2.small
storageSpace: 300
instanceName: acc-test-rabbitmq
instanceDescription: acc-test
chargeInfo:
chargeType: PostPaid
projectName: default
tags:
- key: k1
value: v1
fooInstancePlugin:
type: volcengine:rabbitmq:InstancePlugin
properties:
instanceId: ${fooInstance.id}
pluginName: rabbitmq_shovel
variables:
fooZones:
fn::invoke:
Function: volcengine:ecs:Zones
Arguments: {}
Create InstancePlugin Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new InstancePlugin(name: string, args: InstancePluginArgs, opts?: CustomResourceOptions);
@overload
def InstancePlugin(resource_name: str,
args: InstancePluginArgs,
opts: Optional[ResourceOptions] = None)
@overload
def InstancePlugin(resource_name: str,
opts: Optional[ResourceOptions] = None,
instance_id: Optional[str] = None,
plugin_name: Optional[str] = None)
func NewInstancePlugin(ctx *Context, name string, args InstancePluginArgs, opts ...ResourceOption) (*InstancePlugin, error)
public InstancePlugin(string name, InstancePluginArgs args, CustomResourceOptions? opts = null)
public InstancePlugin(String name, InstancePluginArgs args)
public InstancePlugin(String name, InstancePluginArgs args, CustomResourceOptions options)
type: volcengine:rabbitmq:InstancePlugin
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 InstancePluginArgs
- 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 InstancePluginArgs
- 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 InstancePluginArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args InstancePluginArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args InstancePluginArgs
- 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 instancePluginResource = new Volcengine.Rabbitmq.InstancePlugin("instancePluginResource", new()
{
InstanceId = "string",
PluginName = "string",
});
example, err := rabbitmq.NewInstancePlugin(ctx, "instancePluginResource", &rabbitmq.InstancePluginArgs{
InstanceId: pulumi.String("string"),
PluginName: pulumi.String("string"),
})
var instancePluginResource = new InstancePlugin("instancePluginResource", InstancePluginArgs.builder()
.instanceId("string")
.pluginName("string")
.build());
instance_plugin_resource = volcengine.rabbitmq.InstancePlugin("instancePluginResource",
instance_id="string",
plugin_name="string")
const instancePluginResource = new volcengine.rabbitmq.InstancePlugin("instancePluginResource", {
instanceId: "string",
pluginName: "string",
});
type: volcengine:rabbitmq:InstancePlugin
properties:
instanceId: string
pluginName: string
InstancePlugin 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 InstancePlugin resource accepts the following input properties:
- Instance
Id string - The id of the rabbitmq instance..
- Plugin
Name string - The name of the plugin.
- Instance
Id string - The id of the rabbitmq instance..
- Plugin
Name string - The name of the plugin.
- instance
Id String - The id of the rabbitmq instance..
- plugin
Name String - The name of the plugin.
- instance
Id string - The id of the rabbitmq instance..
- plugin
Name string - The name of the plugin.
- instance_
id str - The id of the rabbitmq instance..
- plugin_
name str - The name of the plugin.
- instance
Id String - The id of the rabbitmq instance..
- plugin
Name String - The name of the plugin.
Outputs
All input properties are implicitly available as output properties. Additionally, the InstancePlugin resource produces the following output properties:
- Description string
- The description of the plugin.
- Disable
Prompt string - The disable prompt of the plugin.
- Enable
Prompt string - The enable prompt of the plugin.
- Enabled bool
- Whether the plugin is enabled.
- Id string
- The provider-assigned unique ID for this managed resource.
- Need
Reboot boolOn Change - Will changing the enabled state of the plugin cause a reboot of the rabbitmq instance.
- Port int
- The port of the plugin.
- Version string
- The version of the plugin.
- Description string
- The description of the plugin.
- Disable
Prompt string - The disable prompt of the plugin.
- Enable
Prompt string - The enable prompt of the plugin.
- Enabled bool
- Whether the plugin is enabled.
- Id string
- The provider-assigned unique ID for this managed resource.
- Need
Reboot boolOn Change - Will changing the enabled state of the plugin cause a reboot of the rabbitmq instance.
- Port int
- The port of the plugin.
- Version string
- The version of the plugin.
- description String
- The description of the plugin.
- disable
Prompt String - The disable prompt of the plugin.
- enable
Prompt String - The enable prompt of the plugin.
- enabled Boolean
- Whether the plugin is enabled.
- id String
- The provider-assigned unique ID for this managed resource.
- need
Reboot BooleanOn Change - Will changing the enabled state of the plugin cause a reboot of the rabbitmq instance.
- port Integer
- The port of the plugin.
- version String
- The version of the plugin.
- description string
- The description of the plugin.
- disable
Prompt string - The disable prompt of the plugin.
- enable
Prompt string - The enable prompt of the plugin.
- enabled boolean
- Whether the plugin is enabled.
- id string
- The provider-assigned unique ID for this managed resource.
- need
Reboot booleanOn Change - Will changing the enabled state of the plugin cause a reboot of the rabbitmq instance.
- port number
- The port of the plugin.
- version string
- The version of the plugin.
- description str
- The description of the plugin.
- disable_
prompt str - The disable prompt of the plugin.
- enable_
prompt str - The enable prompt of the plugin.
- enabled bool
- Whether the plugin is enabled.
- id str
- The provider-assigned unique ID for this managed resource.
- need_
reboot_ boolon_ change - Will changing the enabled state of the plugin cause a reboot of the rabbitmq instance.
- port int
- The port of the plugin.
- version str
- The version of the plugin.
- description String
- The description of the plugin.
- disable
Prompt String - The disable prompt of the plugin.
- enable
Prompt String - The enable prompt of the plugin.
- enabled Boolean
- Whether the plugin is enabled.
- id String
- The provider-assigned unique ID for this managed resource.
- need
Reboot BooleanOn Change - Will changing the enabled state of the plugin cause a reboot of the rabbitmq instance.
- port Number
- The port of the plugin.
- version String
- The version of the plugin.
Look up Existing InstancePlugin Resource
Get an existing InstancePlugin 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?: InstancePluginState, opts?: CustomResourceOptions): InstancePlugin
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
disable_prompt: Optional[str] = None,
enable_prompt: Optional[str] = None,
enabled: Optional[bool] = None,
instance_id: Optional[str] = None,
need_reboot_on_change: Optional[bool] = None,
plugin_name: Optional[str] = None,
port: Optional[int] = None,
version: Optional[str] = None) -> InstancePlugin
func GetInstancePlugin(ctx *Context, name string, id IDInput, state *InstancePluginState, opts ...ResourceOption) (*InstancePlugin, error)
public static InstancePlugin Get(string name, Input<string> id, InstancePluginState? state, CustomResourceOptions? opts = null)
public static InstancePlugin get(String name, Output<String> id, InstancePluginState state, CustomResourceOptions options)
resources: _: type: volcengine:rabbitmq:InstancePlugin 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
- The description of the plugin.
- Disable
Prompt string - The disable prompt of the plugin.
- Enable
Prompt string - The enable prompt of the plugin.
- Enabled bool
- Whether the plugin is enabled.
- Instance
Id string - The id of the rabbitmq instance..
- Need
Reboot boolOn Change - Will changing the enabled state of the plugin cause a reboot of the rabbitmq instance.
- Plugin
Name string - The name of the plugin.
- Port int
- The port of the plugin.
- Version string
- The version of the plugin.
- Description string
- The description of the plugin.
- Disable
Prompt string - The disable prompt of the plugin.
- Enable
Prompt string - The enable prompt of the plugin.
- Enabled bool
- Whether the plugin is enabled.
- Instance
Id string - The id of the rabbitmq instance..
- Need
Reboot boolOn Change - Will changing the enabled state of the plugin cause a reboot of the rabbitmq instance.
- Plugin
Name string - The name of the plugin.
- Port int
- The port of the plugin.
- Version string
- The version of the plugin.
- description String
- The description of the plugin.
- disable
Prompt String - The disable prompt of the plugin.
- enable
Prompt String - The enable prompt of the plugin.
- enabled Boolean
- Whether the plugin is enabled.
- instance
Id String - The id of the rabbitmq instance..
- need
Reboot BooleanOn Change - Will changing the enabled state of the plugin cause a reboot of the rabbitmq instance.
- plugin
Name String - The name of the plugin.
- port Integer
- The port of the plugin.
- version String
- The version of the plugin.
- description string
- The description of the plugin.
- disable
Prompt string - The disable prompt of the plugin.
- enable
Prompt string - The enable prompt of the plugin.
- enabled boolean
- Whether the plugin is enabled.
- instance
Id string - The id of the rabbitmq instance..
- need
Reboot booleanOn Change - Will changing the enabled state of the plugin cause a reboot of the rabbitmq instance.
- plugin
Name string - The name of the plugin.
- port number
- The port of the plugin.
- version string
- The version of the plugin.
- description str
- The description of the plugin.
- disable_
prompt str - The disable prompt of the plugin.
- enable_
prompt str - The enable prompt of the plugin.
- enabled bool
- Whether the plugin is enabled.
- instance_
id str - The id of the rabbitmq instance..
- need_
reboot_ boolon_ change - Will changing the enabled state of the plugin cause a reboot of the rabbitmq instance.
- plugin_
name str - The name of the plugin.
- port int
- The port of the plugin.
- version str
- The version of the plugin.
- description String
- The description of the plugin.
- disable
Prompt String - The disable prompt of the plugin.
- enable
Prompt String - The enable prompt of the plugin.
- enabled Boolean
- Whether the plugin is enabled.
- instance
Id String - The id of the rabbitmq instance..
- need
Reboot BooleanOn Change - Will changing the enabled state of the plugin cause a reboot of the rabbitmq instance.
- plugin
Name String - The name of the plugin.
- port Number
- The port of the plugin.
- version String
- The version of the plugin.
Import
RabbitmqInstancePlugin can be imported using the instance_id:plugin_name, e.g.
$ pulumi import volcengine:rabbitmq/instancePlugin:InstancePlugin default resource_id
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- volcengine volcengine/pulumi-volcengine
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
volcengine
Terraform Provider.