1. Packages
  2. CloudAMQP
  3. API Docs
  4. UpgradeRabbitmq
CloudAMQP v3.17.5 published on Friday, Apr 5, 2024 by Pulumi

cloudamqp.UpgradeRabbitmq

Explore with Pulumi AI

cloudamqp logo
CloudAMQP v3.17.5 published on Friday, Apr 5, 2024 by Pulumi

    This resource allows you to automatically upgrade to the latest possible upgradable versions for RabbitMQ and Erlang. Depending on initial versions of RabbitMQ and Erlang of the CloudAMQP instance, multiple runs may be needed to get to the latest versions. After completed upgrade, check data source cloudamqp.getUpgradableVersions to see if newer versions is available. Then delete cloudamqp.UpgradeRabbitmq and create it again to invoke the upgrade.

    Important Upgrade Information

    • All single node upgrades will require some downtime since RabbitMQ needs a restart.
    • From RabbitMQ version 3.9, rolling upgrades between minor versions (e.g. 3.9 to 3.10), in a multi-node cluster are possible without downtime. This means that one node is upgraded at a time while the other nodes are still running. For versions older than 3.9, patch version upgrades (e.g. 3.8.x to 3.8.y) are possible without downtime in a multi-node cluster, but minor version upgrades will require downtime.
    • Auto delete queues (queues that are marked AD) will be deleted during the update.
    • Any custom plugins support has installed on your behalf will be disabled and you need to contact support@cloudamqp.com and ask to have them re-installed.
    • TLS 1.0 and 1.1 will not be supported after the update.

    Only available for dedicated subscription plans running RabbitMQ.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as cloudamqp from "@pulumi/cloudamqp";
    
    const versions = cloudamqp.getUpgradableVersions({
        instanceId: cloudamqp_instance.instance.id,
    });
    // Invoke automatically upgrade to latest possible upgradable versions for RabbitMQ and Erlang
    const upgrade = new cloudamqp.UpgradeRabbitmq("upgrade", {instanceId: cloudamqp_instance.instance.id});
    
    import pulumi
    import pulumi_cloudamqp as cloudamqp
    
    versions = cloudamqp.get_upgradable_versions(instance_id=cloudamqp_instance["instance"]["id"])
    # Invoke automatically upgrade to latest possible upgradable versions for RabbitMQ and Erlang
    upgrade = cloudamqp.UpgradeRabbitmq("upgrade", instance_id=cloudamqp_instance["instance"]["id"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-cloudamqp/sdk/v3/go/cloudamqp"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := cloudamqp.GetUpgradableVersions(ctx, &cloudamqp.GetUpgradableVersionsArgs{
    			InstanceId: cloudamqp_instance.Instance.Id,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		// Invoke automatically upgrade to latest possible upgradable versions for RabbitMQ and Erlang
    		_, err = cloudamqp.NewUpgradeRabbitmq(ctx, "upgrade", &cloudamqp.UpgradeRabbitmqArgs{
    			InstanceId: pulumi.Any(cloudamqp_instance.Instance.Id),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using CloudAmqp = Pulumi.CloudAmqp;
    
    return await Deployment.RunAsync(() => 
    {
        var versions = CloudAmqp.GetUpgradableVersions.Invoke(new()
        {
            InstanceId = cloudamqp_instance.Instance.Id,
        });
    
        // Invoke automatically upgrade to latest possible upgradable versions for RabbitMQ and Erlang
        var upgrade = new CloudAmqp.UpgradeRabbitmq("upgrade", new()
        {
            InstanceId = cloudamqp_instance.Instance.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.cloudamqp.CloudamqpFunctions;
    import com.pulumi.cloudamqp.inputs.GetUpgradableVersionsArgs;
    import com.pulumi.cloudamqp.UpgradeRabbitmq;
    import com.pulumi.cloudamqp.UpgradeRabbitmqArgs;
    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 versions = CloudamqpFunctions.getUpgradableVersions(GetUpgradableVersionsArgs.builder()
                .instanceId(cloudamqp_instance.instance().id())
                .build());
    
            // Invoke automatically upgrade to latest possible upgradable versions for RabbitMQ and Erlang
            var upgrade = new UpgradeRabbitmq("upgrade", UpgradeRabbitmqArgs.builder()        
                .instanceId(cloudamqp_instance.instance().id())
                .build());
    
        }
    }
    
    resources:
      # Invoke automatically upgrade to latest possible upgradable versions for RabbitMQ and Erlang
      upgrade:
        type: cloudamqp:UpgradeRabbitmq
        properties:
          instanceId: ${cloudamqp_instance.instance.id}
    variables:
      versions:
        fn::invoke:
          Function: cloudamqp:getUpgradableVersions
          Arguments:
            instanceId: ${cloudamqp_instance.instance.id}
    
    import * as pulumi from "@pulumi/pulumi";
    import * as cloudamqp from "@pulumi/cloudamqp";
    
    const versions = cloudamqp.getUpgradableVersions({
        instanceId: cloudamqp_instance.instance.id,
    });
    
    import pulumi
    import pulumi_cloudamqp as cloudamqp
    
    versions = cloudamqp.get_upgradable_versions(instance_id=cloudamqp_instance["instance"]["id"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-cloudamqp/sdk/v3/go/cloudamqp"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := cloudamqp.GetUpgradableVersions(ctx, &cloudamqp.GetUpgradableVersionsArgs{
    			InstanceId: cloudamqp_instance.Instance.Id,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using CloudAmqp = Pulumi.CloudAmqp;
    
    return await Deployment.RunAsync(() => 
    {
        var versions = CloudAmqp.GetUpgradableVersions.Invoke(new()
        {
            InstanceId = cloudamqp_instance.Instance.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.cloudamqp.CloudamqpFunctions;
    import com.pulumi.cloudamqp.inputs.GetUpgradableVersionsArgs;
    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 versions = CloudamqpFunctions.getUpgradableVersions(GetUpgradableVersionsArgs.builder()
                .instanceId(cloudamqp_instance.instance().id())
                .build());
    
        }
    }
    
    variables:
      versions:
        fn::invoke:
          Function: cloudamqp:getUpgradableVersions
          Arguments:
            instanceId: ${cloudamqp_instance.instance.id}
    

    If newer version is still available to be upgradable in the data source, re-run again.

    import * as pulumi from "@pulumi/pulumi";
    import * as cloudamqp from "@pulumi/cloudamqp";
    
    const versions = cloudamqp.getUpgradableVersions({
        instanceId: cloudamqp_instance.instance.id,
    });
    // Invoke automatically upgrade to latest possible upgradable versions for RabbitMQ and Erlang
    const upgrade = new cloudamqp.UpgradeRabbitmq("upgrade", {instanceId: cloudamqp_instance.instance.id});
    
    import pulumi
    import pulumi_cloudamqp as cloudamqp
    
    versions = cloudamqp.get_upgradable_versions(instance_id=cloudamqp_instance["instance"]["id"])
    # Invoke automatically upgrade to latest possible upgradable versions for RabbitMQ and Erlang
    upgrade = cloudamqp.UpgradeRabbitmq("upgrade", instance_id=cloudamqp_instance["instance"]["id"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-cloudamqp/sdk/v3/go/cloudamqp"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := cloudamqp.GetUpgradableVersions(ctx, &cloudamqp.GetUpgradableVersionsArgs{
    			InstanceId: cloudamqp_instance.Instance.Id,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		// Invoke automatically upgrade to latest possible upgradable versions for RabbitMQ and Erlang
    		_, err = cloudamqp.NewUpgradeRabbitmq(ctx, "upgrade", &cloudamqp.UpgradeRabbitmqArgs{
    			InstanceId: pulumi.Any(cloudamqp_instance.Instance.Id),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using CloudAmqp = Pulumi.CloudAmqp;
    
    return await Deployment.RunAsync(() => 
    {
        var versions = CloudAmqp.GetUpgradableVersions.Invoke(new()
        {
            InstanceId = cloudamqp_instance.Instance.Id,
        });
    
        // Invoke automatically upgrade to latest possible upgradable versions for RabbitMQ and Erlang
        var upgrade = new CloudAmqp.UpgradeRabbitmq("upgrade", new()
        {
            InstanceId = cloudamqp_instance.Instance.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.cloudamqp.CloudamqpFunctions;
    import com.pulumi.cloudamqp.inputs.GetUpgradableVersionsArgs;
    import com.pulumi.cloudamqp.UpgradeRabbitmq;
    import com.pulumi.cloudamqp.UpgradeRabbitmqArgs;
    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 versions = CloudamqpFunctions.getUpgradableVersions(GetUpgradableVersionsArgs.builder()
                .instanceId(cloudamqp_instance.instance().id())
                .build());
    
            // Invoke automatically upgrade to latest possible upgradable versions for RabbitMQ and Erlang
            var upgrade = new UpgradeRabbitmq("upgrade", UpgradeRabbitmqArgs.builder()        
                .instanceId(cloudamqp_instance.instance().id())
                .build());
    
        }
    }
    
    resources:
      # Invoke automatically upgrade to latest possible upgradable versions for RabbitMQ and Erlang
      upgrade:
        type: cloudamqp:UpgradeRabbitmq
        properties:
          instanceId: ${cloudamqp_instance.instance.id}
    variables:
      versions:
        fn::invoke:
          Function: cloudamqp:getUpgradableVersions
          Arguments:
            instanceId: ${cloudamqp_instance.instance.id}
    

    Create UpgradeRabbitmq Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new UpgradeRabbitmq(name: string, args: UpgradeRabbitmqArgs, opts?: CustomResourceOptions);
    @overload
    def UpgradeRabbitmq(resource_name: str,
                        args: UpgradeRabbitmqArgs,
                        opts: Optional[ResourceOptions] = None)
    
    @overload
    def UpgradeRabbitmq(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        instance_id: Optional[int] = None)
    func NewUpgradeRabbitmq(ctx *Context, name string, args UpgradeRabbitmqArgs, opts ...ResourceOption) (*UpgradeRabbitmq, error)
    public UpgradeRabbitmq(string name, UpgradeRabbitmqArgs args, CustomResourceOptions? opts = null)
    public UpgradeRabbitmq(String name, UpgradeRabbitmqArgs args)
    public UpgradeRabbitmq(String name, UpgradeRabbitmqArgs args, CustomResourceOptions options)
    
    type: cloudamqp:UpgradeRabbitmq
    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 UpgradeRabbitmqArgs
    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 UpgradeRabbitmqArgs
    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 UpgradeRabbitmqArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args UpgradeRabbitmqArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args UpgradeRabbitmqArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var upgradeRabbitmqResource = new CloudAmqp.UpgradeRabbitmq("upgradeRabbitmqResource", new()
    {
        InstanceId = 0,
    });
    
    example, err := cloudamqp.NewUpgradeRabbitmq(ctx, "upgradeRabbitmqResource", &cloudamqp.UpgradeRabbitmqArgs{
    	InstanceId: pulumi.Int(0),
    })
    
    var upgradeRabbitmqResource = new UpgradeRabbitmq("upgradeRabbitmqResource", UpgradeRabbitmqArgs.builder()        
        .instanceId(0)
        .build());
    
    upgrade_rabbitmq_resource = cloudamqp.UpgradeRabbitmq("upgradeRabbitmqResource", instance_id=0)
    
    const upgradeRabbitmqResource = new cloudamqp.UpgradeRabbitmq("upgradeRabbitmqResource", {instanceId: 0});
    
    type: cloudamqp:UpgradeRabbitmq
    properties:
        instanceId: 0
    

    UpgradeRabbitmq Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The UpgradeRabbitmq resource accepts the following input properties:

    InstanceId int
    The CloudAMQP instance identifier
    InstanceId int
    The CloudAMQP instance identifier
    instanceId Integer
    The CloudAMQP instance identifier
    instanceId number
    The CloudAMQP instance identifier
    instance_id int
    The CloudAMQP instance identifier
    instanceId Number
    The CloudAMQP instance identifier

    Outputs

    All input properties are implicitly available as output properties. Additionally, the UpgradeRabbitmq 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 UpgradeRabbitmq Resource

    Get an existing UpgradeRabbitmq 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?: UpgradeRabbitmqState, opts?: CustomResourceOptions): UpgradeRabbitmq
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            instance_id: Optional[int] = None) -> UpgradeRabbitmq
    func GetUpgradeRabbitmq(ctx *Context, name string, id IDInput, state *UpgradeRabbitmqState, opts ...ResourceOption) (*UpgradeRabbitmq, error)
    public static UpgradeRabbitmq Get(string name, Input<string> id, UpgradeRabbitmqState? state, CustomResourceOptions? opts = null)
    public static UpgradeRabbitmq get(String name, Output<String> id, UpgradeRabbitmqState 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.
    The following state arguments are supported:
    InstanceId int
    The CloudAMQP instance identifier
    InstanceId int
    The CloudAMQP instance identifier
    instanceId Integer
    The CloudAMQP instance identifier
    instanceId number
    The CloudAMQP instance identifier
    instance_id int
    The CloudAMQP instance identifier
    instanceId Number
    The CloudAMQP instance identifier

    Import

    Not possible to import this resource.

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    CloudAMQP pulumi/pulumi-cloudamqp
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the cloudamqp Terraform Provider.
    cloudamqp logo
    CloudAMQP v3.17.5 published on Friday, Apr 5, 2024 by Pulumi