SecretRotationArgs

data class SecretRotationArgs(val rotationLambdaArn: Output<String>? = null, val rotationRules: Output<SecretRotationRotationRulesArgs>? = null, val secretId: Output<String>? = null) : ConvertibleToJava<SecretRotationArgs>

Provides a resource to manage AWS Secrets Manager secret rotation. To manage a secret, see the aws.secretsmanager.Secret resource. To manage a secret value, see the aws.secretsmanager.SecretVersion resource.

Example Usage

Basic

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.secretsmanager.SecretRotation;
import com.pulumi.aws.secretsmanager.SecretRotationArgs;
import com.pulumi.aws.secretsmanager.inputs.SecretRotationRotationRulesArgs;
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 example = new SecretRotation("example", SecretRotationArgs.builder()
.secretId(aws_secretsmanager_secret.example().id())
.rotationLambdaArn(aws_lambda_function.example().arn())
.rotationRules(SecretRotationRotationRulesArgs.builder()
.automaticallyAfterDays(30)
.build())
.build());
}
}

Import

Using pulumi import, import aws_secretsmanager_secret_rotation using the secret Amazon Resource Name (ARN). For example:

$ pulumi import aws:secretsmanager/secretRotation:SecretRotation example arn:aws:secretsmanager:us-east-1:123456789012:secret:example-123456

Constructors

Link copied to clipboard
fun SecretRotationArgs(rotationLambdaArn: Output<String>? = null, rotationRules: Output<SecretRotationRotationRulesArgs>? = null, secretId: Output<String>? = null)

Functions

Link copied to clipboard
open override fun toJava(): SecretRotationArgs

Properties

Link copied to clipboard
val rotationLambdaArn: Output<String>? = null

Specifies the ARN of the Lambda function that can rotate the secret.

Link copied to clipboard

A structure that defines the rotation configuration for this secret. Defined below.

Link copied to clipboard
val secretId: Output<String>? = null

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.