Ready to level-up your engineering skills? Join a Pulumi Workshop. Register Now

getCredentials

Use this data source to retrieve information about the credentials of the configured user in Rabbit MQ. Information is extracted from cloudamqp_instance.instance.url.

Argument reference

  • instance_id - (Required) The CloudAMQP instance identifier.

Attribute reference

  • username - (Computed/Sensitive) The username for the configured user in Rabbit MQ.
  • password - (Computed/Sensitive) The password used by the username.

Dependency

This data source depends on CloudAMQP instance identifier, cloudamqp_instance.instance.id.

Example Usage

using Pulumi;
using CloudAmqp = Pulumi.CloudAmqp;

class MyStack : Stack
{
    public MyStack()
    {
        var credentials = Output.Create(CloudAmqp.GetCredentials.InvokeAsync(new CloudAmqp.GetCredentialsArgs
        {
            InstanceId = cloudamqp_instance.Instance.Id,
        }));
    }

}
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.GetCredentials(ctx, &cloudamqp.GetCredentialsArgs{
            InstanceId: cloudamqp_instance.Instance.Id,
        }, nil)
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_cloudamqp as cloudamqp

credentials = cloudamqp.get_credentials(instance_id=cloudamqp_instance["instance"]["id"])
import * as pulumi from "@pulumi/pulumi";
import * as cloudamqp from "@pulumi/cloudamqp";

const credentials = cloudamqp.getCredentials({
    instanceId: cloudamqp_instance.instance.id,
});

Using getCredentials

function getCredentials(args: GetCredentialsArgs, opts?: InvokeOptions): Promise<GetCredentialsResult>
def get_credentials(instance_id: Optional[int] = None, password: Optional[str] = None, username: Optional[str] = None, opts: Optional[InvokeOptions] = None) -> GetCredentialsResult
func GetCredentials(ctx *Context, args *GetCredentialsArgs, opts ...InvokeOption) (*GetCredentialsResult, error)

Note: This function is named GetCredentials in the Go SDK.

public static class GetCredentials {
    public static Task<GetCredentialsResult> InvokeAsync(GetCredentialsArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

InstanceId int
Password string
Username string
InstanceId int
Password string
Username string
instanceId number
password string
username string

getCredentials Result

The following output properties are available:

Id string

The provider-assigned unique ID for this managed resource.

InstanceId int
Password string
Username string
Id string

The provider-assigned unique ID for this managed resource.

InstanceId int
Password string
Username string
id string

The provider-assigned unique ID for this managed resource.

instanceId number
password string
username string
id str

The provider-assigned unique ID for this managed resource.

instance_id int
password str
username str

Package Details

Repository
https://github.com/pulumi/pulumi-cloudamqp
License
Apache-2.0
Notes
This Pulumi package is based on the cloudamqp Terraform Provider.