
com.pulumi.vault.okta.kotlin.AuthBackendUserArgs.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.okta.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.okta.AuthBackendUserArgs.builder
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.jvm.JvmName
/**
* Provides a resource to create a user in an
* [Okta auth backend within Vault](https://www.vaultproject.io/docs/auth/okta.html).
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as vault from "@pulumi/vault";
* const example = new vault.okta.AuthBackend("example", {
* path: "user_okta",
* organization: "dummy",
* });
* const foo = new vault.okta.AuthBackendUser("foo", {
* path: example.path,
* username: "foo",
* groups: [
* "one",
* "two",
* ],
* });
* ```
* ```python
* import pulumi
* import pulumi_vault as vault
* example = vault.okta.AuthBackend("example",
* path="user_okta",
* organization="dummy")
* foo = vault.okta.AuthBackendUser("foo",
* path=example.path,
* username="foo",
* groups=[
* "one",
* "two",
* ])
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Vault = Pulumi.Vault;
* return await Deployment.RunAsync(() =>
* {
* var example = new Vault.Okta.AuthBackend("example", new()
* {
* Path = "user_okta",
* Organization = "dummy",
* });
* var foo = new Vault.Okta.AuthBackendUser("foo", new()
* {
* Path = example.Path,
* Username = "foo",
* Groups = new[]
* {
* "one",
* "two",
* },
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-vault/sdk/v6/go/vault/okta"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* example, err := okta.NewAuthBackend(ctx, "example", &okta.AuthBackendArgs{
* Path: pulumi.String("user_okta"),
* Organization: pulumi.String("dummy"),
* })
* if err != nil {
* return err
* }
* _, err = okta.NewAuthBackendUser(ctx, "foo", &okta.AuthBackendUserArgs{
* Path: example.Path,
* Username: pulumi.String("foo"),
* Groups: pulumi.StringArray{
* pulumi.String("one"),
* pulumi.String("two"),
* },
* })
* 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.okta.AuthBackend;
* import com.pulumi.vault.okta.AuthBackendArgs;
* import com.pulumi.vault.okta.AuthBackendUser;
* import com.pulumi.vault.okta.AuthBackendUserArgs;
* 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()
* .path("user_okta")
* .organization("dummy")
* .build());
* var foo = new AuthBackendUser("foo", AuthBackendUserArgs.builder()
* .path(example.path())
* .username("foo")
* .groups(
* "one",
* "two")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: vault:okta:AuthBackend
* properties:
* path: user_okta
* organization: dummy
* foo:
* type: vault:okta:AuthBackendUser
* properties:
* path: ${example.path}
* username: foo
* groups:
* - one
* - two
* ```
*
* ## Import
* Okta authentication backend users can be imported using its `path/user` ID format, e.g.
* ```sh
* $ pulumi import vault:okta/authBackendUser:AuthBackendUser example okta/foo
* ```
* @property groups List of Okta groups to associate with this user
* @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 path The path where the Okta auth backend is mounted
* @property policies List of Vault policies to associate with this user
* @property username Name of the user within Okta
*/
public data class AuthBackendUserArgs(
public val groups: Output>? = null,
public val namespace: Output? = null,
public val path: Output? = null,
public val policies: Output>? = null,
public val username: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.vault.okta.AuthBackendUserArgs =
com.pulumi.vault.okta.AuthBackendUserArgs.builder()
.groups(groups?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
.namespace(namespace?.applyValue({ args0 -> args0 }))
.path(path?.applyValue({ args0 -> args0 }))
.policies(policies?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
.username(username?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [AuthBackendUserArgs].
*/
@PulumiTagMarker
public class AuthBackendUserArgsBuilder internal constructor() {
private var groups: Output>? = null
private var namespace: Output? = null
private var path: Output? = null
private var policies: Output>? = null
private var username: Output? = null
/**
* @param value List of Okta groups to associate with this user
*/
@JvmName("bsvtaknikayhdluf")
public suspend fun groups(`value`: Output>) {
this.groups = value
}
@JvmName("qrqnthedqhurlwnl")
public suspend fun groups(vararg values: Output) {
this.groups = Output.all(values.asList())
}
/**
* @param values List of Okta groups to associate with this user
*/
@JvmName("nlfkmyngvvccyrax")
public suspend fun groups(values: List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy