consul

package
v4.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 11, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SecretBackend

type SecretBackend struct {
	pulumi.CustomResourceState

	// Specifies the address of the Consul instance, provided as "host:port" like "127.0.0.1:8500".
	Address pulumi.StringOutput `pulumi:"address"`
	// CA certificate to use when verifying Consul server certificate, must be x509 PEM encoded.
	CaCert pulumi.StringPtrOutput `pulumi:"caCert"`
	// Client certificate used for Consul's TLS communication, must be x509 PEM encoded and if this is set you need to also set client_key.
	ClientCert pulumi.StringPtrOutput `pulumi:"clientCert"`
	// Client key used for Consul's TLS communication, must be x509 PEM encoded and if this is set you need to also set client_cert.
	ClientKey pulumi.StringPtrOutput `pulumi:"clientKey"`
	// The default TTL for credentials issued by this backend.
	DefaultLeaseTtlSeconds pulumi.IntPtrOutput `pulumi:"defaultLeaseTtlSeconds"`
	// A human-friendly description for this backend.
	Description pulumi.StringPtrOutput `pulumi:"description"`
	// Specifies if the secret backend is local only.
	Local pulumi.BoolPtrOutput `pulumi:"local"`
	// The maximum TTL that can be requested
	// for credentials issued by this backend.
	MaxLeaseTtlSeconds pulumi.IntPtrOutput `pulumi:"maxLeaseTtlSeconds"`
	// The unique location this backend should be mounted at. Must not begin or end with a `/`. Defaults to `consul`.
	Path pulumi.StringPtrOutput `pulumi:"path"`
	// Specifies the URL scheme to use. Defaults to `http`.
	Scheme pulumi.StringPtrOutput `pulumi:"scheme"`
	// The Consul management token this backend should use to issue new tokens.
	Token pulumi.StringOutput `pulumi:"token"`
}

## Import

Consul secret backends can be imported using the `path`, e.g.

```sh

$ pulumi import vault:consul/secretBackend:SecretBackend example consul

```

func GetSecretBackend

func GetSecretBackend(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *SecretBackendState, opts ...pulumi.ResourceOption) (*SecretBackend, error)

GetSecretBackend gets an existing SecretBackend resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewSecretBackend

func NewSecretBackend(ctx *pulumi.Context,
	name string, args *SecretBackendArgs, opts ...pulumi.ResourceOption) (*SecretBackend, error)

NewSecretBackend registers a new resource with the given unique name, arguments, and options.

func (*SecretBackend) ElementType

func (*SecretBackend) ElementType() reflect.Type

func (*SecretBackend) ToSecretBackendOutput

func (i *SecretBackend) ToSecretBackendOutput() SecretBackendOutput

func (*SecretBackend) ToSecretBackendOutputWithContext

func (i *SecretBackend) ToSecretBackendOutputWithContext(ctx context.Context) SecretBackendOutput

func (*SecretBackend) ToSecretBackendPtrOutput

func (i *SecretBackend) ToSecretBackendPtrOutput() SecretBackendPtrOutput

func (*SecretBackend) ToSecretBackendPtrOutputWithContext

func (i *SecretBackend) ToSecretBackendPtrOutputWithContext(ctx context.Context) SecretBackendPtrOutput

type SecretBackendArgs

type SecretBackendArgs struct {
	// Specifies the address of the Consul instance, provided as "host:port" like "127.0.0.1:8500".
	Address pulumi.StringInput
	// CA certificate to use when verifying Consul server certificate, must be x509 PEM encoded.
	CaCert pulumi.StringPtrInput
	// Client certificate used for Consul's TLS communication, must be x509 PEM encoded and if this is set you need to also set client_key.
	ClientCert pulumi.StringPtrInput
	// Client key used for Consul's TLS communication, must be x509 PEM encoded and if this is set you need to also set client_cert.
	ClientKey pulumi.StringPtrInput
	// The default TTL for credentials issued by this backend.
	DefaultLeaseTtlSeconds pulumi.IntPtrInput
	// A human-friendly description for this backend.
	Description pulumi.StringPtrInput
	// Specifies if the secret backend is local only.
	Local pulumi.BoolPtrInput
	// The maximum TTL that can be requested
	// for credentials issued by this backend.
	MaxLeaseTtlSeconds pulumi.IntPtrInput
	// The unique location this backend should be mounted at. Must not begin or end with a `/`. Defaults to `consul`.
	Path pulumi.StringPtrInput
	// Specifies the URL scheme to use. Defaults to `http`.
	Scheme pulumi.StringPtrInput
	// The Consul management token this backend should use to issue new tokens.
	Token pulumi.StringInput
}

The set of arguments for constructing a SecretBackend resource.

func (SecretBackendArgs) ElementType

func (SecretBackendArgs) ElementType() reflect.Type

type SecretBackendArray

type SecretBackendArray []SecretBackendInput

func (SecretBackendArray) ElementType

func (SecretBackendArray) ElementType() reflect.Type

func (SecretBackendArray) ToSecretBackendArrayOutput

func (i SecretBackendArray) ToSecretBackendArrayOutput() SecretBackendArrayOutput

func (SecretBackendArray) ToSecretBackendArrayOutputWithContext

func (i SecretBackendArray) ToSecretBackendArrayOutputWithContext(ctx context.Context) SecretBackendArrayOutput

type SecretBackendArrayInput

type SecretBackendArrayInput interface {
	pulumi.Input

	ToSecretBackendArrayOutput() SecretBackendArrayOutput
	ToSecretBackendArrayOutputWithContext(context.Context) SecretBackendArrayOutput
}

SecretBackendArrayInput is an input type that accepts SecretBackendArray and SecretBackendArrayOutput values. You can construct a concrete instance of `SecretBackendArrayInput` via:

SecretBackendArray{ SecretBackendArgs{...} }

type SecretBackendArrayOutput

type SecretBackendArrayOutput struct{ *pulumi.OutputState }

func (SecretBackendArrayOutput) ElementType

func (SecretBackendArrayOutput) ElementType() reflect.Type

func (SecretBackendArrayOutput) Index

func (SecretBackendArrayOutput) ToSecretBackendArrayOutput

func (o SecretBackendArrayOutput) ToSecretBackendArrayOutput() SecretBackendArrayOutput

func (SecretBackendArrayOutput) ToSecretBackendArrayOutputWithContext

func (o SecretBackendArrayOutput) ToSecretBackendArrayOutputWithContext(ctx context.Context) SecretBackendArrayOutput

type SecretBackendInput

type SecretBackendInput interface {
	pulumi.Input

	ToSecretBackendOutput() SecretBackendOutput
	ToSecretBackendOutputWithContext(ctx context.Context) SecretBackendOutput
}

type SecretBackendMap

type SecretBackendMap map[string]SecretBackendInput

func (SecretBackendMap) ElementType

func (SecretBackendMap) ElementType() reflect.Type

func (SecretBackendMap) ToSecretBackendMapOutput

func (i SecretBackendMap) ToSecretBackendMapOutput() SecretBackendMapOutput

func (SecretBackendMap) ToSecretBackendMapOutputWithContext

func (i SecretBackendMap) ToSecretBackendMapOutputWithContext(ctx context.Context) SecretBackendMapOutput

type SecretBackendMapInput

type SecretBackendMapInput interface {
	pulumi.Input

	ToSecretBackendMapOutput() SecretBackendMapOutput
	ToSecretBackendMapOutputWithContext(context.Context) SecretBackendMapOutput
}

SecretBackendMapInput is an input type that accepts SecretBackendMap and SecretBackendMapOutput values. You can construct a concrete instance of `SecretBackendMapInput` via:

SecretBackendMap{ "key": SecretBackendArgs{...} }

type SecretBackendMapOutput

type SecretBackendMapOutput struct{ *pulumi.OutputState }

func (SecretBackendMapOutput) ElementType

func (SecretBackendMapOutput) ElementType() reflect.Type

func (SecretBackendMapOutput) MapIndex

func (SecretBackendMapOutput) ToSecretBackendMapOutput

func (o SecretBackendMapOutput) ToSecretBackendMapOutput() SecretBackendMapOutput

func (SecretBackendMapOutput) ToSecretBackendMapOutputWithContext

func (o SecretBackendMapOutput) ToSecretBackendMapOutputWithContext(ctx context.Context) SecretBackendMapOutput

type SecretBackendOutput

type SecretBackendOutput struct{ *pulumi.OutputState }

func (SecretBackendOutput) ElementType

func (SecretBackendOutput) ElementType() reflect.Type

func (SecretBackendOutput) ToSecretBackendOutput

func (o SecretBackendOutput) ToSecretBackendOutput() SecretBackendOutput

func (SecretBackendOutput) ToSecretBackendOutputWithContext

func (o SecretBackendOutput) ToSecretBackendOutputWithContext(ctx context.Context) SecretBackendOutput

func (SecretBackendOutput) ToSecretBackendPtrOutput

func (o SecretBackendOutput) ToSecretBackendPtrOutput() SecretBackendPtrOutput

func (SecretBackendOutput) ToSecretBackendPtrOutputWithContext

func (o SecretBackendOutput) ToSecretBackendPtrOutputWithContext(ctx context.Context) SecretBackendPtrOutput

type SecretBackendPtrInput

type SecretBackendPtrInput interface {
	pulumi.Input

	ToSecretBackendPtrOutput() SecretBackendPtrOutput
	ToSecretBackendPtrOutputWithContext(ctx context.Context) SecretBackendPtrOutput
}

type SecretBackendPtrOutput

type SecretBackendPtrOutput struct{ *pulumi.OutputState }

func (SecretBackendPtrOutput) Elem added in v4.6.0

func (SecretBackendPtrOutput) ElementType

func (SecretBackendPtrOutput) ElementType() reflect.Type

func (SecretBackendPtrOutput) ToSecretBackendPtrOutput

func (o SecretBackendPtrOutput) ToSecretBackendPtrOutput() SecretBackendPtrOutput

func (SecretBackendPtrOutput) ToSecretBackendPtrOutputWithContext

func (o SecretBackendPtrOutput) ToSecretBackendPtrOutputWithContext(ctx context.Context) SecretBackendPtrOutput

type SecretBackendRole

type SecretBackendRole struct {
	pulumi.CustomResourceState

	// The unique name of an existing Consul secrets backend mount. Must not begin or end with a `/`. One of `path` or `backend` is required.
	Backend pulumi.StringPtrOutput `pulumi:"backend"`
	// Indicates that the token should not be replicated globally and instead be local to the current datacenter.
	Local pulumi.BoolPtrOutput `pulumi:"local"`
	// Maximum TTL for leases associated with this role, in seconds.
	MaxTtl pulumi.IntPtrOutput `pulumi:"maxTtl"`
	// The name of the Consul secrets engine role to create.
	Name pulumi.StringOutput `pulumi:"name"`
	// The unique name of an existing Consul secrets backend mount. Must not begin or end with a `/`. **Deprecated**
	//
	// Deprecated: use `backend` instead
	Path pulumi.StringPtrOutput `pulumi:"path"`
	// The list of Consul ACL policies to associate with these roles.
	Policies pulumi.StringArrayOutput `pulumi:"policies"`
	// Specifies the type of token to create when using this role. Valid values are "client" or "management".
	TokenType pulumi.StringPtrOutput `pulumi:"tokenType"`
	// Specifies the TTL for this role.
	Ttl pulumi.IntPtrOutput `pulumi:"ttl"`
}

Manages a Consul secrets role for a Consul secrets engine in Vault. Consul secret backends can then issue Consul tokens.

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-vault/sdk/v4/go/vault/consul"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		test, err := consul.NewSecretBackend(ctx, "test", &consul.SecretBackendArgs{
			Path:        pulumi.String("consul"),
			Description: pulumi.String("Manages the Consul backend"),
			Address:     pulumi.String("127.0.0.1:8500"),
			Token:       pulumi.String("4240861b-ce3d-8530-115a-521ff070dd29"),
		})
		if err != nil {
			return err
		}
		_, err = consul.NewSecretBackendRole(ctx, "example", &consul.SecretBackendRoleArgs{
			Backend: test.Path,
			Policies: pulumi.StringArray{
				pulumi.String("example-policy"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

Consul secret backend roles can be imported using the `backend`, `/roles/`, and the `name` e.g.

```sh

$ pulumi import vault:consul/secretBackendRole:SecretBackendRole example consul/roles/my-role

```

func GetSecretBackendRole

func GetSecretBackendRole(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *SecretBackendRoleState, opts ...pulumi.ResourceOption) (*SecretBackendRole, error)

GetSecretBackendRole gets an existing SecretBackendRole resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewSecretBackendRole

func NewSecretBackendRole(ctx *pulumi.Context,
	name string, args *SecretBackendRoleArgs, opts ...pulumi.ResourceOption) (*SecretBackendRole, error)

NewSecretBackendRole registers a new resource with the given unique name, arguments, and options.

func (*SecretBackendRole) ElementType

func (*SecretBackendRole) ElementType() reflect.Type

func (*SecretBackendRole) ToSecretBackendRoleOutput

func (i *SecretBackendRole) ToSecretBackendRoleOutput() SecretBackendRoleOutput

func (*SecretBackendRole) ToSecretBackendRoleOutputWithContext

func (i *SecretBackendRole) ToSecretBackendRoleOutputWithContext(ctx context.Context) SecretBackendRoleOutput

func (*SecretBackendRole) ToSecretBackendRolePtrOutput

func (i *SecretBackendRole) ToSecretBackendRolePtrOutput() SecretBackendRolePtrOutput

func (*SecretBackendRole) ToSecretBackendRolePtrOutputWithContext

func (i *SecretBackendRole) ToSecretBackendRolePtrOutputWithContext(ctx context.Context) SecretBackendRolePtrOutput

type SecretBackendRoleArgs

type SecretBackendRoleArgs struct {
	// The unique name of an existing Consul secrets backend mount. Must not begin or end with a `/`. One of `path` or `backend` is required.
	Backend pulumi.StringPtrInput
	// Indicates that the token should not be replicated globally and instead be local to the current datacenter.
	Local pulumi.BoolPtrInput
	// Maximum TTL for leases associated with this role, in seconds.
	MaxTtl pulumi.IntPtrInput
	// The name of the Consul secrets engine role to create.
	Name pulumi.StringPtrInput
	// The unique name of an existing Consul secrets backend mount. Must not begin or end with a `/`. **Deprecated**
	//
	// Deprecated: use `backend` instead
	Path pulumi.StringPtrInput
	// The list of Consul ACL policies to associate with these roles.
	Policies pulumi.StringArrayInput
	// Specifies the type of token to create when using this role. Valid values are "client" or "management".
	TokenType pulumi.StringPtrInput
	// Specifies the TTL for this role.
	Ttl pulumi.IntPtrInput
}

The set of arguments for constructing a SecretBackendRole resource.

func (SecretBackendRoleArgs) ElementType

func (SecretBackendRoleArgs) ElementType() reflect.Type

type SecretBackendRoleArray

type SecretBackendRoleArray []SecretBackendRoleInput

func (SecretBackendRoleArray) ElementType

func (SecretBackendRoleArray) ElementType() reflect.Type

func (SecretBackendRoleArray) ToSecretBackendRoleArrayOutput

func (i SecretBackendRoleArray) ToSecretBackendRoleArrayOutput() SecretBackendRoleArrayOutput

func (SecretBackendRoleArray) ToSecretBackendRoleArrayOutputWithContext

func (i SecretBackendRoleArray) ToSecretBackendRoleArrayOutputWithContext(ctx context.Context) SecretBackendRoleArrayOutput

type SecretBackendRoleArrayInput

type SecretBackendRoleArrayInput interface {
	pulumi.Input

	ToSecretBackendRoleArrayOutput() SecretBackendRoleArrayOutput
	ToSecretBackendRoleArrayOutputWithContext(context.Context) SecretBackendRoleArrayOutput
}

SecretBackendRoleArrayInput is an input type that accepts SecretBackendRoleArray and SecretBackendRoleArrayOutput values. You can construct a concrete instance of `SecretBackendRoleArrayInput` via:

SecretBackendRoleArray{ SecretBackendRoleArgs{...} }

type SecretBackendRoleArrayOutput

type SecretBackendRoleArrayOutput struct{ *pulumi.OutputState }

func (SecretBackendRoleArrayOutput) ElementType

func (SecretBackendRoleArrayOutput) Index

func (SecretBackendRoleArrayOutput) ToSecretBackendRoleArrayOutput

func (o SecretBackendRoleArrayOutput) ToSecretBackendRoleArrayOutput() SecretBackendRoleArrayOutput

func (SecretBackendRoleArrayOutput) ToSecretBackendRoleArrayOutputWithContext

func (o SecretBackendRoleArrayOutput) ToSecretBackendRoleArrayOutputWithContext(ctx context.Context) SecretBackendRoleArrayOutput

type SecretBackendRoleInput

type SecretBackendRoleInput interface {
	pulumi.Input

	ToSecretBackendRoleOutput() SecretBackendRoleOutput
	ToSecretBackendRoleOutputWithContext(ctx context.Context) SecretBackendRoleOutput
}

type SecretBackendRoleMap

type SecretBackendRoleMap map[string]SecretBackendRoleInput

func (SecretBackendRoleMap) ElementType

func (SecretBackendRoleMap) ElementType() reflect.Type

func (SecretBackendRoleMap) ToSecretBackendRoleMapOutput

func (i SecretBackendRoleMap) ToSecretBackendRoleMapOutput() SecretBackendRoleMapOutput

func (SecretBackendRoleMap) ToSecretBackendRoleMapOutputWithContext

func (i SecretBackendRoleMap) ToSecretBackendRoleMapOutputWithContext(ctx context.Context) SecretBackendRoleMapOutput

type SecretBackendRoleMapInput

type SecretBackendRoleMapInput interface {
	pulumi.Input

	ToSecretBackendRoleMapOutput() SecretBackendRoleMapOutput
	ToSecretBackendRoleMapOutputWithContext(context.Context) SecretBackendRoleMapOutput
}

SecretBackendRoleMapInput is an input type that accepts SecretBackendRoleMap and SecretBackendRoleMapOutput values. You can construct a concrete instance of `SecretBackendRoleMapInput` via:

SecretBackendRoleMap{ "key": SecretBackendRoleArgs{...} }

type SecretBackendRoleMapOutput

type SecretBackendRoleMapOutput struct{ *pulumi.OutputState }

func (SecretBackendRoleMapOutput) ElementType

func (SecretBackendRoleMapOutput) ElementType() reflect.Type

func (SecretBackendRoleMapOutput) MapIndex

func (SecretBackendRoleMapOutput) ToSecretBackendRoleMapOutput

func (o SecretBackendRoleMapOutput) ToSecretBackendRoleMapOutput() SecretBackendRoleMapOutput

func (SecretBackendRoleMapOutput) ToSecretBackendRoleMapOutputWithContext

func (o SecretBackendRoleMapOutput) ToSecretBackendRoleMapOutputWithContext(ctx context.Context) SecretBackendRoleMapOutput

type SecretBackendRoleOutput

type SecretBackendRoleOutput struct{ *pulumi.OutputState }

func (SecretBackendRoleOutput) ElementType

func (SecretBackendRoleOutput) ElementType() reflect.Type

func (SecretBackendRoleOutput) ToSecretBackendRoleOutput

func (o SecretBackendRoleOutput) ToSecretBackendRoleOutput() SecretBackendRoleOutput

func (SecretBackendRoleOutput) ToSecretBackendRoleOutputWithContext

func (o SecretBackendRoleOutput) ToSecretBackendRoleOutputWithContext(ctx context.Context) SecretBackendRoleOutput

func (SecretBackendRoleOutput) ToSecretBackendRolePtrOutput

func (o SecretBackendRoleOutput) ToSecretBackendRolePtrOutput() SecretBackendRolePtrOutput

func (SecretBackendRoleOutput) ToSecretBackendRolePtrOutputWithContext

func (o SecretBackendRoleOutput) ToSecretBackendRolePtrOutputWithContext(ctx context.Context) SecretBackendRolePtrOutput

type SecretBackendRolePtrInput

type SecretBackendRolePtrInput interface {
	pulumi.Input

	ToSecretBackendRolePtrOutput() SecretBackendRolePtrOutput
	ToSecretBackendRolePtrOutputWithContext(ctx context.Context) SecretBackendRolePtrOutput
}

type SecretBackendRolePtrOutput

type SecretBackendRolePtrOutput struct{ *pulumi.OutputState }

func (SecretBackendRolePtrOutput) Elem added in v4.6.0

func (SecretBackendRolePtrOutput) ElementType

func (SecretBackendRolePtrOutput) ElementType() reflect.Type

func (SecretBackendRolePtrOutput) ToSecretBackendRolePtrOutput

func (o SecretBackendRolePtrOutput) ToSecretBackendRolePtrOutput() SecretBackendRolePtrOutput

func (SecretBackendRolePtrOutput) ToSecretBackendRolePtrOutputWithContext

func (o SecretBackendRolePtrOutput) ToSecretBackendRolePtrOutputWithContext(ctx context.Context) SecretBackendRolePtrOutput

type SecretBackendRoleState

type SecretBackendRoleState struct {
	// The unique name of an existing Consul secrets backend mount. Must not begin or end with a `/`. One of `path` or `backend` is required.
	Backend pulumi.StringPtrInput
	// Indicates that the token should not be replicated globally and instead be local to the current datacenter.
	Local pulumi.BoolPtrInput
	// Maximum TTL for leases associated with this role, in seconds.
	MaxTtl pulumi.IntPtrInput
	// The name of the Consul secrets engine role to create.
	Name pulumi.StringPtrInput
	// The unique name of an existing Consul secrets backend mount. Must not begin or end with a `/`. **Deprecated**
	//
	// Deprecated: use `backend` instead
	Path pulumi.StringPtrInput
	// The list of Consul ACL policies to associate with these roles.
	Policies pulumi.StringArrayInput
	// Specifies the type of token to create when using this role. Valid values are "client" or "management".
	TokenType pulumi.StringPtrInput
	// Specifies the TTL for this role.
	Ttl pulumi.IntPtrInput
}

func (SecretBackendRoleState) ElementType

func (SecretBackendRoleState) ElementType() reflect.Type

type SecretBackendState

type SecretBackendState struct {
	// Specifies the address of the Consul instance, provided as "host:port" like "127.0.0.1:8500".
	Address pulumi.StringPtrInput
	// CA certificate to use when verifying Consul server certificate, must be x509 PEM encoded.
	CaCert pulumi.StringPtrInput
	// Client certificate used for Consul's TLS communication, must be x509 PEM encoded and if this is set you need to also set client_key.
	ClientCert pulumi.StringPtrInput
	// Client key used for Consul's TLS communication, must be x509 PEM encoded and if this is set you need to also set client_cert.
	ClientKey pulumi.StringPtrInput
	// The default TTL for credentials issued by this backend.
	DefaultLeaseTtlSeconds pulumi.IntPtrInput
	// A human-friendly description for this backend.
	Description pulumi.StringPtrInput
	// Specifies if the secret backend is local only.
	Local pulumi.BoolPtrInput
	// The maximum TTL that can be requested
	// for credentials issued by this backend.
	MaxLeaseTtlSeconds pulumi.IntPtrInput
	// The unique location this backend should be mounted at. Must not begin or end with a `/`. Defaults to `consul`.
	Path pulumi.StringPtrInput
	// Specifies the URL scheme to use. Defaults to `http`.
	Scheme pulumi.StringPtrInput
	// The Consul management token this backend should use to issue new tokens.
	Token pulumi.StringPtrInput
}

func (SecretBackendState) ElementType

func (SecretBackendState) ElementType() reflect.Type

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL