com.pulumi.vault.aws.kotlin.AuthBackendConfigIdentityArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-vault-kotlin Show documentation
Show all versions of pulumi-vault-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.vault.aws.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.aws.AuthBackendConfigIdentityArgs.builder
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.jvm.JvmName
/**
* Manages an AWS auth backend identity configuration in a Vault server. This configuration defines how Vault interacts
* with the identity store. See the [Vault documentation](https://www.vaultproject.io/docs/auth/aws.html) for more
* information.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as vault from "@pulumi/vault";
* const aws = new vault.AuthBackend("aws", {type: "aws"});
* const example = new vault.aws.AuthBackendConfigIdentity("example", {
* backend: aws.path,
* iamAlias: "full_arn",
* iamMetadatas: [
* "canonical_arn",
* "account_id",
* ],
* });
* ```
* ```python
* import pulumi
* import pulumi_vault as vault
* aws = vault.AuthBackend("aws", type="aws")
* example = vault.aws.AuthBackendConfigIdentity("example",
* backend=aws.path,
* iam_alias="full_arn",
* iam_metadatas=[
* "canonical_arn",
* "account_id",
* ])
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Vault = Pulumi.Vault;
* return await Deployment.RunAsync(() =>
* {
* var aws = new Vault.AuthBackend("aws", new()
* {
* Type = "aws",
* });
* var example = new Vault.Aws.AuthBackendConfigIdentity("example", new()
* {
* Backend = aws.Path,
* IamAlias = "full_arn",
* IamMetadatas = new[]
* {
* "canonical_arn",
* "account_id",
* },
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-vault/sdk/v6/go/vault"
* "github.com/pulumi/pulumi-vault/sdk/v6/go/vault/aws"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* aws, err := vault.NewAuthBackend(ctx, "aws", &vault.AuthBackendArgs{
* Type: pulumi.String("aws"),
* })
* if err != nil {
* return err
* }
* _, err = aws.NewAuthBackendConfigIdentity(ctx, "example", &aws.AuthBackendConfigIdentityArgs{
* Backend: aws.Path,
* IamAlias: pulumi.String("full_arn"),
* IamMetadatas: pulumi.StringArray{
* pulumi.String("canonical_arn"),
* pulumi.String("account_id"),
* },
* })
* 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.aws.AuthBackendConfigIdentity;
* import com.pulumi.vault.aws.AuthBackendConfigIdentityArgs;
* 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 aws = new AuthBackend("aws", AuthBackendArgs.builder()
* .type("aws")
* .build());
* var example = new AuthBackendConfigIdentity("example", AuthBackendConfigIdentityArgs.builder()
* .backend(aws.path())
* .iamAlias("full_arn")
* .iamMetadatas(
* "canonical_arn",
* "account_id")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* aws:
* type: vault:AuthBackend
* properties:
* type: aws
* example:
* type: vault:aws:AuthBackendConfigIdentity
* properties:
* backend: ${aws.path}
* iamAlias: full_arn
* iamMetadatas:
* - canonical_arn
* - account_id
* ```
*
* ## Import
* AWS auth backend identity config can be imported using `auth/`, the `backend` path, and `/config/identity` e.g.
* ```sh
* $ pulumi import vault:aws/authBackendConfigIdentity:AuthBackendConfigIdentity example auth/aws/config/identity
* ```
* @property backend Unique name of the auth backend to configure.
* @property ec2Alias How to generate the identity alias when using the ec2 auth method. Valid choices are
* `role_id`, `instance_id`, and `image_id`. Defaults to `role_id`
* @property ec2Metadatas The metadata to include on the token returned by the `login` endpoint. This metadata will be
* added to both audit logs, and on the `ec2_alias`
* @property iamAlias How to generate the identity alias when using the iam auth method. Valid choices are
* `role_id`, `unique_id`, and `full_arn`. Defaults to `role_id`
* @property iamMetadatas The metadata to include on the token returned by the `login` endpoint. This metadata will be
* added to both audit logs, and on the `iam_alias`
* @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*.
*/
public data class AuthBackendConfigIdentityArgs(
public val backend: Output? = null,
public val ec2Alias: Output? = null,
public val ec2Metadatas: Output>? = null,
public val iamAlias: Output? = null,
public val iamMetadatas: Output>? = null,
public val namespace: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.vault.aws.AuthBackendConfigIdentityArgs =
com.pulumi.vault.aws.AuthBackendConfigIdentityArgs.builder()
.backend(backend?.applyValue({ args0 -> args0 }))
.ec2Alias(ec2Alias?.applyValue({ args0 -> args0 }))
.ec2Metadatas(ec2Metadatas?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
.iamAlias(iamAlias?.applyValue({ args0 -> args0 }))
.iamMetadatas(iamMetadatas?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
.namespace(namespace?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [AuthBackendConfigIdentityArgs].
*/
@PulumiTagMarker
public class AuthBackendConfigIdentityArgsBuilder internal constructor() {
private var backend: Output? = null
private var ec2Alias: Output? = null
private var ec2Metadatas: Output>? = null
private var iamAlias: Output? = null
private var iamMetadatas: Output>? = null
private var namespace: Output? = null
/**
* @param value Unique name of the auth backend to configure.
*/
@JvmName("crxqjxwhleqdppxb")
public suspend fun backend(`value`: Output) {
this.backend = value
}
/**
* @param value How to generate the identity alias when using the ec2 auth method. Valid choices are
* `role_id`, `instance_id`, and `image_id`. Defaults to `role_id`
*/
@JvmName("wxoncnsyxplsqrxo")
public suspend fun ec2Alias(`value`: Output) {
this.ec2Alias = value
}
/**
* @param value The metadata to include on the token returned by the `login` endpoint. This metadata will be
* added to both audit logs, and on the `ec2_alias`
*/
@JvmName("wqoectvxltycnlwv")
public suspend fun ec2Metadatas(`value`: Output>) {
this.ec2Metadatas = value
}
@JvmName("saoketmwylhmjetl")
public suspend fun ec2Metadatas(vararg values: Output) {
this.ec2Metadatas = Output.all(values.asList())
}
/**
* @param values The metadata to include on the token returned by the `login` endpoint. This metadata will be
* added to both audit logs, and on the `ec2_alias`
*/
@JvmName("dwfephouiqwweqst")
public suspend fun ec2Metadatas(values: List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy