HashiCorp Vault

Pulumi Official
Package maintained by Pulumi
v5.4.1 published on Friday, Apr 22, 2022 by Pulumi

getOidcClientCreds

Example Usage

using Pulumi;
using Vault = Pulumi.Vault;

class MyStack : Stack
{
    public MyStack()
    {
        var app = new Vault.Identity.OidcClient("app", new Vault.Identity.OidcClientArgs
        {
            RedirectUris = 
            {
                "http://127.0.0.1:9200/v1/auth-methods/oidc:authenticate:callback",
                "http://127.0.0.1:8251/callback",
                "http://127.0.0.1:8080/callback",
            },
            IdTokenTtl = 2400,
            AccessTokenTtl = 7200,
        });
        var creds = Vault.Identity.GetOidcClientCreds.Invoke(new Vault.Identity.GetOidcClientCredsInvokeArgs
        {
            Name = app.Name,
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-vault/sdk/v5/go/vault/identity"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		app, err := identity.NewOidcClient(ctx, "app", &identity.OidcClientArgs{
			RedirectUris: pulumi.StringArray{
				pulumi.String("http://127.0.0.1:9200/v1/auth-methods/oidc:authenticate:callback"),
				pulumi.String("http://127.0.0.1:8251/callback"),
				pulumi.String("http://127.0.0.1:8080/callback"),
			},
			IdTokenTtl:     pulumi.Int(2400),
			AccessTokenTtl: pulumi.Int(7200),
		})
		if err != nil {
			return err
		}
		_ = identity.GetOidcClientCredsOutput(ctx, identity.GetOidcClientCredsOutputArgs{
			Name: app.Name,
		}, nil)
		return nil
	})
}

Coming soon!

import pulumi
import pulumi_vault as vault

app = vault.identity.OidcClient("app",
    redirect_uris=[
        "http://127.0.0.1:9200/v1/auth-methods/oidc:authenticate:callback",
        "http://127.0.0.1:8251/callback",
        "http://127.0.0.1:8080/callback",
    ],
    id_token_ttl=2400,
    access_token_ttl=7200)
creds = vault.identity.get_oidc_client_creds_output(name=app.name)
import * as pulumi from "@pulumi/pulumi";
import * as vault from "@pulumi/vault";

const app = new vault.identity.OidcClient("app", {
    redirectUris: [
        "http://127.0.0.1:9200/v1/auth-methods/oidc:authenticate:callback",
        "http://127.0.0.1:8251/callback",
        "http://127.0.0.1:8080/callback",
    ],
    idTokenTtl: 2400,
    accessTokenTtl: 7200,
});
const creds = vault.identity.getOidcClientCredsOutput({
    name: app.name,
});

Coming soon!

Using getOidcClientCreds

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getOidcClientCreds(args: GetOidcClientCredsArgs, opts?: InvokeOptions): Promise<GetOidcClientCredsResult>
function getOidcClientCredsOutput(args: GetOidcClientCredsOutputArgs, opts?: InvokeOptions): Output<GetOidcClientCredsResult>
def get_oidc_client_creds(name: Optional[str] = None,
                          opts: Optional[InvokeOptions] = None) -> GetOidcClientCredsResult
def get_oidc_client_creds_output(name: Optional[pulumi.Input[str]] = None,
                          opts: Optional[InvokeOptions] = None) -> Output[GetOidcClientCredsResult]
func GetOidcClientCreds(ctx *Context, args *GetOidcClientCredsArgs, opts ...InvokeOption) (*GetOidcClientCredsResult, error)
func GetOidcClientCredsOutput(ctx *Context, args *GetOidcClientCredsOutputArgs, opts ...InvokeOption) GetOidcClientCredsResultOutput

> Note: This function is named GetOidcClientCreds in the Go SDK.

public static class GetOidcClientCreds 
{
    public static Task<GetOidcClientCredsResult> InvokeAsync(GetOidcClientCredsArgs args, InvokeOptions? opts = null)
    public static Output<GetOidcClientCredsResult> Invoke(GetOidcClientCredsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetOidcClientCredsResult> getOidcClientCreds(GetOidcClientCredsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: vault:identity/getOidcClientCreds:getOidcClientCreds
  Arguments:
    # Arguments dictionary

The following arguments are supported:

Name string

The name of the OIDC Client in Vault.

Name string

The name of the OIDC Client in Vault.

name String

The name of the OIDC Client in Vault.

name string

The name of the OIDC Client in Vault.

name str

The name of the OIDC Client in Vault.

name String

The name of the OIDC Client in Vault.

getOidcClientCreds Result

The following output properties are available:

ClientId string

The Client ID returned by Vault.

ClientSecret string

The Client Secret Key returned by Vault.

Id string

The provider-assigned unique ID for this managed resource.

Name string
ClientId string

The Client ID returned by Vault.

ClientSecret string

The Client Secret Key returned by Vault.

Id string

The provider-assigned unique ID for this managed resource.

Name string
clientId String

The Client ID returned by Vault.

clientSecret String

The Client Secret Key returned by Vault.

id String

The provider-assigned unique ID for this managed resource.

name String
clientId string

The Client ID returned by Vault.

clientSecret string

The Client Secret Key returned by Vault.

id string

The provider-assigned unique ID for this managed resource.

name string
client_id str

The Client ID returned by Vault.

client_secret str

The Client Secret Key returned by Vault.

id str

The provider-assigned unique ID for this managed resource.

name str
clientId String

The Client ID returned by Vault.

clientSecret String

The Client Secret Key returned by Vault.

id String

The provider-assigned unique ID for this managed resource.

name String

Package Details

Repository
https://github.com/pulumi/pulumi-vault
License
Apache-2.0
Notes

This Pulumi package is based on the vault Terraform Provider.