HashiCorp Vault v6.3.0 published on Thursday, Aug 8, 2024 by Pulumi
vault.identity.getOidcClientCreds
Explore with Pulumi AI
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as vault from "@pulumi/vault";
const app = new vault.identity.OidcClient("app", {
name: "application",
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,
});
import pulumi
import pulumi_vault as vault
app = vault.identity.OidcClient("app",
name="application",
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)
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 {
app, err := identity.NewOidcClient(ctx, "app", &identity.OidcClientArgs{
Name: pulumi.String("application"),
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
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Vault = Pulumi.Vault;
return await Deployment.RunAsync(() =>
{
var app = new Vault.Identity.OidcClient("app", new()
{
Name = "application",
RedirectUris = new[]
{
"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()
{
Name = app.Name,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.vault.identity.OidcClient;
import com.pulumi.vault.identity.OidcClientArgs;
import com.pulumi.vault.identity.IdentityFunctions;
import com.pulumi.vault.identity.inputs.GetOidcClientCredsArgs;
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 app = new OidcClient("app", OidcClientArgs.builder()
.name("application")
.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)
.build());
final var creds = IdentityFunctions.getOidcClientCreds(GetOidcClientCredsArgs.builder()
.name(app.name())
.build());
}
}
resources:
app:
type: vault:identity:OidcClient
properties:
name: application
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
variables:
creds:
fn::invoke:
Function: vault:identity:getOidcClientCreds
Arguments:
name: ${app.name}
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,
namespace: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetOidcClientCredsResult
def get_oidc_client_creds_output(name: Optional[pulumi.Input[str]] = None,
namespace: 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:
getOidcClientCreds Result
The following output properties are available:
- Client
Id string - The Client ID returned by Vault.
- Client
Secret string - The Client Secret Key returned by Vault.
For public OpenID Clients
client_secret
is set to an empty string""
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Namespace string
- Client
Id string - The Client ID returned by Vault.
- Client
Secret string - The Client Secret Key returned by Vault.
For public OpenID Clients
client_secret
is set to an empty string""
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Namespace string
- client
Id String - The Client ID returned by Vault.
- client
Secret String - The Client Secret Key returned by Vault.
For public OpenID Clients
client_secret
is set to an empty string""
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- namespace String
- client
Id string - The Client ID returned by Vault.
- client
Secret string - The Client Secret Key returned by Vault.
For public OpenID Clients
client_secret
is set to an empty string""
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- namespace string
- client_
id str - The Client ID returned by Vault.
- client_
secret str - The Client Secret Key returned by Vault.
For public OpenID Clients
client_secret
is set to an empty string""
- id str
- The provider-assigned unique ID for this managed resource.
- name str
- namespace str
- client
Id String - The Client ID returned by Vault.
- client
Secret String - The Client Secret Key returned by Vault.
For public OpenID Clients
client_secret
is set to an empty string""
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- namespace String
Package Details
- Repository
- Vault pulumi/pulumi-vault
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
vault
Terraform Provider.