1. Packages
  2. HashiCorp Vault
  3. API Docs
  4. rabbitMq
  5. SecretBackendRole
HashiCorp Vault v5.20.0 published on Tuesday, Feb 20, 2024 by Pulumi

vault.rabbitMq.SecretBackendRole

Explore with Pulumi AI

vault logo
HashiCorp Vault v5.20.0 published on Tuesday, Feb 20, 2024 by Pulumi

    Import

    RabbitMQ secret backend roles can be imported using the path, e.g.

     $ pulumi import vault:rabbitMq/secretBackendRole:SecretBackendRole role rabbitmq/roles/deploy
    

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Vault = Pulumi.Vault;
    
    return await Deployment.RunAsync(() => 
    {
        var rabbitmq = new Vault.RabbitMQ.SecretBackend("rabbitmq", new()
        {
            ConnectionUri = "https://.....",
            Username = "user",
            Password = "password",
        });
    
        var role = new Vault.RabbitMQ.SecretBackendRole("role", new()
        {
            Backend = rabbitmq.Path,
            Tags = "tag1,tag2",
            Vhosts = new[]
            {
                new Vault.RabbitMQ.Inputs.SecretBackendRoleVhostArgs
                {
                    Host = "/",
                    Configure = "",
                    Read = ".*",
                    Write = "",
                },
            },
            VhostTopics = new[]
            {
                new Vault.RabbitMQ.Inputs.SecretBackendRoleVhostTopicArgs
                {
                    Vhosts = new[]
                    {
                        new Vault.RabbitMQ.Inputs.SecretBackendRoleVhostTopicVhostArgs
                        {
                            Topic = "amq.topic",
                            Read = ".*",
                            Write = "",
                        },
                    },
                    Host = "/",
                },
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-vault/sdk/v5/go/vault/rabbitMq"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		rabbitmq, err := rabbitMq.NewSecretBackend(ctx, "rabbitmq", &rabbitMq.SecretBackendArgs{
    			ConnectionUri: pulumi.String("https://....."),
    			Username:      pulumi.String("user"),
    			Password:      pulumi.String("password"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = rabbitMq.NewSecretBackendRole(ctx, "role", &rabbitMq.SecretBackendRoleArgs{
    			Backend: rabbitmq.Path,
    			Tags:    pulumi.String("tag1,tag2"),
    			Vhosts: rabbitmq.SecretBackendRoleVhostArray{
    				&rabbitmq.SecretBackendRoleVhostArgs{
    					Host:      pulumi.String("/"),
    					Configure: pulumi.String(""),
    					Read:      pulumi.String(".*"),
    					Write:     pulumi.String(""),
    				},
    			},
    			VhostTopics: rabbitmq.SecretBackendRoleVhostTopicArray{
    				&rabbitmq.SecretBackendRoleVhostTopicArgs{
    					Vhosts: rabbitmq.SecretBackendRoleVhostTopicVhostArray{
    						&rabbitmq.SecretBackendRoleVhostTopicVhostArgs{
    							Topic: pulumi.String("amq.topic"),
    							Read:  pulumi.String(".*"),
    							Write: pulumi.String(""),
    						},
    					},
    					Host: pulumi.String("/"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.vault.rabbitMq.SecretBackend;
    import com.pulumi.vault.rabbitMq.SecretBackendArgs;
    import com.pulumi.vault.rabbitMq.SecretBackendRole;
    import com.pulumi.vault.rabbitMq.SecretBackendRoleArgs;
    import com.pulumi.vault.rabbitMq.inputs.SecretBackendRoleVhostArgs;
    import com.pulumi.vault.rabbitMq.inputs.SecretBackendRoleVhostTopicArgs;
    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) {
            var rabbitmq = new SecretBackend("rabbitmq", SecretBackendArgs.builder()        
                .connectionUri("https://.....")
                .username("user")
                .password("password")
                .build());
    
            var role = new SecretBackendRole("role", SecretBackendRoleArgs.builder()        
                .backend(rabbitmq.path())
                .tags("tag1,tag2")
                .vhosts(SecretBackendRoleVhostArgs.builder()
                    .host("/")
                    .configure("")
                    .read(".*")
                    .write("")
                    .build())
                .vhostTopics(SecretBackendRoleVhostTopicArgs.builder()
                    .vhosts(SecretBackendRoleVhostTopicVhostArgs.builder()
                        .topic("amq.topic")
                        .read(".*")
                        .write("")
                        .build())
                    .host("/")
                    .build())
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_vault as vault
    
    rabbitmq = vault.rabbit_mq.SecretBackend("rabbitmq",
        connection_uri="https://.....",
        username="user",
        password="password")
    role = vault.rabbit_mq.SecretBackendRole("role",
        backend=rabbitmq.path,
        tags="tag1,tag2",
        vhosts=[vault.rabbit_mq.SecretBackendRoleVhostArgs(
            host="/",
            configure="",
            read=".*",
            write="",
        )],
        vhost_topics=[vault.rabbit_mq.SecretBackendRoleVhostTopicArgs(
            vhosts=[vault.rabbit_mq.SecretBackendRoleVhostTopicVhostArgs(
                topic="amq.topic",
                read=".*",
                write="",
            )],
            host="/",
        )])
    
    import * as pulumi from "@pulumi/pulumi";
    import * as vault from "@pulumi/vault";
    
    const rabbitmq = new vault.rabbitmq.SecretBackend("rabbitmq", {
        connectionUri: "https://.....",
        username: "user",
        password: "password",
    });
    const role = new vault.rabbitmq.SecretBackendRole("role", {
        backend: rabbitmq.path,
        tags: "tag1,tag2",
        vhosts: [{
            host: "/",
            configure: "",
            read: ".*",
            write: "",
        }],
        vhostTopics: [{
            vhosts: [{
                topic: "amq.topic",
                read: ".*",
                write: "",
            }],
            host: "/",
        }],
    });
    
    resources:
      rabbitmq:
        type: vault:rabbitMq:SecretBackend
        properties:
          connectionUri: https://.....
          username: user
          password: password
      role:
        type: vault:rabbitMq:SecretBackendRole
        properties:
          backend: ${rabbitmq.path}
          tags: tag1,tag2
          vhosts:
            - host: /
              configure:
              read: .*
              write:
          vhostTopics:
            - vhosts:
                - topic: amq.topic
                  read: .*
                  write:
              host: /
    

    Create SecretBackendRole Resource

    new SecretBackendRole(name: string, args: SecretBackendRoleArgs, opts?: CustomResourceOptions);
    @overload
    def SecretBackendRole(resource_name: str,
                          opts: Optional[ResourceOptions] = None,
                          backend: Optional[str] = None,
                          name: Optional[str] = None,
                          namespace: Optional[str] = None,
                          tags: Optional[str] = None,
                          vhost_topics: Optional[Sequence[_rabbitmq.SecretBackendRoleVhostTopicArgs]] = None,
                          vhosts: Optional[Sequence[_rabbitmq.SecretBackendRoleVhostArgs]] = None)
    @overload
    def SecretBackendRole(resource_name: str,
                          args: SecretBackendRoleArgs,
                          opts: Optional[ResourceOptions] = None)
    func NewSecretBackendRole(ctx *Context, name string, args SecretBackendRoleArgs, opts ...ResourceOption) (*SecretBackendRole, error)
    public SecretBackendRole(string name, SecretBackendRoleArgs args, CustomResourceOptions? opts = null)
    public SecretBackendRole(String name, SecretBackendRoleArgs args)
    public SecretBackendRole(String name, SecretBackendRoleArgs args, CustomResourceOptions options)
    
    type: vault:rabbitMq:SecretBackendRole
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args SecretBackendRoleArgs
    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 SecretBackendRoleArgs
    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 SecretBackendRoleArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SecretBackendRoleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SecretBackendRoleArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    SecretBackendRole 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 SecretBackendRole resource accepts the following input properties:

    Backend string
    The path the RabbitMQ secret backend is mounted at, with no leading or trailing /s.
    Name string
    The name to identify this role within the backend. Must be unique within the backend.
    Namespace string
    The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace. Available only for Vault Enterprise.
    Tags string
    Specifies a comma-separated RabbitMQ management tags.
    VhostTopics List<SecretBackendRoleVhostTopic>
    Specifies a map of virtual hosts and exchanges to topic permissions. This option requires RabbitMQ 3.7.0 or later.
    Vhosts List<SecretBackendRoleVhost>
    Specifies a map of virtual hosts to permissions.
    Backend string
    The path the RabbitMQ secret backend is mounted at, with no leading or trailing /s.
    Name string
    The name to identify this role within the backend. Must be unique within the backend.
    Namespace string
    The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace. Available only for Vault Enterprise.
    Tags string
    Specifies a comma-separated RabbitMQ management tags.
    VhostTopics []SecretBackendRoleVhostTopicArgs
    Specifies a map of virtual hosts and exchanges to topic permissions. This option requires RabbitMQ 3.7.0 or later.
    Vhosts []SecretBackendRoleVhostArgs
    Specifies a map of virtual hosts to permissions.
    backend String
    The path the RabbitMQ secret backend is mounted at, with no leading or trailing /s.
    name String
    The name to identify this role within the backend. Must be unique within the backend.
    namespace String
    The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace. Available only for Vault Enterprise.
    tags String
    Specifies a comma-separated RabbitMQ management tags.
    vhostTopics List<SecretBackendRoleVhostTopic>
    Specifies a map of virtual hosts and exchanges to topic permissions. This option requires RabbitMQ 3.7.0 or later.
    vhosts List<SecretBackendRoleVhost>
    Specifies a map of virtual hosts to permissions.
    backend string
    The path the RabbitMQ secret backend is mounted at, with no leading or trailing /s.
    name string
    The name to identify this role within the backend. Must be unique within the backend.
    namespace string
    The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace. Available only for Vault Enterprise.
    tags string
    Specifies a comma-separated RabbitMQ management tags.
    vhostTopics SecretBackendRoleVhostTopic[]
    Specifies a map of virtual hosts and exchanges to topic permissions. This option requires RabbitMQ 3.7.0 or later.
    vhosts SecretBackendRoleVhost[]
    Specifies a map of virtual hosts to permissions.
    backend str
    The path the RabbitMQ secret backend is mounted at, with no leading or trailing /s.
    name str
    The name to identify this role within the backend. Must be unique within the backend.
    namespace str
    The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace. Available only for Vault Enterprise.
    tags str
    Specifies a comma-separated RabbitMQ management tags.
    vhost_topics SecretBackendRoleVhostTopicArgs]
    Specifies a map of virtual hosts and exchanges to topic permissions. This option requires RabbitMQ 3.7.0 or later.
    vhosts SecretBackendRoleVhostArgs]
    Specifies a map of virtual hosts to permissions.
    backend String
    The path the RabbitMQ secret backend is mounted at, with no leading or trailing /s.
    name String
    The name to identify this role within the backend. Must be unique within the backend.
    namespace String
    The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace. Available only for Vault Enterprise.
    tags String
    Specifies a comma-separated RabbitMQ management tags.
    vhostTopics List<Property Map>
    Specifies a map of virtual hosts and exchanges to topic permissions. This option requires RabbitMQ 3.7.0 or later.
    vhosts List<Property Map>
    Specifies a map of virtual hosts to permissions.

    Outputs

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

    Get an existing SecretBackendRole 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?: SecretBackendRoleState, opts?: CustomResourceOptions): SecretBackendRole
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            backend: Optional[str] = None,
            name: Optional[str] = None,
            namespace: Optional[str] = None,
            tags: Optional[str] = None,
            vhost_topics: Optional[Sequence[_rabbitmq.SecretBackendRoleVhostTopicArgs]] = None,
            vhosts: Optional[Sequence[_rabbitmq.SecretBackendRoleVhostArgs]] = None) -> SecretBackendRole
    func GetSecretBackendRole(ctx *Context, name string, id IDInput, state *SecretBackendRoleState, opts ...ResourceOption) (*SecretBackendRole, error)
    public static SecretBackendRole Get(string name, Input<string> id, SecretBackendRoleState? state, CustomResourceOptions? opts = null)
    public static SecretBackendRole get(String name, Output<String> id, SecretBackendRoleState 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:
    Backend string
    The path the RabbitMQ secret backend is mounted at, with no leading or trailing /s.
    Name string
    The name to identify this role within the backend. Must be unique within the backend.
    Namespace string
    The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace. Available only for Vault Enterprise.
    Tags string
    Specifies a comma-separated RabbitMQ management tags.
    VhostTopics List<SecretBackendRoleVhostTopic>
    Specifies a map of virtual hosts and exchanges to topic permissions. This option requires RabbitMQ 3.7.0 or later.
    Vhosts List<SecretBackendRoleVhost>
    Specifies a map of virtual hosts to permissions.
    Backend string
    The path the RabbitMQ secret backend is mounted at, with no leading or trailing /s.
    Name string
    The name to identify this role within the backend. Must be unique within the backend.
    Namespace string
    The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace. Available only for Vault Enterprise.
    Tags string
    Specifies a comma-separated RabbitMQ management tags.
    VhostTopics []SecretBackendRoleVhostTopicArgs
    Specifies a map of virtual hosts and exchanges to topic permissions. This option requires RabbitMQ 3.7.0 or later.
    Vhosts []SecretBackendRoleVhostArgs
    Specifies a map of virtual hosts to permissions.
    backend String
    The path the RabbitMQ secret backend is mounted at, with no leading or trailing /s.
    name String
    The name to identify this role within the backend. Must be unique within the backend.
    namespace String
    The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace. Available only for Vault Enterprise.
    tags String
    Specifies a comma-separated RabbitMQ management tags.
    vhostTopics List<SecretBackendRoleVhostTopic>
    Specifies a map of virtual hosts and exchanges to topic permissions. This option requires RabbitMQ 3.7.0 or later.
    vhosts List<SecretBackendRoleVhost>
    Specifies a map of virtual hosts to permissions.
    backend string
    The path the RabbitMQ secret backend is mounted at, with no leading or trailing /s.
    name string
    The name to identify this role within the backend. Must be unique within the backend.
    namespace string
    The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace. Available only for Vault Enterprise.
    tags string
    Specifies a comma-separated RabbitMQ management tags.
    vhostTopics SecretBackendRoleVhostTopic[]
    Specifies a map of virtual hosts and exchanges to topic permissions. This option requires RabbitMQ 3.7.0 or later.
    vhosts SecretBackendRoleVhost[]
    Specifies a map of virtual hosts to permissions.
    backend str
    The path the RabbitMQ secret backend is mounted at, with no leading or trailing /s.
    name str
    The name to identify this role within the backend. Must be unique within the backend.
    namespace str
    The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace. Available only for Vault Enterprise.
    tags str
    Specifies a comma-separated RabbitMQ management tags.
    vhost_topics SecretBackendRoleVhostTopicArgs]
    Specifies a map of virtual hosts and exchanges to topic permissions. This option requires RabbitMQ 3.7.0 or later.
    vhosts SecretBackendRoleVhostArgs]
    Specifies a map of virtual hosts to permissions.
    backend String
    The path the RabbitMQ secret backend is mounted at, with no leading or trailing /s.
    name String
    The name to identify this role within the backend. Must be unique within the backend.
    namespace String
    The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace. Available only for Vault Enterprise.
    tags String
    Specifies a comma-separated RabbitMQ management tags.
    vhostTopics List<Property Map>
    Specifies a map of virtual hosts and exchanges to topic permissions. This option requires RabbitMQ 3.7.0 or later.
    vhosts List<Property Map>
    Specifies a map of virtual hosts to permissions.

    Supporting Types

    SecretBackendRoleVhost, SecretBackendRoleVhostArgs

    Configure string
    The configure permissions for this vhost.
    Host string
    The vhost to set permissions for.
    Read string
    The read permissions for this vhost.
    Write string
    The write permissions for this vhost.
    Configure string
    The configure permissions for this vhost.
    Host string
    The vhost to set permissions for.
    Read string
    The read permissions for this vhost.
    Write string
    The write permissions for this vhost.
    configure String
    The configure permissions for this vhost.
    host String
    The vhost to set permissions for.
    read String
    The read permissions for this vhost.
    write String
    The write permissions for this vhost.
    configure string
    The configure permissions for this vhost.
    host string
    The vhost to set permissions for.
    read string
    The read permissions for this vhost.
    write string
    The write permissions for this vhost.
    configure str
    The configure permissions for this vhost.
    host str
    The vhost to set permissions for.
    read str
    The read permissions for this vhost.
    write str
    The write permissions for this vhost.
    configure String
    The configure permissions for this vhost.
    host String
    The vhost to set permissions for.
    read String
    The read permissions for this vhost.
    write String
    The write permissions for this vhost.

    SecretBackendRoleVhostTopic, SecretBackendRoleVhostTopicArgs

    Host string
    The vhost to set permissions for.
    Vhosts List<SecretBackendRoleVhostTopicVhost>
    Specifies a map of virtual hosts to permissions.
    Host string
    The vhost to set permissions for.
    Vhosts []SecretBackendRoleVhostTopicVhost
    Specifies a map of virtual hosts to permissions.
    host String
    The vhost to set permissions for.
    vhosts List<SecretBackendRoleVhostTopicVhost>
    Specifies a map of virtual hosts to permissions.
    host string
    The vhost to set permissions for.
    vhosts SecretBackendRoleVhostTopicVhost[]
    Specifies a map of virtual hosts to permissions.
    host str
    The vhost to set permissions for.
    vhosts SecretBackendRoleVhostTopicVhost]
    Specifies a map of virtual hosts to permissions.
    host String
    The vhost to set permissions for.
    vhosts List<Property Map>
    Specifies a map of virtual hosts to permissions.

    SecretBackendRoleVhostTopicVhost, SecretBackendRoleVhostTopicVhostArgs

    Read string
    The read permissions for this vhost.
    Topic string
    The vhost to set permissions for.
    Write string
    The write permissions for this vhost.
    Read string
    The read permissions for this vhost.
    Topic string
    The vhost to set permissions for.
    Write string
    The write permissions for this vhost.
    read String
    The read permissions for this vhost.
    topic String
    The vhost to set permissions for.
    write String
    The write permissions for this vhost.
    read string
    The read permissions for this vhost.
    topic string
    The vhost to set permissions for.
    write string
    The write permissions for this vhost.
    read str
    The read permissions for this vhost.
    topic str
    The vhost to set permissions for.
    write str
    The write permissions for this vhost.
    read String
    The read permissions for this vhost.
    topic String
    The vhost to set permissions for.
    write String
    The write permissions for this vhost.

    Package Details

    Repository
    Vault pulumi/pulumi-vault
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the vault Terraform Provider.
    vault logo
    HashiCorp Vault v5.20.0 published on Tuesday, Feb 20, 2024 by Pulumi