AuthBackendConfig

Manages an Kubernetes auth backend config in a Vault server. See the Vault documentation for more information.

Example Usage

using Pulumi;
using Vault = Pulumi.Vault;

class MyStack : Stack
{
    public MyStack()
    {
        var kubernetes = new Vault.AuthBackend("kubernetes", new Vault.AuthBackendArgs
        {
            Type = "kubernetes",
        });
        var example = new Vault.Kubernetes.AuthBackendConfig("example", new Vault.Kubernetes.AuthBackendConfigArgs
        {
            Backend = kubernetes.Path,
            KubernetesHost = "http://example.com:443",
            KubernetesCaCert = @"-----BEGIN CERTIFICATE-----
example
-----END CERTIFICATE-----",
            TokenReviewerJwt = "ZXhhbXBsZQo=",
            Issuer = "api",
            DisableIssValidation = true,
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-vault/sdk/v4/go/vault"
	"github.com/pulumi/pulumi-vault/sdk/v4/go/vault/kubernetes"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		kubernetes, err := vault.NewAuthBackend(ctx, "kubernetes", &vault.AuthBackendArgs{
			Type: pulumi.String("kubernetes"),
		})
		if err != nil {
			return err
		}
		_, err = kubernetes.NewAuthBackendConfig(ctx, "example", &kubernetes.AuthBackendConfigArgs{
			Backend:              kubernetes.Path,
			KubernetesHost:       pulumi.String("http://example.com:443"),
			KubernetesCaCert:     pulumi.String("-----BEGIN CERTIFICATE-----\nexample\n-----END CERTIFICATE-----"),
			TokenReviewerJwt:     pulumi.String("ZXhhbXBsZQo="),
			Issuer:               pulumi.String("api"),
			DisableIssValidation: pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
import pulumi
import pulumi_vault as vault

kubernetes = vault.AuthBackend("kubernetes", type="kubernetes")
example = vault.kubernetes.AuthBackendConfig("example",
    backend=kubernetes.path,
    kubernetes_host="http://example.com:443",
    kubernetes_ca_cert="""-----BEGIN CERTIFICATE-----
example
-----END CERTIFICATE-----""",
    token_reviewer_jwt="ZXhhbXBsZQo=",
    issuer="api",
    disable_iss_validation=True)
import * as pulumi from "@pulumi/pulumi";
import * as vault from "@pulumi/vault";

const kubernetes = new vault.AuthBackend("kubernetes", {type: "kubernetes"});
const example = new vault.kubernetes.AuthBackendConfig("example", {
    backend: kubernetes.path,
    kubernetesHost: "http://example.com:443",
    kubernetesCaCert: `-----BEGIN CERTIFICATE-----
example
-----END CERTIFICATE-----`,
    tokenReviewerJwt: "ZXhhbXBsZQo=",
    issuer: "api",
    disableIssValidation: "true",
});

Create a AuthBackendConfig Resource

new AuthBackendConfig(name: string, args: AuthBackendConfigArgs, opts?: CustomResourceOptions);
@overload
def AuthBackendConfig(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      backend: Optional[str] = None,
                      disable_iss_validation: Optional[bool] = None,
                      disable_local_ca_jwt: Optional[bool] = None,
                      issuer: Optional[str] = None,
                      kubernetes_ca_cert: Optional[str] = None,
                      kubernetes_host: Optional[str] = None,
                      pem_keys: Optional[Sequence[str]] = None,
                      token_reviewer_jwt: Optional[str] = None)
@overload
def AuthBackendConfig(resource_name: str,
                      args: AuthBackendConfigArgs,
                      opts: Optional[ResourceOptions] = None)
func NewAuthBackendConfig(ctx *Context, name string, args AuthBackendConfigArgs, opts ...ResourceOption) (*AuthBackendConfig, error)
public AuthBackendConfig(string name, AuthBackendConfigArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args AuthBackendConfigArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args AuthBackendConfigArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args AuthBackendConfigArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args AuthBackendConfigArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

AuthBackendConfig Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The AuthBackendConfig resource accepts the following input properties:

KubernetesHost string
Host must be a host string, a host:port pair, or a URL to the base of the Kubernetes API server.
Backend string
Unique name of the kubernetes backend to configure.
DisableIssValidation bool
Disable JWT issuer validation. Allows to skip ISS validation. Requires Vault v1.5.4+ or Vault auth kubernetes plugin v0.7.1+
DisableLocalCaJwt bool
Disable defaulting to the local CA cert and service account JWT when running in a Kubernetes pod. Requires Vault v1.5.4+ or Vault auth kubernetes plugin v0.7.1+
Issuer string
Optional JWT issuer. If no issuer is specified, kubernetes.io/serviceaccount will be used as the default issuer.
KubernetesCaCert string
PEM encoded CA cert for use by the TLS client used to talk with the Kubernetes API.
PemKeys List<string>
List of PEM-formatted public keys or certificates used to verify the signatures of Kubernetes service account JWTs. If a certificate is given, its public key will be extracted. Not every installation of Kubernetes exposes these keys.
TokenReviewerJwt string
A service account JWT used to access the TokenReview API to validate other JWTs during login. If not set the JWT used for login will be used to access the API.
KubernetesHost string
Host must be a host string, a host:port pair, or a URL to the base of the Kubernetes API server.
Backend string
Unique name of the kubernetes backend to configure.
DisableIssValidation bool
Disable JWT issuer validation. Allows to skip ISS validation. Requires Vault v1.5.4+ or Vault auth kubernetes plugin v0.7.1+
DisableLocalCaJwt bool
Disable defaulting to the local CA cert and service account JWT when running in a Kubernetes pod. Requires Vault v1.5.4+ or Vault auth kubernetes plugin v0.7.1+
Issuer string
Optional JWT issuer. If no issuer is specified, kubernetes.io/serviceaccount will be used as the default issuer.
KubernetesCaCert string
PEM encoded CA cert for use by the TLS client used to talk with the Kubernetes API.
PemKeys []string
List of PEM-formatted public keys or certificates used to verify the signatures of Kubernetes service account JWTs. If a certificate is given, its public key will be extracted. Not every installation of Kubernetes exposes these keys.
TokenReviewerJwt string
A service account JWT used to access the TokenReview API to validate other JWTs during login. If not set the JWT used for login will be used to access the API.
kubernetesHost string
Host must be a host string, a host:port pair, or a URL to the base of the Kubernetes API server.
backend string
Unique name of the kubernetes backend to configure.
disableIssValidation boolean
Disable JWT issuer validation. Allows to skip ISS validation. Requires Vault v1.5.4+ or Vault auth kubernetes plugin v0.7.1+
disableLocalCaJwt boolean
Disable defaulting to the local CA cert and service account JWT when running in a Kubernetes pod. Requires Vault v1.5.4+ or Vault auth kubernetes plugin v0.7.1+
issuer string
Optional JWT issuer. If no issuer is specified, kubernetes.io/serviceaccount will be used as the default issuer.
kubernetesCaCert string
PEM encoded CA cert for use by the TLS client used to talk with the Kubernetes API.
pemKeys string[]
List of PEM-formatted public keys or certificates used to verify the signatures of Kubernetes service account JWTs. If a certificate is given, its public key will be extracted. Not every installation of Kubernetes exposes these keys.
tokenReviewerJwt string
A service account JWT used to access the TokenReview API to validate other JWTs during login. If not set the JWT used for login will be used to access the API.
kubernetes_host str
Host must be a host string, a host:port pair, or a URL to the base of the Kubernetes API server.
backend str
Unique name of the kubernetes backend to configure.
disable_iss_validation bool
Disable JWT issuer validation. Allows to skip ISS validation. Requires Vault v1.5.4+ or Vault auth kubernetes plugin v0.7.1+
disable_local_ca_jwt bool
Disable defaulting to the local CA cert and service account JWT when running in a Kubernetes pod. Requires Vault v1.5.4+ or Vault auth kubernetes plugin v0.7.1+
issuer str
Optional JWT issuer. If no issuer is specified, kubernetes.io/serviceaccount will be used as the default issuer.
kubernetes_ca_cert str
PEM encoded CA cert for use by the TLS client used to talk with the Kubernetes API.
pem_keys Sequence[str]
List of PEM-formatted public keys or certificates used to verify the signatures of Kubernetes service account JWTs. If a certificate is given, its public key will be extracted. Not every installation of Kubernetes exposes these keys.
token_reviewer_jwt str
A service account JWT used to access the TokenReview API to validate other JWTs during login. If not set the JWT used for login will be used to access the API.

Outputs

All input properties are implicitly available as output properties. Additionally, the AuthBackendConfig resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.

Look up an Existing AuthBackendConfig Resource

Get an existing AuthBackendConfig resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: AuthBackendConfigState, opts?: CustomResourceOptions): AuthBackendConfig
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        backend: Optional[str] = None,
        disable_iss_validation: Optional[bool] = None,
        disable_local_ca_jwt: Optional[bool] = None,
        issuer: Optional[str] = None,
        kubernetes_ca_cert: Optional[str] = None,
        kubernetes_host: Optional[str] = None,
        pem_keys: Optional[Sequence[str]] = None,
        token_reviewer_jwt: Optional[str] = None) -> AuthBackendConfig
func GetAuthBackendConfig(ctx *Context, name string, id IDInput, state *AuthBackendConfigState, opts ...ResourceOption) (*AuthBackendConfig, error)
public static AuthBackendConfig Get(string name, Input<string> id, AuthBackendConfigState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

Backend string
Unique name of the kubernetes backend to configure.
DisableIssValidation bool
Disable JWT issuer validation. Allows to skip ISS validation. Requires Vault v1.5.4+ or Vault auth kubernetes plugin v0.7.1+
DisableLocalCaJwt bool
Disable defaulting to the local CA cert and service account JWT when running in a Kubernetes pod. Requires Vault v1.5.4+ or Vault auth kubernetes plugin v0.7.1+
Issuer string
Optional JWT issuer. If no issuer is specified, kubernetes.io/serviceaccount will be used as the default issuer.
KubernetesCaCert string
PEM encoded CA cert for use by the TLS client used to talk with the Kubernetes API.
KubernetesHost string
Host must be a host string, a host:port pair, or a URL to the base of the Kubernetes API server.
PemKeys List<string>
List of PEM-formatted public keys or certificates used to verify the signatures of Kubernetes service account JWTs. If a certificate is given, its public key will be extracted. Not every installation of Kubernetes exposes these keys.
TokenReviewerJwt string
A service account JWT used to access the TokenReview API to validate other JWTs during login. If not set the JWT used for login will be used to access the API.
Backend string
Unique name of the kubernetes backend to configure.
DisableIssValidation bool
Disable JWT issuer validation. Allows to skip ISS validation. Requires Vault v1.5.4+ or Vault auth kubernetes plugin v0.7.1+
DisableLocalCaJwt bool
Disable defaulting to the local CA cert and service account JWT when running in a Kubernetes pod. Requires Vault v1.5.4+ or Vault auth kubernetes plugin v0.7.1+
Issuer string
Optional JWT issuer. If no issuer is specified, kubernetes.io/serviceaccount will be used as the default issuer.
KubernetesCaCert string
PEM encoded CA cert for use by the TLS client used to talk with the Kubernetes API.
KubernetesHost string
Host must be a host string, a host:port pair, or a URL to the base of the Kubernetes API server.
PemKeys []string
List of PEM-formatted public keys or certificates used to verify the signatures of Kubernetes service account JWTs. If a certificate is given, its public key will be extracted. Not every installation of Kubernetes exposes these keys.
TokenReviewerJwt string
A service account JWT used to access the TokenReview API to validate other JWTs during login. If not set the JWT used for login will be used to access the API.
backend string
Unique name of the kubernetes backend to configure.
disableIssValidation boolean
Disable JWT issuer validation. Allows to skip ISS validation. Requires Vault v1.5.4+ or Vault auth kubernetes plugin v0.7.1+
disableLocalCaJwt boolean
Disable defaulting to the local CA cert and service account JWT when running in a Kubernetes pod. Requires Vault v1.5.4+ or Vault auth kubernetes plugin v0.7.1+
issuer string
Optional JWT issuer. If no issuer is specified, kubernetes.io/serviceaccount will be used as the default issuer.
kubernetesCaCert string
PEM encoded CA cert for use by the TLS client used to talk with the Kubernetes API.
kubernetesHost string
Host must be a host string, a host:port pair, or a URL to the base of the Kubernetes API server.
pemKeys string[]
List of PEM-formatted public keys or certificates used to verify the signatures of Kubernetes service account JWTs. If a certificate is given, its public key will be extracted. Not every installation of Kubernetes exposes these keys.
tokenReviewerJwt string
A service account JWT used to access the TokenReview API to validate other JWTs during login. If not set the JWT used for login will be used to access the API.
backend str
Unique name of the kubernetes backend to configure.
disable_iss_validation bool
Disable JWT issuer validation. Allows to skip ISS validation. Requires Vault v1.5.4+ or Vault auth kubernetes plugin v0.7.1+
disable_local_ca_jwt bool
Disable defaulting to the local CA cert and service account JWT when running in a Kubernetes pod. Requires Vault v1.5.4+ or Vault auth kubernetes plugin v0.7.1+
issuer str
Optional JWT issuer. If no issuer is specified, kubernetes.io/serviceaccount will be used as the default issuer.
kubernetes_ca_cert str
PEM encoded CA cert for use by the TLS client used to talk with the Kubernetes API.
kubernetes_host str
Host must be a host string, a host:port pair, or a URL to the base of the Kubernetes API server.
pem_keys Sequence[str]
List of PEM-formatted public keys or certificates used to verify the signatures of Kubernetes service account JWTs. If a certificate is given, its public key will be extracted. Not every installation of Kubernetes exposes these keys.
token_reviewer_jwt str
A service account JWT used to access the TokenReview API to validate other JWTs during login. If not set the JWT used for login will be used to access the API.

Import

Kubernetes authentication backend can be imported using the path, e.g.

 $ pulumi import vault:kubernetes/authBackendConfig:AuthBackendConfig config auth/kubernetes/config

Package Details

Repository
https://github.com/pulumi/pulumi-vault
License
Apache-2.0
Notes
This Pulumi package is based on the vault Terraform Provider.