
com.pulumi.vault.azure.kotlin.AuthBackendConfigArgs.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.vault.azure.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.azure.AuthBackendConfigArgs.builder
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName
/**
* ## Example Usage
* You can setup the Azure auth engine with Workload Identity Federation (WIF) for a secret-less configuration:
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as vault from "@pulumi/vault";
* const example = new vault.AuthBackend("example", {
* type: "azure",
* identityTokenKey: "example-key",
* });
* const exampleAuthBackendConfig = new vault.azure.AuthBackendConfig("example", {
* backend: example.path,
* tenantId: "11111111-2222-3333-4444-555555555555",
* clientId: "11111111-2222-3333-4444-555555555555",
* identityTokenAudience: "",
* identityTokenTtl: "",
* });
* ```
* ```python
* import pulumi
* import pulumi_vault as vault
* example = vault.AuthBackend("example",
* type="azure",
* identity_token_key="example-key")
* example_auth_backend_config = vault.azure.AuthBackendConfig("example",
* backend=example.path,
* tenant_id="11111111-2222-3333-4444-555555555555",
* client_id="11111111-2222-3333-4444-555555555555",
* identity_token_audience="",
* identity_token_ttl="")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Vault = Pulumi.Vault;
* return await Deployment.RunAsync(() =>
* {
* var example = new Vault.AuthBackend("example", new()
* {
* Type = "azure",
* IdentityTokenKey = "example-key",
* });
* var exampleAuthBackendConfig = new Vault.Azure.AuthBackendConfig("example", new()
* {
* Backend = example.Path,
* TenantId = "11111111-2222-3333-4444-555555555555",
* ClientId = "11111111-2222-3333-4444-555555555555",
* IdentityTokenAudience = "",
* IdentityTokenTtl = "",
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-vault/sdk/v6/go/vault"
* "github.com/pulumi/pulumi-vault/sdk/v6/go/vault/azure"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* example, err := vault.NewAuthBackend(ctx, "example", &vault.AuthBackendArgs{
* Type: pulumi.String("azure"),
* IdentityTokenKey: pulumi.String("example-key"),
* })
* if err != nil {
* return err
* }
* _, err = azure.NewAuthBackendConfig(ctx, "example", &azure.AuthBackendConfigArgs{
* Backend: example.Path,
* TenantId: pulumi.String("11111111-2222-3333-4444-555555555555"),
* ClientId: pulumi.String("11111111-2222-3333-4444-555555555555"),
* IdentityTokenAudience: pulumi.String(""),
* IdentityTokenTtl: pulumi.Int(""),
* })
* 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.AuthBackend;
* import com.pulumi.vault.AuthBackendArgs;
* import com.pulumi.vault.azure.AuthBackendConfig;
* import com.pulumi.vault.azure.AuthBackendConfigArgs;
* 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 example = new AuthBackend("example", AuthBackendArgs.builder()
* .type("azure")
* .identityTokenKey("example-key")
* .build());
* var exampleAuthBackendConfig = new AuthBackendConfig("exampleAuthBackendConfig", AuthBackendConfigArgs.builder()
* .backend(example.path())
* .tenantId("11111111-2222-3333-4444-555555555555")
* .clientId("11111111-2222-3333-4444-555555555555")
* .identityTokenAudience("")
* .identityTokenTtl("")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: vault:AuthBackend
* properties:
* type: azure
* identityTokenKey: example-key
* exampleAuthBackendConfig:
* type: vault:azure:AuthBackendConfig
* name: example
* properties:
* backend: ${example.path}
* tenantId: 11111111-2222-3333-4444-555555555555
* clientId: 11111111-2222-3333-4444-555555555555
* identityTokenAudience:
* identityTokenTtl:
* ```
*
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as vault from "@pulumi/vault";
* const example = new vault.AuthBackend("example", {type: "azure"});
* const exampleAuthBackendConfig = new vault.azure.AuthBackendConfig("example", {
* backend: example.path,
* tenantId: "11111111-2222-3333-4444-555555555555",
* clientId: "11111111-2222-3333-4444-555555555555",
* clientSecret: "01234567890123456789",
* resource: "https://vault.hashicorp.com",
* });
* ```
* ```python
* import pulumi
* import pulumi_vault as vault
* example = vault.AuthBackend("example", type="azure")
* example_auth_backend_config = vault.azure.AuthBackendConfig("example",
* backend=example.path,
* tenant_id="11111111-2222-3333-4444-555555555555",
* client_id="11111111-2222-3333-4444-555555555555",
* client_secret="01234567890123456789",
* resource="https://vault.hashicorp.com")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Vault = Pulumi.Vault;
* return await Deployment.RunAsync(() =>
* {
* var example = new Vault.AuthBackend("example", new()
* {
* Type = "azure",
* });
* var exampleAuthBackendConfig = new Vault.Azure.AuthBackendConfig("example", new()
* {
* Backend = example.Path,
* TenantId = "11111111-2222-3333-4444-555555555555",
* ClientId = "11111111-2222-3333-4444-555555555555",
* ClientSecret = "01234567890123456789",
* Resource = "https://vault.hashicorp.com",
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-vault/sdk/v6/go/vault"
* "github.com/pulumi/pulumi-vault/sdk/v6/go/vault/azure"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* example, err := vault.NewAuthBackend(ctx, "example", &vault.AuthBackendArgs{
* Type: pulumi.String("azure"),
* })
* if err != nil {
* return err
* }
* _, err = azure.NewAuthBackendConfig(ctx, "example", &azure.AuthBackendConfigArgs{
* Backend: example.Path,
* TenantId: pulumi.String("11111111-2222-3333-4444-555555555555"),
* ClientId: pulumi.String("11111111-2222-3333-4444-555555555555"),
* ClientSecret: pulumi.String("01234567890123456789"),
* Resource: pulumi.String("https://vault.hashicorp.com"),
* })
* 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.AuthBackend;
* import com.pulumi.vault.AuthBackendArgs;
* import com.pulumi.vault.azure.AuthBackendConfig;
* import com.pulumi.vault.azure.AuthBackendConfigArgs;
* 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 example = new AuthBackend("example", AuthBackendArgs.builder()
* .type("azure")
* .build());
* var exampleAuthBackendConfig = new AuthBackendConfig("exampleAuthBackendConfig", AuthBackendConfigArgs.builder()
* .backend(example.path())
* .tenantId("11111111-2222-3333-4444-555555555555")
* .clientId("11111111-2222-3333-4444-555555555555")
* .clientSecret("01234567890123456789")
* .resource("https://vault.hashicorp.com")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: vault:AuthBackend
* properties:
* type: azure
* exampleAuthBackendConfig:
* type: vault:azure:AuthBackendConfig
* name: example
* properties:
* backend: ${example.path}
* tenantId: 11111111-2222-3333-4444-555555555555
* clientId: 11111111-2222-3333-4444-555555555555
* clientSecret: '01234567890123456789'
* resource: https://vault.hashicorp.com
* ```
*
* ## Import
* Azure auth backends can be imported using `auth/`, the `backend` path, and `/config` e.g.
* ```sh
* $ pulumi import vault:azure/authBackendConfig:AuthBackendConfig example auth/azure/config
* ```
* @property backend The path the Azure auth backend being configured was
* mounted at. Defaults to `azure`.
* @property clientId The client id for credentials to query the Azure APIs.
* Currently read permissions to query compute resources are required.
* @property clientSecret The client secret for credentials to query the
* Azure APIs.
* @property environment The Azure cloud environment. Valid values:
* AzurePublicCloud, AzureUSGovernmentCloud, AzureChinaCloud,
* AzureGermanCloud. Defaults to `AzurePublicCloud`.
* @property identityTokenAudience The audience claim value for plugin identity tokens. Requires Vault 1.17+.
* *Available only for Vault Enterprise*
* @property identityTokenTtl The TTL of generated identity tokens in seconds.
* @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).
* *Available only for Vault Enterprise*.
* @property resource The configured URL for the application registered in
* Azure Active Directory.
* @property tenantId The tenant id for the Azure Active Directory
* organization.
*/
public data class AuthBackendConfigArgs(
public val backend: Output? = null,
public val clientId: Output? = null,
public val clientSecret: Output? = null,
public val environment: Output? = null,
public val identityTokenAudience: Output? = null,
public val identityTokenTtl: Output? = null,
public val namespace: Output? = null,
public val resource: Output? = null,
public val tenantId: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.vault.azure.AuthBackendConfigArgs =
com.pulumi.vault.azure.AuthBackendConfigArgs.builder()
.backend(backend?.applyValue({ args0 -> args0 }))
.clientId(clientId?.applyValue({ args0 -> args0 }))
.clientSecret(clientSecret?.applyValue({ args0 -> args0 }))
.environment(environment?.applyValue({ args0 -> args0 }))
.identityTokenAudience(identityTokenAudience?.applyValue({ args0 -> args0 }))
.identityTokenTtl(identityTokenTtl?.applyValue({ args0 -> args0 }))
.namespace(namespace?.applyValue({ args0 -> args0 }))
.resource(resource?.applyValue({ args0 -> args0 }))
.tenantId(tenantId?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [AuthBackendConfigArgs].
*/
@PulumiTagMarker
public class AuthBackendConfigArgsBuilder internal constructor() {
private var backend: Output? = null
private var clientId: Output? = null
private var clientSecret: Output? = null
private var environment: Output? = null
private var identityTokenAudience: Output? = null
private var identityTokenTtl: Output? = null
private var namespace: Output? = null
private var resource: Output? = null
private var tenantId: Output? = null
/**
* @param value The path the Azure auth backend being configured was
* mounted at. Defaults to `azure`.
*/
@JvmName("gmnuagajtynrhjyh")
public suspend fun backend(`value`: Output) {
this.backend = value
}
/**
* @param value The client id for credentials to query the Azure APIs.
* Currently read permissions to query compute resources are required.
*/
@JvmName("tdyjfnhlavdfnxxf")
public suspend fun clientId(`value`: Output) {
this.clientId = value
}
/**
* @param value The client secret for credentials to query the
* Azure APIs.
*/
@JvmName("glbbsqkappuqgudo")
public suspend fun clientSecret(`value`: Output) {
this.clientSecret = value
}
/**
* @param value The Azure cloud environment. Valid values:
* AzurePublicCloud, AzureUSGovernmentCloud, AzureChinaCloud,
* AzureGermanCloud. Defaults to `AzurePublicCloud`.
*/
@JvmName("afqjyqwsrkkwwism")
public suspend fun environment(`value`: Output) {
this.environment = value
}
/**
* @param value The audience claim value for plugin identity tokens. Requires Vault 1.17+.
* *Available only for Vault Enterprise*
*/
@JvmName("epauiyiilrxwbytn")
public suspend fun identityTokenAudience(`value`: Output) {
this.identityTokenAudience = value
}
/**
* @param value The TTL of generated identity tokens in seconds.
*/
@JvmName("ewosusgnnvefhtld")
public suspend fun identityTokenTtl(`value`: Output) {
this.identityTokenTtl = 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).
* *Available only for Vault Enterprise*.
*/
@JvmName("rxbecguiowqmyrve")
public suspend fun namespace(`value`: Output) {
this.namespace = value
}
/**
* @param value The configured URL for the application registered in
* Azure Active Directory.
*/
@JvmName("sgyocxmonbagayxs")
public suspend fun resource(`value`: Output) {
this.resource = value
}
/**
* @param value The tenant id for the Azure Active Directory
* organization.
*/
@JvmName("delqynaropojwfra")
public suspend fun tenantId(`value`: Output) {
this.tenantId = value
}
/**
* @param value The path the Azure auth backend being configured was
* mounted at. Defaults to `azure`.
*/
@JvmName("xaytjbjxukdmyjdu")
public suspend fun backend(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.backend = mapped
}
/**
* @param value The client id for credentials to query the Azure APIs.
* Currently read permissions to query compute resources are required.
*/
@JvmName("usirjhguviffrajm")
public suspend fun clientId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.clientId = mapped
}
/**
* @param value The client secret for credentials to query the
* Azure APIs.
*/
@JvmName("nxeofpklyxsxrkuw")
public suspend fun clientSecret(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.clientSecret = mapped
}
/**
* @param value The Azure cloud environment. Valid values:
* AzurePublicCloud, AzureUSGovernmentCloud, AzureChinaCloud,
* AzureGermanCloud. Defaults to `AzurePublicCloud`.
*/
@JvmName("svobhdmbmfkfalpj")
public suspend fun environment(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.environment = mapped
}
/**
* @param value The audience claim value for plugin identity tokens. Requires Vault 1.17+.
* *Available only for Vault Enterprise*
*/
@JvmName("ysvmrrliegiuwvet")
public suspend fun identityTokenAudience(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.identityTokenAudience = mapped
}
/**
* @param value The TTL of generated identity tokens in seconds.
*/
@JvmName("rulxqomiisvjclqe")
public suspend fun identityTokenTtl(`value`: Int?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.identityTokenTtl = 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).
* *Available only for Vault Enterprise*.
*/
@JvmName("mwxiqtakllqudnnh")
public suspend fun namespace(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.namespace = mapped
}
/**
* @param value The configured URL for the application registered in
* Azure Active Directory.
*/
@JvmName("rpmcnsdfkxjhukfj")
public suspend fun resource(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.resource = mapped
}
/**
* @param value The tenant id for the Azure Active Directory
* organization.
*/
@JvmName("lxduuhlbkbqqfqyp")
public suspend fun tenantId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.tenantId = mapped
}
internal fun build(): AuthBackendConfigArgs = AuthBackendConfigArgs(
backend = backend,
clientId = clientId,
clientSecret = clientSecret,
environment = environment,
identityTokenAudience = identityTokenAudience,
identityTokenTtl = identityTokenTtl,
namespace = namespace,
resource = resource,
tenantId = tenantId,
)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy