Secret Rotation Args
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());
}
}
Content copied to clipboard
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
Content copied to clipboard
Constructors
Link copied to clipboard
constructor(rotationLambdaArn: Output<String>? = null, rotationRules: Output<SecretRotationRotationRulesArgs>? = null, secretId: Output<String>? = null)