SecretRotation

class SecretRotation : KotlinCustomResource

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

aws_secretsmanager_secret_rotation can be imported by using the secret Amazon Resource Name (ARN), e.g.,

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

Properties

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Specifies whether automatic rotation is enabled for this secret.

Link copied to clipboard

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>

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.

Link copied to clipboard
val urn: Output<String>