Instance
This resource allows you to create and manage a CloudAMQP instance running Rabbit MQ and deploy to multiple cloud platforms provider and over multiple regions, see Instance regions for more information.
Once the instance is created it will be assigned a unique identifier. All other resource and data sources created for this instance needs to reference the instance identifier.
Example Usage
using Pulumi;
using CloudAmqp = Pulumi.CloudAmqp;
class MyStack : Stack
{
public MyStack()
{
// Minimum free lemur instance
var lemurInstance = new CloudAmqp.Instance("lemurInstance", new CloudAmqp.InstanceArgs
{
Plan = "lemur",
Region = "amazon-web-services::us-west-1",
});
// New dedicated bunny instance
var instance = new CloudAmqp.Instance("instance", new CloudAmqp.InstanceArgs
{
NoDefaultAlarms = true,
Nodes = 1,
Plan = "bunny-1",
Region = "amazon-web-services::us-west-1",
RmqVersion = "3.8.3",
Tags =
{
"terraform",
},
});
}
}
package main
import (
"github.com/pulumi/pulumi-cloudamqp/sdk/v2/go/cloudamqp"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cloudamqp.NewInstance(ctx, "lemurInstance", &cloudamqp.InstanceArgs{
Plan: pulumi.String("lemur"),
Region: pulumi.String("amazon-web-services::us-west-1"),
})
if err != nil {
return err
}
_, err = cloudamqp.NewInstance(ctx, "instance", &cloudamqp.InstanceArgs{
NoDefaultAlarms: pulumi.Bool(true),
Nodes: pulumi.Int(1),
Plan: pulumi.String("bunny-1"),
Region: pulumi.String("amazon-web-services::us-west-1"),
RmqVersion: pulumi.String("3.8.3"),
Tags: pulumi.StringArray{
pulumi.String("terraform"),
},
})
if err != nil {
return err
}
return nil
})
}
import pulumi
import pulumi_cloudamqp as cloudamqp
# Minimum free lemur instance
lemur_instance = cloudamqp.Instance("lemurInstance",
plan="lemur",
region="amazon-web-services::us-west-1")
# New dedicated bunny instance
instance = cloudamqp.Instance("instance",
no_default_alarms=True,
nodes=1,
plan="bunny-1",
region="amazon-web-services::us-west-1",
rmq_version="3.8.3",
tags=["terraform"])
import * as pulumi from "@pulumi/pulumi";
import * as cloudamqp from "@pulumi/cloudamqp";
// Minimum free lemur instance
const lemurInstance = new cloudamqp.Instance("lemur_instance", {
plan: "lemur",
region: "amazon-web-services::us-west-1",
});
// New dedicated bunny instance
const instance = new cloudamqp.Instance("instance", {
noDefaultAlarms: true,
nodes: 1,
plan: "bunny-1",
region: "amazon-web-services::us-west-1",
rmqVersion: "3.8.3",
tags: ["terraform"],
});
Create a Instance Resource
new Instance(name: string, args: InstanceArgs, opts?: CustomResourceOptions);
def Instance(resource_name: str, opts: Optional[ResourceOptions] = None, name: Optional[str] = None, no_default_alarms: Optional[bool] = None, nodes: Optional[int] = None, plan: Optional[str] = None, region: Optional[str] = None, rmq_version: Optional[str] = None, tags: Optional[Sequence[str]] = None, vpc_subnet: Optional[str] = None)
func NewInstance(ctx *Context, name string, args InstanceArgs, opts ...ResourceOption) (*Instance, error)
public Instance(string name, InstanceArgs args, CustomResourceOptions? opts = null)
- name string
- The unique name of the resource.
- args InstanceArgs
- 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 InstanceArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args InstanceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
Instance Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The Instance resource accepts the following input properties:
- Plan string
The subscription plan. See available plans
- Region string
The region to host the instance in. See Instance regions
- Name string
Name of the CloudAMQP instance.
- No
Default boolAlarms Set to true to discard creating default alarms when the instance is created. Can be left out, will then use default value = false.
- Nodes int
Number of nodes, 1, 3 or 5. Note: Changed from optional to computed. In order to change number of nodes, the subscription plan needs to be updated.
- Rmq
Version string The Rabbit MQ version. Can be left out, will then be set to default value used by CloudAMQP API. Note: There is not yet any support in the provider to change the RMQ version. Once it’s set in the initial creation, it will remain.
- List<string>
One or more tags for the CloudAMQP instance, makes it possible to categories multiple instances in console view. Default there is no tags assigned.
- Vpc
Subnet string Creates a dedicated VPC subnet, shouldn’t overlap with other VPC subnet, default subnet used 10.56.72.0/24. NOTE: extra fee will be charged when using VPC, see CloudAMQP for more information.
- Plan string
The subscription plan. See available plans
- Region string
The region to host the instance in. See Instance regions
- Name string
Name of the CloudAMQP instance.
- No
Default boolAlarms Set to true to discard creating default alarms when the instance is created. Can be left out, will then use default value = false.
- Nodes int
Number of nodes, 1, 3 or 5. Note: Changed from optional to computed. In order to change number of nodes, the subscription plan needs to be updated.
- Rmq
Version string The Rabbit MQ version. Can be left out, will then be set to default value used by CloudAMQP API. Note: There is not yet any support in the provider to change the RMQ version. Once it’s set in the initial creation, it will remain.
- []string
One or more tags for the CloudAMQP instance, makes it possible to categories multiple instances in console view. Default there is no tags assigned.
- Vpc
Subnet string Creates a dedicated VPC subnet, shouldn’t overlap with other VPC subnet, default subnet used 10.56.72.0/24. NOTE: extra fee will be charged when using VPC, see CloudAMQP for more information.
- plan string
The subscription plan. See available plans
- region string
The region to host the instance in. See Instance regions
- name string
Name of the CloudAMQP instance.
- no
Default booleanAlarms Set to true to discard creating default alarms when the instance is created. Can be left out, will then use default value = false.
- nodes number
Number of nodes, 1, 3 or 5. Note: Changed from optional to computed. In order to change number of nodes, the subscription plan needs to be updated.
- rmq
Version string The Rabbit MQ version. Can be left out, will then be set to default value used by CloudAMQP API. Note: There is not yet any support in the provider to change the RMQ version. Once it’s set in the initial creation, it will remain.
- string[]
One or more tags for the CloudAMQP instance, makes it possible to categories multiple instances in console view. Default there is no tags assigned.
- vpc
Subnet string Creates a dedicated VPC subnet, shouldn’t overlap with other VPC subnet, default subnet used 10.56.72.0/24. NOTE: extra fee will be charged when using VPC, see CloudAMQP for more information.
- plan str
The subscription plan. See available plans
- region str
The region to host the instance in. See Instance regions
- name str
Name of the CloudAMQP instance.
- no_
default_ boolalarms Set to true to discard creating default alarms when the instance is created. Can be left out, will then use default value = false.
- nodes int
Number of nodes, 1, 3 or 5. Note: Changed from optional to computed. In order to change number of nodes, the subscription plan needs to be updated.
- rmq_
version str The Rabbit MQ version. Can be left out, will then be set to default value used by CloudAMQP API. Note: There is not yet any support in the provider to change the RMQ version. Once it’s set in the initial creation, it will remain.
- Sequence[str]
One or more tags for the CloudAMQP instance, makes it possible to categories multiple instances in console view. Default there is no tags assigned.
- vpc_
subnet str Creates a dedicated VPC subnet, shouldn’t overlap with other VPC subnet, default subnet used 10.56.72.0/24. NOTE: extra fee will be charged when using VPC, see CloudAMQP for more information.
Outputs
All input properties are implicitly available as output properties. Additionally, the Instance resource produces the following output properties:
- Apikey string
(Computed) API key needed to communicate to CloudAMQP’s second API. The second API is used to manage alarms, integration and more, full description CloudAMQP API.
- Dedicated bool
Is the instance hosted on a dedicated server
- Host string
(Computed) The host name for the CloudAMQP instance.
- Id string
- The provider-assigned unique ID for this managed resource.
- Ready bool
Flag describing if the resource is ready
- Url string
(Computed) AMQP server endpoint.
amqps://{username}:{password}@{hostname}/{vhost}
- Vhost string
(Computed) The virtual host used by Rabbit MQ.
- Apikey string
(Computed) API key needed to communicate to CloudAMQP’s second API. The second API is used to manage alarms, integration and more, full description CloudAMQP API.
- Dedicated bool
Is the instance hosted on a dedicated server
- Host string
(Computed) The host name for the CloudAMQP instance.
- Id string
- The provider-assigned unique ID for this managed resource.
- Ready bool
Flag describing if the resource is ready
- Url string
(Computed) AMQP server endpoint.
amqps://{username}:{password}@{hostname}/{vhost}
- Vhost string
(Computed) The virtual host used by Rabbit MQ.
- apikey string
(Computed) API key needed to communicate to CloudAMQP’s second API. The second API is used to manage alarms, integration and more, full description CloudAMQP API.
- dedicated boolean
Is the instance hosted on a dedicated server
- host string
(Computed) The host name for the CloudAMQP instance.
- id string
- The provider-assigned unique ID for this managed resource.
- ready boolean
Flag describing if the resource is ready
- url string
(Computed) AMQP server endpoint.
amqps://{username}:{password}@{hostname}/{vhost}
- vhost string
(Computed) The virtual host used by Rabbit MQ.
- apikey str
(Computed) API key needed to communicate to CloudAMQP’s second API. The second API is used to manage alarms, integration and more, full description CloudAMQP API.
- dedicated bool
Is the instance hosted on a dedicated server
- host str
(Computed) The host name for the CloudAMQP instance.
- id str
- The provider-assigned unique ID for this managed resource.
- ready bool
Flag describing if the resource is ready
- url str
(Computed) AMQP server endpoint.
amqps://{username}:{password}@{hostname}/{vhost}
- vhost str
(Computed) The virtual host used by Rabbit MQ.
Look up an Existing Instance Resource
Get an existing Instance 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?: InstanceState, opts?: CustomResourceOptions): Instance
@staticmethod
def get(resource_name: str, id: str, opts: Optional[ResourceOptions] = None, apikey: Optional[str] = None, dedicated: Optional[bool] = None, host: Optional[str] = None, name: Optional[str] = None, no_default_alarms: Optional[bool] = None, nodes: Optional[int] = None, plan: Optional[str] = None, ready: Optional[bool] = None, region: Optional[str] = None, rmq_version: Optional[str] = None, tags: Optional[Sequence[str]] = None, url: Optional[str] = None, vhost: Optional[str] = None, vpc_subnet: Optional[str] = None) -> Instance
func GetInstance(ctx *Context, name string, id IDInput, state *InstanceState, opts ...ResourceOption) (*Instance, error)
public static Instance Get(string name, Input<string> id, InstanceState? 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:
- Apikey string
(Computed) API key needed to communicate to CloudAMQP’s second API. The second API is used to manage alarms, integration and more, full description CloudAMQP API.
- Dedicated bool
Is the instance hosted on a dedicated server
- Host string
(Computed) The host name for the CloudAMQP instance.
- Name string
Name of the CloudAMQP instance.
- No
Default boolAlarms Set to true to discard creating default alarms when the instance is created. Can be left out, will then use default value = false.
- Nodes int
Number of nodes, 1, 3 or 5. Note: Changed from optional to computed. In order to change number of nodes, the subscription plan needs to be updated.
- Plan string
The subscription plan. See available plans
- Ready bool
Flag describing if the resource is ready
- Region string
The region to host the instance in. See Instance regions
- Rmq
Version string The Rabbit MQ version. Can be left out, will then be set to default value used by CloudAMQP API. Note: There is not yet any support in the provider to change the RMQ version. Once it’s set in the initial creation, it will remain.
- List<string>
One or more tags for the CloudAMQP instance, makes it possible to categories multiple instances in console view. Default there is no tags assigned.
- Url string
(Computed) AMQP server endpoint.
amqps://{username}:{password}@{hostname}/{vhost}
- Vhost string
(Computed) The virtual host used by Rabbit MQ.
- Vpc
Subnet string Creates a dedicated VPC subnet, shouldn’t overlap with other VPC subnet, default subnet used 10.56.72.0/24. NOTE: extra fee will be charged when using VPC, see CloudAMQP for more information.
- Apikey string
(Computed) API key needed to communicate to CloudAMQP’s second API. The second API is used to manage alarms, integration and more, full description CloudAMQP API.
- Dedicated bool
Is the instance hosted on a dedicated server
- Host string
(Computed) The host name for the CloudAMQP instance.
- Name string
Name of the CloudAMQP instance.
- No
Default boolAlarms Set to true to discard creating default alarms when the instance is created. Can be left out, will then use default value = false.
- Nodes int
Number of nodes, 1, 3 or 5. Note: Changed from optional to computed. In order to change number of nodes, the subscription plan needs to be updated.
- Plan string
The subscription plan. See available plans
- Ready bool
Flag describing if the resource is ready
- Region string
The region to host the instance in. See Instance regions
- Rmq
Version string The Rabbit MQ version. Can be left out, will then be set to default value used by CloudAMQP API. Note: There is not yet any support in the provider to change the RMQ version. Once it’s set in the initial creation, it will remain.
- []string
One or more tags for the CloudAMQP instance, makes it possible to categories multiple instances in console view. Default there is no tags assigned.
- Url string
(Computed) AMQP server endpoint.
amqps://{username}:{password}@{hostname}/{vhost}
- Vhost string
(Computed) The virtual host used by Rabbit MQ.
- Vpc
Subnet string Creates a dedicated VPC subnet, shouldn’t overlap with other VPC subnet, default subnet used 10.56.72.0/24. NOTE: extra fee will be charged when using VPC, see CloudAMQP for more information.
- apikey string
(Computed) API key needed to communicate to CloudAMQP’s second API. The second API is used to manage alarms, integration and more, full description CloudAMQP API.
- dedicated boolean
Is the instance hosted on a dedicated server
- host string
(Computed) The host name for the CloudAMQP instance.
- name string
Name of the CloudAMQP instance.
- no
Default booleanAlarms Set to true to discard creating default alarms when the instance is created. Can be left out, will then use default value = false.
- nodes number
Number of nodes, 1, 3 or 5. Note: Changed from optional to computed. In order to change number of nodes, the subscription plan needs to be updated.
- plan string
The subscription plan. See available plans
- ready boolean
Flag describing if the resource is ready
- region string
The region to host the instance in. See Instance regions
- rmq
Version string The Rabbit MQ version. Can be left out, will then be set to default value used by CloudAMQP API. Note: There is not yet any support in the provider to change the RMQ version. Once it’s set in the initial creation, it will remain.
- string[]
One or more tags for the CloudAMQP instance, makes it possible to categories multiple instances in console view. Default there is no tags assigned.
- url string
(Computed) AMQP server endpoint.
amqps://{username}:{password}@{hostname}/{vhost}
- vhost string
(Computed) The virtual host used by Rabbit MQ.
- vpc
Subnet string Creates a dedicated VPC subnet, shouldn’t overlap with other VPC subnet, default subnet used 10.56.72.0/24. NOTE: extra fee will be charged when using VPC, see CloudAMQP for more information.
- apikey str
(Computed) API key needed to communicate to CloudAMQP’s second API. The second API is used to manage alarms, integration and more, full description CloudAMQP API.
- dedicated bool
Is the instance hosted on a dedicated server
- host str
(Computed) The host name for the CloudAMQP instance.
- name str
Name of the CloudAMQP instance.
- no_
default_ boolalarms Set to true to discard creating default alarms when the instance is created. Can be left out, will then use default value = false.
- nodes int
Number of nodes, 1, 3 or 5. Note: Changed from optional to computed. In order to change number of nodes, the subscription plan needs to be updated.
- plan str
The subscription plan. See available plans
- ready bool
Flag describing if the resource is ready
- region str
The region to host the instance in. See Instance regions
- rmq_
version str The Rabbit MQ version. Can be left out, will then be set to default value used by CloudAMQP API. Note: There is not yet any support in the provider to change the RMQ version. Once it’s set in the initial creation, it will remain.
- Sequence[str]
One or more tags for the CloudAMQP instance, makes it possible to categories multiple instances in console view. Default there is no tags assigned.
- url str
(Computed) AMQP server endpoint.
amqps://{username}:{password}@{hostname}/{vhost}
- vhost str
(Computed) The virtual host used by Rabbit MQ.
- vpc_
subnet str Creates a dedicated VPC subnet, shouldn’t overlap with other VPC subnet, default subnet used 10.56.72.0/24. NOTE: extra fee will be charged when using VPC, see CloudAMQP for more information.
Import
cloudamqp_instance
can be imported using CloudAMQP internal identifier. To retrieve the identifier for an instance, use CloudAMQP customer API.
$ pulumi import cloudamqp:index/instance:Instance instance <instance_id>`
Package Details
- Repository
- https://github.com/pulumi/pulumi-cloudamqp
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
cloudamqp
Terraform Provider.