SecretBackendRoleArgs

data class SecretBackendRoleArgs(val backend: Output<String>? = null, val name: Output<String>? = null, val namespace: Output<String>? = null, val tags: Output<String>? = null, val vhostTopics: Output<List<SecretBackendRoleVhostTopicArgs>>? = null, val vhosts: Output<List<SecretBackendRoleVhostArgs>>? = null) : ConvertibleToJava<SecretBackendRoleArgs>

Example Usage

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,
name: "deploy",
tags: "tag1,tag2",
vhosts: [{
host: "/",
configure: "",
read: ".*",
write: "",
}],
vhostTopics: [{
vhosts: [{
topic: "amq.topic",
read: ".*",
write: "",
}],
host: "/",
}],
});
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,
name="deploy",
tags="tag1,tag2",
vhosts=[{
"host": "/",
"configure": "",
"read": ".*",
"write": "",
}],
vhost_topics=[{
"vhosts": [{
"topic": "amq.topic",
"read": ".*",
"write": "",
}],
"host": "/",
}])
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,
Name = "deploy",
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/v6/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,
Name: pulumi.String("deploy"),
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())
.name("deploy")
.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());
}
}
resources:
rabbitmq:
type: vault:rabbitMq:SecretBackend
properties:
connectionUri: https://.....
username: user
password: password
role:
type: vault:rabbitMq:SecretBackendRole
properties:
backend: ${rabbitmq.path}
name: deploy
tags: tag1,tag2
vhosts:
- host: /
configure: ""
read: .*
write: ""
vhostTopics:
- vhosts:
- topic: amq.topic
read: .*
write: ""
host: /

Import

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

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

Constructors

Link copied to clipboard
constructor(backend: Output<String>? = null, name: Output<String>? = null, namespace: Output<String>? = null, tags: Output<String>? = null, vhostTopics: Output<List<SecretBackendRoleVhostTopicArgs>>? = null, vhosts: Output<List<SecretBackendRoleVhostArgs>>? = null)

Properties

Link copied to clipboard
val backend: Output<String>? = null

The path the RabbitMQ secret backend is mounted at, with no leading or trailing /s.

Link copied to clipboard
val name: Output<String>? = null

The name to identify this role within the backend. Must be unique within the backend.

Link copied to clipboard
val namespace: Output<String>? = null

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.

Link copied to clipboard
val tags: Output<String>? = null

Specifies a comma-separated RabbitMQ management tags.

Link copied to clipboard
val vhosts: Output<List<SecretBackendRoleVhostArgs>>? = null

Specifies a map of virtual hosts to permissions.

Link copied to clipboard

Specifies a map of virtual hosts and exchanges to topic permissions. This option requires RabbitMQ 3.7.0 or later.

Functions

Link copied to clipboard
open override fun toJava(): SecretBackendRoleArgs