com.pulumi.vault.identity.kotlin.Oidc.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.identity.kotlin
import com.pulumi.core.Output
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
/**
* Builder for [Oidc].
*/
@PulumiTagMarker
public class OidcResourceBuilder internal constructor() {
public var name: String? = null
public var args: OidcArgs = OidcArgs()
public var opts: CustomResourceOptions = CustomResourceOptions()
/**
* @param name The _unique_ name of the resulting resource.
*/
public fun name(`value`: String) {
this.name = value
}
/**
* @param block The arguments to use to populate this resource's properties.
*/
public suspend fun args(block: suspend OidcArgsBuilder.() -> Unit) {
val builder = OidcArgsBuilder()
block(builder)
this.args = builder.build()
}
/**
* @param block A bag of options that control this resource's behavior.
*/
public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
}
internal fun build(): Oidc {
val builtJavaResource = com.pulumi.vault.identity.Oidc(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return Oidc(builtJavaResource)
}
}
/**
* Configure the [Identity Tokens Backend](https://www.vaultproject.io/docs/secrets/identity/index.html#identity-tokens).
* The Identity secrets engine is the identity management solution for Vault. It internally maintains
* the clients who are recognized by Vault.
* > **NOTE:** Each Vault server may only have one Identity Tokens Backend configuration. Multiple configurations of the resource against the same Vault server will cause a perpetual difference.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as vault from "@pulumi/vault";
* const server = new vault.identity.Oidc("server", {issuer: "https://www.acme.com"});
* ```
* ```python
* import pulumi
* import pulumi_vault as vault
* server = vault.identity.Oidc("server", issuer="https://www.acme.com")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Vault = Pulumi.Vault;
* return await Deployment.RunAsync(() =>
* {
* var server = new Vault.Identity.Oidc("server", new()
* {
* Issuer = "https://www.acme.com",
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-vault/sdk/v6/go/vault/identity"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := identity.NewOidc(ctx, "server", &identity.OidcArgs{
* Issuer: pulumi.String("https://www.acme.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.identity.Oidc;
* import com.pulumi.vault.identity.OidcArgs;
* 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 server = new Oidc("server", OidcArgs.builder()
* .issuer("https://www.acme.com")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* server:
* type: vault:identity:Oidc
* properties:
* issuer: https://www.acme.com
* ```
*
*/
public class Oidc internal constructor(
override val javaResource: com.pulumi.vault.identity.Oidc,
) : KotlinCustomResource(javaResource, OidcMapper) {
/**
* Issuer URL to be used in the iss claim of the token. If not set, Vault's
* `api_addr` will be used. The issuer is a case sensitive URL using the https scheme that contains
* scheme, host, and optionally, port number and path components, but no query or fragment
* components.
*/
public val issuer: Output
get() = javaResource.issuer().applyValue({ args0 -> args0 })
/**
* 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 val namespace: Output?
get() = javaResource.namespace().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
}
public object OidcMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.vault.identity.Oidc::class == javaResource::class
override fun map(javaResource: Resource): Oidc = Oidc(
javaResource as
com.pulumi.vault.identity.Oidc,
)
}
/**
* @see [Oidc].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [Oidc].
*/
public suspend fun oidc(name: String, block: suspend OidcResourceBuilder.() -> Unit): Oidc {
val builder = OidcResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [Oidc].
* @param name The _unique_ name of the resulting resource.
*/
public fun oidc(name: String): Oidc {
val builder = OidcResourceBuilder()
builder.name(name)
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy