secretsmanager

package
v1.19.0 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

nolint: lll

nolint: lll

nolint: lll

nolint: lll

nolint: lll

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GetSecretRotationRule added in v1.19.0

type GetSecretRotationRule struct {
	AutomaticallyAfterDays int `pulumi:"automaticallyAfterDays"`
}

type GetSecretRotationRuleArgs added in v1.19.0

type GetSecretRotationRuleArgs struct {
	AutomaticallyAfterDays pulumi.IntInput `pulumi:"automaticallyAfterDays"`
}

func (GetSecretRotationRuleArgs) ElementType added in v1.19.0

func (GetSecretRotationRuleArgs) ElementType() reflect.Type

func (GetSecretRotationRuleArgs) ToGetSecretRotationRuleOutput added in v1.19.0

func (i GetSecretRotationRuleArgs) ToGetSecretRotationRuleOutput() GetSecretRotationRuleOutput

func (GetSecretRotationRuleArgs) ToGetSecretRotationRuleOutputWithContext added in v1.19.0

func (i GetSecretRotationRuleArgs) ToGetSecretRotationRuleOutputWithContext(ctx context.Context) GetSecretRotationRuleOutput

type GetSecretRotationRuleArray added in v1.19.0

type GetSecretRotationRuleArray []GetSecretRotationRuleInput

func (GetSecretRotationRuleArray) ElementType added in v1.19.0

func (GetSecretRotationRuleArray) ElementType() reflect.Type

func (GetSecretRotationRuleArray) ToGetSecretRotationRuleArrayOutput added in v1.19.0

func (i GetSecretRotationRuleArray) ToGetSecretRotationRuleArrayOutput() GetSecretRotationRuleArrayOutput

func (GetSecretRotationRuleArray) ToGetSecretRotationRuleArrayOutputWithContext added in v1.19.0

func (i GetSecretRotationRuleArray) ToGetSecretRotationRuleArrayOutputWithContext(ctx context.Context) GetSecretRotationRuleArrayOutput

type GetSecretRotationRuleArrayInput added in v1.19.0

type GetSecretRotationRuleArrayInput interface {
	pulumi.Input

	ToGetSecretRotationRuleArrayOutput() GetSecretRotationRuleArrayOutput
	ToGetSecretRotationRuleArrayOutputWithContext(context.Context) GetSecretRotationRuleArrayOutput
}

type GetSecretRotationRuleArrayOutput added in v1.19.0

type GetSecretRotationRuleArrayOutput struct{ *pulumi.OutputState }

func (GetSecretRotationRuleArrayOutput) ElementType added in v1.19.0

func (GetSecretRotationRuleArrayOutput) Index added in v1.19.0

func (GetSecretRotationRuleArrayOutput) ToGetSecretRotationRuleArrayOutput added in v1.19.0

func (o GetSecretRotationRuleArrayOutput) ToGetSecretRotationRuleArrayOutput() GetSecretRotationRuleArrayOutput

func (GetSecretRotationRuleArrayOutput) ToGetSecretRotationRuleArrayOutputWithContext added in v1.19.0

func (o GetSecretRotationRuleArrayOutput) ToGetSecretRotationRuleArrayOutputWithContext(ctx context.Context) GetSecretRotationRuleArrayOutput

type GetSecretRotationRuleInput added in v1.19.0

type GetSecretRotationRuleInput interface {
	pulumi.Input

	ToGetSecretRotationRuleOutput() GetSecretRotationRuleOutput
	ToGetSecretRotationRuleOutputWithContext(context.Context) GetSecretRotationRuleOutput
}

type GetSecretRotationRuleOutput added in v1.19.0

type GetSecretRotationRuleOutput struct{ *pulumi.OutputState }

func (GetSecretRotationRuleOutput) AutomaticallyAfterDays added in v1.19.0

func (o GetSecretRotationRuleOutput) AutomaticallyAfterDays() pulumi.IntOutput

func (GetSecretRotationRuleOutput) ElementType added in v1.19.0

func (GetSecretRotationRuleOutput) ToGetSecretRotationRuleOutput added in v1.19.0

func (o GetSecretRotationRuleOutput) ToGetSecretRotationRuleOutput() GetSecretRotationRuleOutput

func (GetSecretRotationRuleOutput) ToGetSecretRotationRuleOutputWithContext added in v1.19.0

func (o GetSecretRotationRuleOutput) ToGetSecretRotationRuleOutputWithContext(ctx context.Context) GetSecretRotationRuleOutput

type LookupSecretArgs added in v1.19.0

type LookupSecretArgs struct {
	// The Amazon Resource Name (ARN) of the secret to retrieve.
	Arn *string `pulumi:"arn"`
	// The name of the secret to retrieve.
	Name *string `pulumi:"name"`
}

A collection of arguments for invoking getSecret.

type LookupSecretResult added in v1.19.0

type LookupSecretResult struct {
	// The Amazon Resource Name (ARN) of the secret.
	Arn string `pulumi:"arn"`
	// A description of the secret.
	Description string `pulumi:"description"`
	// id is the provider-assigned unique ID for this managed resource.
	Id string `pulumi:"id"`
	// The Key Management Service (KMS) Customer Master Key (CMK) associated with the secret.
	KmsKeyId string `pulumi:"kmsKeyId"`
	Name     string `pulumi:"name"`
	// The resource-based policy document that's attached to the secret.
	Policy string `pulumi:"policy"`
	// Whether rotation is enabled or not.
	RotationEnabled bool `pulumi:"rotationEnabled"`
	// Rotation Lambda function Amazon Resource Name (ARN) if rotation is enabled.
	RotationLambdaArn string `pulumi:"rotationLambdaArn"`
	// Rotation rules if rotation is enabled.
	RotationRules []GetSecretRotationRule `pulumi:"rotationRules"`
	// Tags of the secret.
	Tags map[string]interface{} `pulumi:"tags"`
}

A collection of values returned by getSecret.

func LookupSecret

func LookupSecret(ctx *pulumi.Context, args *LookupSecretArgs, opts ...pulumi.InvokeOption) (*LookupSecretResult, error)

Retrieve metadata information about a Secrets Manager secret. To retrieve a secret value, see the [`secretsmanager.SecretVersion` data source](https://www.terraform.io/docs/providers/aws/d/secretsmanager_secret_version.html).

> This content is derived from https://github.com/terraform-providers/terraform-provider-aws/blob/master/website/docs/d/secretsmanager_secret.html.markdown.

type LookupSecretVersionArgs added in v1.19.0

type LookupSecretVersionArgs struct {
	// Specifies the secret containing the version that you want to retrieve. You can specify either the Amazon Resource Name (ARN) or the friendly name of the secret.
	SecretId string `pulumi:"secretId"`
	// Specifies the unique identifier of the version of the secret that you want to retrieve. Overrides `versionStage`.
	VersionId *string `pulumi:"versionId"`
	// Specifies the secret version that you want to retrieve by the staging label attached to the version. Defaults to `AWSCURRENT`.
	VersionStage *string `pulumi:"versionStage"`
}

A collection of arguments for invoking getSecretVersion.

type LookupSecretVersionResult added in v1.19.0

type LookupSecretVersionResult struct {
	// The ARN of the secret.
	Arn string `pulumi:"arn"`
	// id is the provider-assigned unique ID for this managed resource.
	Id string `pulumi:"id"`
	// The decrypted part of the protected secret information that was originally provided as a binary. Base64 encoded.
	SecretBinary string `pulumi:"secretBinary"`
	SecretId     string `pulumi:"secretId"`
	// The decrypted part of the protected secret information that was originally provided as a string.
	SecretString string `pulumi:"secretString"`
	// The unique identifier of this version of the secret.
	VersionId     string   `pulumi:"versionId"`
	VersionStage  *string  `pulumi:"versionStage"`
	VersionStages []string `pulumi:"versionStages"`
}

A collection of values returned by getSecretVersion.

func LookupSecretVersion

func LookupSecretVersion(ctx *pulumi.Context, args *LookupSecretVersionArgs, opts ...pulumi.InvokeOption) (*LookupSecretVersionResult, error)

Retrieve information about a Secrets Manager secret version, including its secret value. To retrieve secret metadata, see the [`secretsmanager.Secret` data source](https://www.terraform.io/docs/providers/aws/d/secretsmanager_secret.html).

> This content is derived from https://github.com/terraform-providers/terraform-provider-aws/blob/master/website/docs/d/secretsmanager_secret_version.html.markdown.

type Secret

type Secret struct {
	pulumi.CustomResourceState

	// Amazon Resource Name (ARN) of the secret.
	Arn pulumi.StringOutput `pulumi:"arn"`
	// A description of the secret.
	Description pulumi.StringPtrOutput `pulumi:"description"`
	// Specifies the ARN or alias of the AWS KMS customer master key (CMK) to be used to encrypt the secret values in the versions stored in this secret. If you don't specify this value, then Secrets Manager defaults to using the AWS account's default CMK (the one named `aws/secretsmanager`). If the default KMS CMK with that name doesn't yet exist, then AWS Secrets Manager creates it for you automatically the first time.
	KmsKeyId pulumi.StringPtrOutput `pulumi:"kmsKeyId"`
	// Specifies the friendly name of the new secret. The secret name can consist of uppercase letters, lowercase letters, digits, and any of the following characters: `/_+=.@-` Conflicts with `namePrefix`.
	Name pulumi.StringOutput `pulumi:"name"`
	// Creates a unique name beginning with the specified prefix. Conflicts with `name`.
	NamePrefix pulumi.StringOutput    `pulumi:"namePrefix"`
	Policy     pulumi.StringPtrOutput `pulumi:"policy"`
	// Specifies the number of days that AWS Secrets Manager waits before it can delete the secret. This value can be `0` to force deletion without recovery or range from `7` to `30` days. The default value is `30`.
	RecoveryWindowInDays pulumi.IntPtrOutput `pulumi:"recoveryWindowInDays"`
	// Specifies whether automatic rotation is enabled for this secret.
	RotationEnabled pulumi.BoolOutput `pulumi:"rotationEnabled"`
	// Specifies the ARN of the Lambda function that can rotate the secret.
	RotationLambdaArn pulumi.StringPtrOutput `pulumi:"rotationLambdaArn"`
	// A structure that defines the rotation configuration for this secret. Defined below.
	RotationRules SecretRotationRulesPtrOutput `pulumi:"rotationRules"`
	// Specifies a key-value map of user-defined tags that are attached to the secret.
	Tags pulumi.MapOutput `pulumi:"tags"`
}

Provides a resource to manage AWS Secrets Manager secret metadata. To manage a secret value, see the [`secretsmanager.SecretVersion` resource](https://www.terraform.io/docs/providers/aws/r/secretsmanager_secret_version.html).

> This content is derived from https://github.com/terraform-providers/terraform-provider-aws/blob/master/website/docs/r/secretsmanager_secret.html.markdown.

func GetSecret

func GetSecret(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *SecretState, opts ...pulumi.ResourceOption) (*Secret, error)

GetSecret gets an existing Secret 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 NewSecret

func NewSecret(ctx *pulumi.Context,
	name string, args *SecretArgs, opts ...pulumi.ResourceOption) (*Secret, error)

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

type SecretArgs

type SecretArgs struct {
	// A description of the secret.
	Description pulumi.StringPtrInput
	// Specifies the ARN or alias of the AWS KMS customer master key (CMK) to be used to encrypt the secret values in the versions stored in this secret. If you don't specify this value, then Secrets Manager defaults to using the AWS account's default CMK (the one named `aws/secretsmanager`). If the default KMS CMK with that name doesn't yet exist, then AWS Secrets Manager creates it for you automatically the first time.
	KmsKeyId pulumi.StringPtrInput
	// Specifies the friendly name of the new secret. The secret name can consist of uppercase letters, lowercase letters, digits, and any of the following characters: `/_+=.@-` Conflicts with `namePrefix`.
	Name pulumi.StringPtrInput
	// Creates a unique name beginning with the specified prefix. Conflicts with `name`.
	NamePrefix pulumi.StringPtrInput
	Policy     pulumi.StringPtrInput
	// Specifies the number of days that AWS Secrets Manager waits before it can delete the secret. This value can be `0` to force deletion without recovery or range from `7` to `30` days. The default value is `30`.
	RecoveryWindowInDays pulumi.IntPtrInput
	// Specifies the ARN of the Lambda function that can rotate the secret.
	RotationLambdaArn pulumi.StringPtrInput
	// A structure that defines the rotation configuration for this secret. Defined below.
	RotationRules SecretRotationRulesPtrInput
	// Specifies a key-value map of user-defined tags that are attached to the secret.
	Tags pulumi.MapInput
}

The set of arguments for constructing a Secret resource.

func (SecretArgs) ElementType added in v1.19.0

func (SecretArgs) ElementType() reflect.Type

type SecretRotationRules added in v1.19.0

type SecretRotationRules struct {
	// Specifies the number of days between automatic scheduled rotations of the secret.
	AutomaticallyAfterDays int `pulumi:"automaticallyAfterDays"`
}

type SecretRotationRulesArgs added in v1.19.0

type SecretRotationRulesArgs struct {
	// Specifies the number of days between automatic scheduled rotations of the secret.
	AutomaticallyAfterDays pulumi.IntInput `pulumi:"automaticallyAfterDays"`
}

func (SecretRotationRulesArgs) ElementType added in v1.19.0

func (SecretRotationRulesArgs) ElementType() reflect.Type

func (SecretRotationRulesArgs) ToSecretRotationRulesOutput added in v1.19.0

func (i SecretRotationRulesArgs) ToSecretRotationRulesOutput() SecretRotationRulesOutput

func (SecretRotationRulesArgs) ToSecretRotationRulesOutputWithContext added in v1.19.0

func (i SecretRotationRulesArgs) ToSecretRotationRulesOutputWithContext(ctx context.Context) SecretRotationRulesOutput

func (SecretRotationRulesArgs) ToSecretRotationRulesPtrOutput added in v1.19.0

func (i SecretRotationRulesArgs) ToSecretRotationRulesPtrOutput() SecretRotationRulesPtrOutput

func (SecretRotationRulesArgs) ToSecretRotationRulesPtrOutputWithContext added in v1.19.0

func (i SecretRotationRulesArgs) ToSecretRotationRulesPtrOutputWithContext(ctx context.Context) SecretRotationRulesPtrOutput

type SecretRotationRulesInput added in v1.19.0

type SecretRotationRulesInput interface {
	pulumi.Input

	ToSecretRotationRulesOutput() SecretRotationRulesOutput
	ToSecretRotationRulesOutputWithContext(context.Context) SecretRotationRulesOutput
}

type SecretRotationRulesOutput added in v1.19.0

type SecretRotationRulesOutput struct{ *pulumi.OutputState }

func (SecretRotationRulesOutput) AutomaticallyAfterDays added in v1.19.0

func (o SecretRotationRulesOutput) AutomaticallyAfterDays() pulumi.IntOutput

Specifies the number of days between automatic scheduled rotations of the secret.

func (SecretRotationRulesOutput) ElementType added in v1.19.0

func (SecretRotationRulesOutput) ElementType() reflect.Type

func (SecretRotationRulesOutput) ToSecretRotationRulesOutput added in v1.19.0

func (o SecretRotationRulesOutput) ToSecretRotationRulesOutput() SecretRotationRulesOutput

func (SecretRotationRulesOutput) ToSecretRotationRulesOutputWithContext added in v1.19.0

func (o SecretRotationRulesOutput) ToSecretRotationRulesOutputWithContext(ctx context.Context) SecretRotationRulesOutput

func (SecretRotationRulesOutput) ToSecretRotationRulesPtrOutput added in v1.19.0

func (o SecretRotationRulesOutput) ToSecretRotationRulesPtrOutput() SecretRotationRulesPtrOutput

func (SecretRotationRulesOutput) ToSecretRotationRulesPtrOutputWithContext added in v1.19.0

func (o SecretRotationRulesOutput) ToSecretRotationRulesPtrOutputWithContext(ctx context.Context) SecretRotationRulesPtrOutput

type SecretRotationRulesPtrInput added in v1.19.0

type SecretRotationRulesPtrInput interface {
	pulumi.Input

	ToSecretRotationRulesPtrOutput() SecretRotationRulesPtrOutput
	ToSecretRotationRulesPtrOutputWithContext(context.Context) SecretRotationRulesPtrOutput
}

func SecretRotationRulesPtr added in v1.19.0

func SecretRotationRulesPtr(v *SecretRotationRulesArgs) SecretRotationRulesPtrInput

type SecretRotationRulesPtrOutput added in v1.19.0

type SecretRotationRulesPtrOutput struct{ *pulumi.OutputState }

func (SecretRotationRulesPtrOutput) AutomaticallyAfterDays added in v1.19.0

func (o SecretRotationRulesPtrOutput) AutomaticallyAfterDays() pulumi.IntOutput

Specifies the number of days between automatic scheduled rotations of the secret.

func (SecretRotationRulesPtrOutput) Elem added in v1.19.0

func (SecretRotationRulesPtrOutput) ElementType added in v1.19.0

func (SecretRotationRulesPtrOutput) ToSecretRotationRulesPtrOutput added in v1.19.0

func (o SecretRotationRulesPtrOutput) ToSecretRotationRulesPtrOutput() SecretRotationRulesPtrOutput

func (SecretRotationRulesPtrOutput) ToSecretRotationRulesPtrOutputWithContext added in v1.19.0

func (o SecretRotationRulesPtrOutput) ToSecretRotationRulesPtrOutputWithContext(ctx context.Context) SecretRotationRulesPtrOutput

type SecretState

type SecretState struct {
	// Amazon Resource Name (ARN) of the secret.
	Arn pulumi.StringPtrInput
	// A description of the secret.
	Description pulumi.StringPtrInput
	// Specifies the ARN or alias of the AWS KMS customer master key (CMK) to be used to encrypt the secret values in the versions stored in this secret. If you don't specify this value, then Secrets Manager defaults to using the AWS account's default CMK (the one named `aws/secretsmanager`). If the default KMS CMK with that name doesn't yet exist, then AWS Secrets Manager creates it for you automatically the first time.
	KmsKeyId pulumi.StringPtrInput
	// Specifies the friendly name of the new secret. The secret name can consist of uppercase letters, lowercase letters, digits, and any of the following characters: `/_+=.@-` Conflicts with `namePrefix`.
	Name pulumi.StringPtrInput
	// Creates a unique name beginning with the specified prefix. Conflicts with `name`.
	NamePrefix pulumi.StringPtrInput
	Policy     pulumi.StringPtrInput
	// Specifies the number of days that AWS Secrets Manager waits before it can delete the secret. This value can be `0` to force deletion without recovery or range from `7` to `30` days. The default value is `30`.
	RecoveryWindowInDays pulumi.IntPtrInput
	// Specifies whether automatic rotation is enabled for this secret.
	RotationEnabled pulumi.BoolPtrInput
	// Specifies the ARN of the Lambda function that can rotate the secret.
	RotationLambdaArn pulumi.StringPtrInput
	// A structure that defines the rotation configuration for this secret. Defined below.
	RotationRules SecretRotationRulesPtrInput
	// Specifies a key-value map of user-defined tags that are attached to the secret.
	Tags pulumi.MapInput
}

func (SecretState) ElementType added in v1.19.0

func (SecretState) ElementType() reflect.Type

type SecretVersion

type SecretVersion struct {
	pulumi.CustomResourceState

	// The ARN of the secret.
	Arn pulumi.StringOutput `pulumi:"arn"`
	// Specifies binary data that you want to encrypt and store in this version of the secret. This is required if secretString is not set. Needs to be encoded to base64.
	SecretBinary pulumi.StringPtrOutput `pulumi:"secretBinary"`
	// Specifies the secret to which you want to add a new version. You can specify either the Amazon Resource Name (ARN) or the friendly name of the secret. The secret must already exist.
	SecretId pulumi.StringOutput `pulumi:"secretId"`
	// Specifies text data that you want to encrypt and store in this version of the secret. This is required if secretBinary is not set.
	SecretString pulumi.StringPtrOutput `pulumi:"secretString"`
	// The unique identifier of the version of the secret.
	VersionId pulumi.StringOutput `pulumi:"versionId"`
	// Specifies a list of staging labels that are attached to this version of the secret. A staging label must be unique to a single version of the secret. If you specify a staging label that's already associated with a different version of the same secret then that staging label is automatically removed from the other version and attached to this version. If you do not specify a value, then AWS Secrets Manager automatically moves the staging label `AWSCURRENT` to this new version on creation.
	VersionStages pulumi.StringArrayOutput `pulumi:"versionStages"`
}

Provides a resource to manage AWS Secrets Manager secret version including its secret value. To manage secret metadata, see the [`secretsmanager.Secret` resource](https://www.terraform.io/docs/providers/aws/r/secretsmanager_secret.html).

> **NOTE:** If the `AWSCURRENT` staging label is present on this version during resource deletion, that label cannot be removed and will be skipped to prevent errors when fully deleting the secret. That label will leave this secret version active even after the resource is deleted from this provider unless the secret itself is deleted. Move the `AWSCURRENT` staging label before or after deleting this resource from this provider to fully trigger version deprecation if necessary.

> This content is derived from https://github.com/terraform-providers/terraform-provider-aws/blob/master/website/docs/r/secretsmanager_secret_version.html.markdown.

func GetSecretVersion

func GetSecretVersion(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *SecretVersionState, opts ...pulumi.ResourceOption) (*SecretVersion, error)

GetSecretVersion gets an existing SecretVersion 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 NewSecretVersion

func NewSecretVersion(ctx *pulumi.Context,
	name string, args *SecretVersionArgs, opts ...pulumi.ResourceOption) (*SecretVersion, error)

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

type SecretVersionArgs

type SecretVersionArgs struct {
	// Specifies binary data that you want to encrypt and store in this version of the secret. This is required if secretString is not set. Needs to be encoded to base64.
	SecretBinary pulumi.StringPtrInput
	// Specifies the secret to which you want to add a new version. You can specify either the Amazon Resource Name (ARN) or the friendly name of the secret. The secret must already exist.
	SecretId pulumi.StringInput
	// Specifies text data that you want to encrypt and store in this version of the secret. This is required if secretBinary is not set.
	SecretString pulumi.StringPtrInput
	// Specifies a list of staging labels that are attached to this version of the secret. A staging label must be unique to a single version of the secret. If you specify a staging label that's already associated with a different version of the same secret then that staging label is automatically removed from the other version and attached to this version. If you do not specify a value, then AWS Secrets Manager automatically moves the staging label `AWSCURRENT` to this new version on creation.
	VersionStages pulumi.StringArrayInput
}

The set of arguments for constructing a SecretVersion resource.

func (SecretVersionArgs) ElementType added in v1.19.0

func (SecretVersionArgs) ElementType() reflect.Type

type SecretVersionState

type SecretVersionState struct {
	// The ARN of the secret.
	Arn pulumi.StringPtrInput
	// Specifies binary data that you want to encrypt and store in this version of the secret. This is required if secretString is not set. Needs to be encoded to base64.
	SecretBinary pulumi.StringPtrInput
	// Specifies the secret to which you want to add a new version. You can specify either the Amazon Resource Name (ARN) or the friendly name of the secret. The secret must already exist.
	SecretId pulumi.StringPtrInput
	// Specifies text data that you want to encrypt and store in this version of the secret. This is required if secretBinary is not set.
	SecretString pulumi.StringPtrInput
	// The unique identifier of the version of the secret.
	VersionId pulumi.StringPtrInput
	// Specifies a list of staging labels that are attached to this version of the secret. A staging label must be unique to a single version of the secret. If you specify a staging label that's already associated with a different version of the same secret then that staging label is automatically removed from the other version and attached to this version. If you do not specify a value, then AWS Secrets Manager automatically moves the staging label `AWSCURRENT` to this new version on creation.
	VersionStages pulumi.StringArrayInput
}

func (SecretVersionState) ElementType added in v1.19.0

func (SecretVersionState) ElementType() reflect.Type

Jump to

Keyboard shortcuts

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