vault.mongodbatlas.SecretBackend
Explore with Pulumi AI
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as vault from "@pulumi/vault";
const mongo = new vault.Mount("mongo", {
path: "mongodbatlas",
type: "mongodbatlas",
description: "MongoDB Atlas secret engine mount",
});
const config = new vault.mongodbatlas.SecretBackend("config", {
mount: mongo.path,
privateKey: "privateKey",
publicKey: "publicKey",
});
import pulumi
import pulumi_vault as vault
mongo = vault.Mount("mongo",
path="mongodbatlas",
type="mongodbatlas",
description="MongoDB Atlas secret engine mount")
config = vault.mongodbatlas.SecretBackend("config",
mount=mongo.path,
private_key="privateKey",
public_key="publicKey")
package main
import (
"github.com/pulumi/pulumi-vault/sdk/v6/go/vault"
"github.com/pulumi/pulumi-vault/sdk/v6/go/vault/mongodbatlas"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
mongo, err := vault.NewMount(ctx, "mongo", &vault.MountArgs{
Path: pulumi.String("mongodbatlas"),
Type: pulumi.String("mongodbatlas"),
Description: pulumi.String("MongoDB Atlas secret engine mount"),
})
if err != nil {
return err
}
_, err = mongodbatlas.NewSecretBackend(ctx, "config", &mongodbatlas.SecretBackendArgs{
Mount: mongo.Path,
PrivateKey: pulumi.String("privateKey"),
PublicKey: pulumi.String("publicKey"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Vault = Pulumi.Vault;
return await Deployment.RunAsync(() =>
{
var mongo = new Vault.Mount("mongo", new()
{
Path = "mongodbatlas",
Type = "mongodbatlas",
Description = "MongoDB Atlas secret engine mount",
});
var config = new Vault.MongoDBAtlas.SecretBackend("config", new()
{
Mount = mongo.Path,
PrivateKey = "privateKey",
PublicKey = "publicKey",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.vault.Mount;
import com.pulumi.vault.MountArgs;
import com.pulumi.vault.mongodbatlas.SecretBackend;
import com.pulumi.vault.mongodbatlas.SecretBackendArgs;
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 mongo = new Mount("mongo", MountArgs.builder()
.path("mongodbatlas")
.type("mongodbatlas")
.description("MongoDB Atlas secret engine mount")
.build());
var config = new SecretBackend("config", SecretBackendArgs.builder()
.mount(mongo.path())
.privateKey("privateKey")
.publicKey("publicKey")
.build());
}
}
resources:
mongo:
type: vault:Mount
properties:
path: mongodbatlas
type: mongodbatlas
description: MongoDB Atlas secret engine mount
config:
type: vault:mongodbatlas:SecretBackend
properties:
mount: ${mongo.path}
privateKey: privateKey
publicKey: publicKey
Create SecretBackend Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new SecretBackend(name: string, args: SecretBackendArgs, opts?: CustomResourceOptions);
@overload
def SecretBackend(resource_name: str,
args: SecretBackendArgs,
opts: Optional[ResourceOptions] = None)
@overload
def SecretBackend(resource_name: str,
opts: Optional[ResourceOptions] = None,
mount: Optional[str] = None,
private_key: Optional[str] = None,
public_key: Optional[str] = None,
namespace: Optional[str] = None)
func NewSecretBackend(ctx *Context, name string, args SecretBackendArgs, opts ...ResourceOption) (*SecretBackend, error)
public SecretBackend(string name, SecretBackendArgs args, CustomResourceOptions? opts = null)
public SecretBackend(String name, SecretBackendArgs args)
public SecretBackend(String name, SecretBackendArgs args, CustomResourceOptions options)
type: vault:mongodbatlas:SecretBackend
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 SecretBackendArgs
- 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 SecretBackendArgs
- 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 SecretBackendArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SecretBackendArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SecretBackendArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var examplesecretBackendResourceResourceFromMongodbatlassecretBackend = new Vault.MongoDBAtlas.SecretBackend("examplesecretBackendResourceResourceFromMongodbatlassecretBackend", new()
{
Mount = "string",
PrivateKey = "string",
PublicKey = "string",
Namespace = "string",
});
example, err := mongodbatlas.NewSecretBackend(ctx, "examplesecretBackendResourceResourceFromMongodbatlassecretBackend", &mongodbatlas.SecretBackendArgs{
Mount: pulumi.String("string"),
PrivateKey: pulumi.String("string"),
PublicKey: pulumi.String("string"),
Namespace: pulumi.String("string"),
})
var examplesecretBackendResourceResourceFromMongodbatlassecretBackend = new SecretBackend("examplesecretBackendResourceResourceFromMongodbatlassecretBackend", SecretBackendArgs.builder()
.mount("string")
.privateKey("string")
.publicKey("string")
.namespace("string")
.build());
examplesecret_backend_resource_resource_from_mongodbatlassecret_backend = vault.mongodbatlas.SecretBackend("examplesecretBackendResourceResourceFromMongodbatlassecretBackend",
mount="string",
private_key="string",
public_key="string",
namespace="string")
const examplesecretBackendResourceResourceFromMongodbatlassecretBackend = new vault.mongodbatlas.SecretBackend("examplesecretBackendResourceResourceFromMongodbatlassecretBackend", {
mount: "string",
privateKey: "string",
publicKey: "string",
namespace: "string",
});
type: vault:mongodbatlas:SecretBackend
properties:
mount: string
namespace: string
privateKey: string
publicKey: string
SecretBackend Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The SecretBackend resource accepts the following input properties:
- Mount string
- Path where the MongoDB Atlas Secrets Engine is mounted.
- Private
Key string - Specifies the Private API Key used to authenticate with the MongoDB Atlas API.
- Public
Key string - Specifies the Public API Key used to authenticate with the MongoDB Atlas API.
- 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.
- Mount string
- Path where the MongoDB Atlas Secrets Engine is mounted.
- Private
Key string - Specifies the Private API Key used to authenticate with the MongoDB Atlas API.
- Public
Key string - Specifies the Public API Key used to authenticate with the MongoDB Atlas API.
- 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.
- mount String
- Path where the MongoDB Atlas Secrets Engine is mounted.
- private
Key String - Specifies the Private API Key used to authenticate with the MongoDB Atlas API.
- public
Key String - Specifies the Public API Key used to authenticate with the MongoDB Atlas API.
- 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.
- mount string
- Path where the MongoDB Atlas Secrets Engine is mounted.
- private
Key string - Specifies the Private API Key used to authenticate with the MongoDB Atlas API.
- public
Key string - Specifies the Public API Key used to authenticate with the MongoDB Atlas API.
- 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.
- mount str
- Path where the MongoDB Atlas Secrets Engine is mounted.
- private_
key str - Specifies the Private API Key used to authenticate with the MongoDB Atlas API.
- public_
key str - Specifies the Public API Key used to authenticate with the MongoDB Atlas API.
- 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.
- mount String
- Path where the MongoDB Atlas Secrets Engine is mounted.
- private
Key String - Specifies the Private API Key used to authenticate with the MongoDB Atlas API.
- public
Key String - Specifies the Public API Key used to authenticate with the MongoDB Atlas API.
- 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.
Outputs
All input properties are implicitly available as output properties. Additionally, the SecretBackend resource produces the following output properties:
Look up Existing SecretBackend Resource
Get an existing SecretBackend 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?: SecretBackendState, opts?: CustomResourceOptions): SecretBackend
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
mount: Optional[str] = None,
namespace: Optional[str] = None,
path: Optional[str] = None,
private_key: Optional[str] = None,
public_key: Optional[str] = None) -> SecretBackend
func GetSecretBackend(ctx *Context, name string, id IDInput, state *SecretBackendState, opts ...ResourceOption) (*SecretBackend, error)
public static SecretBackend Get(string name, Input<string> id, SecretBackendState? state, CustomResourceOptions? opts = null)
public static SecretBackend get(String name, Output<String> id, SecretBackendState 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.
- Mount string
- Path where the MongoDB Atlas Secrets Engine is mounted.
- 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. - Path string
- Path where MongoDB Atlas configuration is located
- Private
Key string - Specifies the Private API Key used to authenticate with the MongoDB Atlas API.
- Public
Key string - Specifies the Public API Key used to authenticate with the MongoDB Atlas API.
- Mount string
- Path where the MongoDB Atlas Secrets Engine is mounted.
- 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. - Path string
- Path where MongoDB Atlas configuration is located
- Private
Key string - Specifies the Private API Key used to authenticate with the MongoDB Atlas API.
- Public
Key string - Specifies the Public API Key used to authenticate with the MongoDB Atlas API.
- mount String
- Path where the MongoDB Atlas Secrets Engine is mounted.
- 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. - path String
- Path where MongoDB Atlas configuration is located
- private
Key String - Specifies the Private API Key used to authenticate with the MongoDB Atlas API.
- public
Key String - Specifies the Public API Key used to authenticate with the MongoDB Atlas API.
- mount string
- Path where the MongoDB Atlas Secrets Engine is mounted.
- 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. - path string
- Path where MongoDB Atlas configuration is located
- private
Key string - Specifies the Private API Key used to authenticate with the MongoDB Atlas API.
- public
Key string - Specifies the Public API Key used to authenticate with the MongoDB Atlas API.
- mount str
- Path where the MongoDB Atlas Secrets Engine is mounted.
- 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. - path str
- Path where MongoDB Atlas configuration is located
- private_
key str - Specifies the Private API Key used to authenticate with the MongoDB Atlas API.
- public_
key str - Specifies the Public API Key used to authenticate with the MongoDB Atlas API.
- mount String
- Path where the MongoDB Atlas Secrets Engine is mounted.
- 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. - path String
- Path where MongoDB Atlas configuration is located
- private
Key String - Specifies the Private API Key used to authenticate with the MongoDB Atlas API.
- public
Key String - Specifies the Public API Key used to authenticate with the MongoDB Atlas API.
Import
MongoDB Atlas secret backends can be imported using the ${mount}/config
, e.g.
$ pulumi import vault:mongodbatlas/secretBackend:SecretBackend config mongodbatlas/config
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Vault pulumi/pulumi-vault
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
vault
Terraform Provider.