All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.vault.secrets.kotlin.SyncAzureDestinationArgs.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 6.4.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.vault.secrets.kotlin

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.vault.secrets.SyncAzureDestinationArgs.builder
import kotlin.Any
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as vault from "@pulumi/vault";
 * const az = new vault.secrets.SyncAzureDestination("az", {
 *     name: "az-dest",
 *     keyVaultUri: keyVaultUri,
 *     clientId: clientId,
 *     clientSecret: clientSecret,
 *     tenantId: tenantId,
 *     secretNameTemplate: "vault_{{ .MountAccessor | lowercase }}_{{ .SecretPath | lowercase }}",
 *     customTags: {
 *         foo: "bar",
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_vault as vault
 * az = vault.secrets.SyncAzureDestination("az",
 *     name="az-dest",
 *     key_vault_uri=key_vault_uri,
 *     client_id=client_id,
 *     client_secret=client_secret,
 *     tenant_id=tenant_id,
 *     secret_name_template="vault_{{ .MountAccessor | lowercase }}_{{ .SecretPath | lowercase }}",
 *     custom_tags={
 *         "foo": "bar",
 *     })
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Vault = Pulumi.Vault;
 * return await Deployment.RunAsync(() =>
 * {
 *     var az = new Vault.Secrets.SyncAzureDestination("az", new()
 *     {
 *         Name = "az-dest",
 *         KeyVaultUri = keyVaultUri,
 *         ClientId = clientId,
 *         ClientSecret = clientSecret,
 *         TenantId = tenantId,
 *         SecretNameTemplate = "vault_{{ .MountAccessor | lowercase }}_{{ .SecretPath | lowercase }}",
 *         CustomTags =
 *         {
 *             { "foo", "bar" },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-vault/sdk/v6/go/vault/secrets"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := secrets.NewSyncAzureDestination(ctx, "az", &secrets.SyncAzureDestinationArgs{
 * 			Name:               pulumi.String("az-dest"),
 * 			KeyVaultUri:        pulumi.Any(keyVaultUri),
 * 			ClientId:           pulumi.Any(clientId),
 * 			ClientSecret:       pulumi.Any(clientSecret),
 * 			TenantId:           pulumi.Any(tenantId),
 * 			SecretNameTemplate: pulumi.String("vault_{{ .MountAccessor | lowercase }}_{{ .SecretPath | lowercase }}"),
 * 			CustomTags: pulumi.Map{
 * 				"foo": pulumi.Any("bar"),
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.vault.secrets.SyncAzureDestination;
 * import com.pulumi.vault.secrets.SyncAzureDestinationArgs;
 * 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 az = new SyncAzureDestination("az", SyncAzureDestinationArgs.builder()
 *             .name("az-dest")
 *             .keyVaultUri(keyVaultUri)
 *             .clientId(clientId)
 *             .clientSecret(clientSecret)
 *             .tenantId(tenantId)
 *             .secretNameTemplate("vault_{{ .MountAccessor | lowercase }}_{{ .SecretPath | lowercase }}")
 *             .customTags(Map.of("foo", "bar"))
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   az:
 *     type: vault:secrets:SyncAzureDestination
 *     properties:
 *       name: az-dest
 *       keyVaultUri: ${keyVaultUri}
 *       clientId: ${clientId}
 *       clientSecret: ${clientSecret}
 *       tenantId: ${tenantId}
 *       secretNameTemplate: vault_{{ .MountAccessor | lowercase }}_{{ .SecretPath | lowercase }}
 *       customTags:
 *         foo: bar
 * ```
 * 
 * ## Import
 * Azure Secrets sync destinations can be imported using the `name`, e.g.
 * ```sh
 * $ pulumi import vault:secrets/syncAzureDestination:SyncAzureDestination az az-dest
 * ```
 * @property clientId Client ID of an Azure app registration.
 * Can be omitted and directly provided to Vault using the `AZURE_CLIENT_ID` environment
 * variable.
 * @property clientSecret Client Secret of an Azure app registration.
 * Can be omitted and directly provided to Vault using the `AZURE_CLIENT_SECRET` environment
 * variable.
 * @property cloud Specifies a cloud for the client. The default is Azure Public Cloud.
 * @property customTags Custom tags to set on the secret managed at the destination.
 * @property granularity Determines what level of information is synced as a distinct resource
 * at the destination. Supports `secret-path` and `secret-key`.
 * @property keyVaultUri URI of an existing Azure Key Vault instance.
 * Can be omitted and directly provided to Vault using the `KEY_VAULT_URI` environment
 * variable.
 * @property name Unique name of the Azure destination.
 * @property namespace 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](https://www.terraform.io/docs/providers/vault/index.html#namespace).
 * @property secretNameTemplate Template describing how to generate external secret names.
 * Supports a subset of the Go Template syntax.
 * @property tenantId ID of the target Azure tenant.
 * Can be omitted and directly provided to Vault using the `AZURE_TENANT_ID` environment
 * variable.
 */
public data class SyncAzureDestinationArgs(
    public val clientId: Output? = null,
    public val clientSecret: Output? = null,
    public val cloud: Output? = null,
    public val customTags: Output>? = null,
    public val granularity: Output? = null,
    public val keyVaultUri: Output? = null,
    public val name: Output? = null,
    public val namespace: Output? = null,
    public val secretNameTemplate: Output? = null,
    public val tenantId: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.vault.secrets.SyncAzureDestinationArgs =
        com.pulumi.vault.secrets.SyncAzureDestinationArgs.builder()
            .clientId(clientId?.applyValue({ args0 -> args0 }))
            .clientSecret(clientSecret?.applyValue({ args0 -> args0 }))
            .cloud(cloud?.applyValue({ args0 -> args0 }))
            .customTags(
                customTags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            )
            .granularity(granularity?.applyValue({ args0 -> args0 }))
            .keyVaultUri(keyVaultUri?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .namespace(namespace?.applyValue({ args0 -> args0 }))
            .secretNameTemplate(secretNameTemplate?.applyValue({ args0 -> args0 }))
            .tenantId(tenantId?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [SyncAzureDestinationArgs].
 */
@PulumiTagMarker
public class SyncAzureDestinationArgsBuilder internal constructor() {
    private var clientId: Output? = null

    private var clientSecret: Output? = null

    private var cloud: Output? = null

    private var customTags: Output>? = null

    private var granularity: Output? = null

    private var keyVaultUri: Output? = null

    private var name: Output? = null

    private var namespace: Output? = null

    private var secretNameTemplate: Output? = null

    private var tenantId: Output? = null

    /**
     * @param value Client ID of an Azure app registration.
     * Can be omitted and directly provided to Vault using the `AZURE_CLIENT_ID` environment
     * variable.
     */
    @JvmName("gvdukellvsoviwmk")
    public suspend fun clientId(`value`: Output) {
        this.clientId = value
    }

    /**
     * @param value Client Secret of an Azure app registration.
     * Can be omitted and directly provided to Vault using the `AZURE_CLIENT_SECRET` environment
     * variable.
     */
    @JvmName("ycgykiqxbtnsyiix")
    public suspend fun clientSecret(`value`: Output) {
        this.clientSecret = value
    }

    /**
     * @param value Specifies a cloud for the client. The default is Azure Public Cloud.
     */
    @JvmName("swffixisnfisjynn")
    public suspend fun cloud(`value`: Output) {
        this.cloud = value
    }

    /**
     * @param value Custom tags to set on the secret managed at the destination.
     */
    @JvmName("euoyajcisjnwvsiq")
    public suspend fun customTags(`value`: Output>) {
        this.customTags = value
    }

    /**
     * @param value Determines what level of information is synced as a distinct resource
     * at the destination. Supports `secret-path` and `secret-key`.
     */
    @JvmName("emjfejamflrrtpcb")
    public suspend fun granularity(`value`: Output) {
        this.granularity = value
    }

    /**
     * @param value URI of an existing Azure Key Vault instance.
     * Can be omitted and directly provided to Vault using the `KEY_VAULT_URI` environment
     * variable.
     */
    @JvmName("fbtwymkjtmhwdynb")
    public suspend fun keyVaultUri(`value`: Output) {
        this.keyVaultUri = value
    }

    /**
     * @param value Unique name of the Azure destination.
     */
    @JvmName("pfrsgukisagnbkqr")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value 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](https://www.terraform.io/docs/providers/vault/index.html#namespace).
     */
    @JvmName("eovguuemminqfped")
    public suspend fun namespace(`value`: Output) {
        this.namespace = value
    }

    /**
     * @param value Template describing how to generate external secret names.
     * Supports a subset of the Go Template syntax.
     */
    @JvmName("ypibyjiyemookiem")
    public suspend fun secretNameTemplate(`value`: Output) {
        this.secretNameTemplate = value
    }

    /**
     * @param value ID of the target Azure tenant.
     * Can be omitted and directly provided to Vault using the `AZURE_TENANT_ID` environment
     * variable.
     */
    @JvmName("csagpkvwdootmeia")
    public suspend fun tenantId(`value`: Output) {
        this.tenantId = value
    }

    /**
     * @param value Client ID of an Azure app registration.
     * Can be omitted and directly provided to Vault using the `AZURE_CLIENT_ID` environment
     * variable.
     */
    @JvmName("exlvjyorkmyvqcwv")
    public suspend fun clientId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.clientId = mapped
    }

    /**
     * @param value Client Secret of an Azure app registration.
     * Can be omitted and directly provided to Vault using the `AZURE_CLIENT_SECRET` environment
     * variable.
     */
    @JvmName("omipeqvcbuefseyk")
    public suspend fun clientSecret(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.clientSecret = mapped
    }

    /**
     * @param value Specifies a cloud for the client. The default is Azure Public Cloud.
     */
    @JvmName("vbcudlniiasluyad")
    public suspend fun cloud(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.cloud = mapped
    }

    /**
     * @param value Custom tags to set on the secret managed at the destination.
     */
    @JvmName("bxxfijoejcrfbhhm")
    public suspend fun customTags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.customTags = mapped
    }

    /**
     * @param values Custom tags to set on the secret managed at the destination.
     */
    @JvmName("itvelirudxnciomi")
    public fun customTags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.customTags = mapped
    }

    /**
     * @param value Determines what level of information is synced as a distinct resource
     * at the destination. Supports `secret-path` and `secret-key`.
     */
    @JvmName("biaimopbqgkysqgg")
    public suspend fun granularity(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.granularity = mapped
    }

    /**
     * @param value URI of an existing Azure Key Vault instance.
     * Can be omitted and directly provided to Vault using the `KEY_VAULT_URI` environment
     * variable.
     */
    @JvmName("akumkjfrabamwtqa")
    public suspend fun keyVaultUri(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.keyVaultUri = mapped
    }

    /**
     * @param value Unique name of the Azure destination.
     */
    @JvmName("nmshlikjxhxmbyfb")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value 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](https://www.terraform.io/docs/providers/vault/index.html#namespace).
     */
    @JvmName("pyavgposelfbvqns")
    public suspend fun namespace(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.namespace = mapped
    }

    /**
     * @param value Template describing how to generate external secret names.
     * Supports a subset of the Go Template syntax.
     */
    @JvmName("lqmpislyvamhxohv")
    public suspend fun secretNameTemplate(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.secretNameTemplate = mapped
    }

    /**
     * @param value ID of the target Azure tenant.
     * Can be omitted and directly provided to Vault using the `AZURE_TENANT_ID` environment
     * variable.
     */
    @JvmName("mktlvoioecajhpnn")
    public suspend fun tenantId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tenantId = mapped
    }

    internal fun build(): SyncAzureDestinationArgs = SyncAzureDestinationArgs(
        clientId = clientId,
        clientSecret = clientSecret,
        cloud = cloud,
        customTags = customTags,
        granularity = granularity,
        keyVaultUri = keyVaultUri,
        name = name,
        namespace = namespace,
        secretNameTemplate = secretNameTemplate,
        tenantId = tenantId,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy