1. Packages
  2. AWS
  3. API Docs
  4. secretsmanager
  5. SecretRotation
AWS v6.54.0 published on Friday, Sep 27, 2024 by Pulumi

aws.secretsmanager.SecretRotation

Explore with Pulumi AI

aws logo
AWS v6.54.0 published on Friday, Sep 27, 2024 by Pulumi

    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

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.secretsmanager.SecretRotation("example", {
        secretId: exampleAwsSecretsmanagerSecret.id,
        rotationLambdaArn: exampleAwsLambdaFunction.arn,
        rotationRules: {
            automaticallyAfterDays: 30,
        },
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.secretsmanager.SecretRotation("example",
        secret_id=example_aws_secretsmanager_secret["id"],
        rotation_lambda_arn=example_aws_lambda_function["arn"],
        rotation_rules={
            "automatically_after_days": 30,
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/secretsmanager"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := secretsmanager.NewSecretRotation(ctx, "example", &secretsmanager.SecretRotationArgs{
    			SecretId:          pulumi.Any(exampleAwsSecretsmanagerSecret.Id),
    			RotationLambdaArn: pulumi.Any(exampleAwsLambdaFunction.Arn),
    			RotationRules: &secretsmanager.SecretRotationRotationRulesArgs{
    				AutomaticallyAfterDays: pulumi.Int(30),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Aws.SecretsManager.SecretRotation("example", new()
        {
            SecretId = exampleAwsSecretsmanagerSecret.Id,
            RotationLambdaArn = exampleAwsLambdaFunction.Arn,
            RotationRules = new Aws.SecretsManager.Inputs.SecretRotationRotationRulesArgs
            {
                AutomaticallyAfterDays = 30,
            },
        });
    
    });
    
    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(exampleAwsSecretsmanagerSecret.id())
                .rotationLambdaArn(exampleAwsLambdaFunction.arn())
                .rotationRules(SecretRotationRotationRulesArgs.builder()
                    .automaticallyAfterDays(30)
                    .build())
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:secretsmanager:SecretRotation
        properties:
          secretId: ${exampleAwsSecretsmanagerSecret.id}
          rotationLambdaArn: ${exampleAwsLambdaFunction.arn}
          rotationRules:
            automaticallyAfterDays: 30
    

    Rotation Configuration

    To enable automatic secret rotation, the Secrets Manager service requires usage of a Lambda function. The Rotate Secrets section in the Secrets Manager User Guide provides additional information about deploying a prebuilt Lambda functions for supported credential rotation (e.g., RDS) or deploying a custom Lambda function.

    NOTE: Configuring rotation causes the secret to rotate once as soon as you enable rotation. Before you do this, you must ensure that all of your applications that use the credentials stored in the secret are updated to retrieve the secret from AWS Secrets Manager. The old credentials might no longer be usable after the initial rotation and any applications that you fail to update will break as soon as the old credentials are no longer valid.

    NOTE: If you cancel a rotation that is in progress (by removing the rotation configuration), it can leave the VersionStage labels in an unexpected state. Depending on what step of the rotation was in progress, you might need to remove the staging label AWSPENDING from the partially created version, specified by the SecretVersionId response value. You should also evaluate the partially rotated new version to see if it should be deleted, which you can do by removing all staging labels from the new version’s VersionStage field.

    Create SecretRotation Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new SecretRotation(name: string, args: SecretRotationArgs, opts?: CustomResourceOptions);
    @overload
    def SecretRotation(resource_name: str,
                       args: SecretRotationArgs,
                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def SecretRotation(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       rotation_rules: Optional[SecretRotationRotationRulesArgs] = None,
                       secret_id: Optional[str] = None,
                       rotate_immediately: Optional[bool] = None,
                       rotation_lambda_arn: Optional[str] = None)
    func NewSecretRotation(ctx *Context, name string, args SecretRotationArgs, opts ...ResourceOption) (*SecretRotation, error)
    public SecretRotation(string name, SecretRotationArgs args, CustomResourceOptions? opts = null)
    public SecretRotation(String name, SecretRotationArgs args)
    public SecretRotation(String name, SecretRotationArgs args, CustomResourceOptions options)
    
    type: aws:secretsmanager:SecretRotation
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args SecretRotationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args SecretRotationArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args SecretRotationArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SecretRotationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SecretRotationArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var secretRotationResource = new Aws.SecretsManager.SecretRotation("secretRotationResource", new()
    {
        RotationRules = new Aws.SecretsManager.Inputs.SecretRotationRotationRulesArgs
        {
            AutomaticallyAfterDays = 0,
            Duration = "string",
            ScheduleExpression = "string",
        },
        SecretId = "string",
        RotateImmediately = false,
        RotationLambdaArn = "string",
    });
    
    example, err := secretsmanager.NewSecretRotation(ctx, "secretRotationResource", &secretsmanager.SecretRotationArgs{
    	RotationRules: &secretsmanager.SecretRotationRotationRulesArgs{
    		AutomaticallyAfterDays: pulumi.Int(0),
    		Duration:               pulumi.String("string"),
    		ScheduleExpression:     pulumi.String("string"),
    	},
    	SecretId:          pulumi.String("string"),
    	RotateImmediately: pulumi.Bool(false),
    	RotationLambdaArn: pulumi.String("string"),
    })
    
    var secretRotationResource = new SecretRotation("secretRotationResource", SecretRotationArgs.builder()
        .rotationRules(SecretRotationRotationRulesArgs.builder()
            .automaticallyAfterDays(0)
            .duration("string")
            .scheduleExpression("string")
            .build())
        .secretId("string")
        .rotateImmediately(false)
        .rotationLambdaArn("string")
        .build());
    
    secret_rotation_resource = aws.secretsmanager.SecretRotation("secretRotationResource",
        rotation_rules={
            "automaticallyAfterDays": 0,
            "duration": "string",
            "scheduleExpression": "string",
        },
        secret_id="string",
        rotate_immediately=False,
        rotation_lambda_arn="string")
    
    const secretRotationResource = new aws.secretsmanager.SecretRotation("secretRotationResource", {
        rotationRules: {
            automaticallyAfterDays: 0,
            duration: "string",
            scheduleExpression: "string",
        },
        secretId: "string",
        rotateImmediately: false,
        rotationLambdaArn: "string",
    });
    
    type: aws:secretsmanager:SecretRotation
    properties:
        rotateImmediately: false
        rotationLambdaArn: string
        rotationRules:
            automaticallyAfterDays: 0
            duration: string
            scheduleExpression: string
        secretId: string
    

    SecretRotation Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The SecretRotation resource accepts the following input properties:

    RotationRules SecretRotationRotationRules
    A structure that defines the rotation configuration for this secret. Defined below.
    SecretId 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.
    RotateImmediately bool
    Specifies whether to rotate the secret immediately or wait until the next scheduled rotation window. The rotation schedule is defined in rotation_rules. For secrets that use a Lambda rotation function to rotate, if you don't immediately rotate the secret, Secrets Manager tests the rotation configuration by running the testSecret step (https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotate-secrets_how.html) of the Lambda rotation function. The test creates an AWSPENDING version of the secret and then removes it. Defaults to true.
    RotationLambdaArn string
    Specifies the ARN of the Lambda function that can rotate the secret. Must be supplied if the secret is not managed by AWS.
    RotationRules SecretRotationRotationRulesArgs
    A structure that defines the rotation configuration for this secret. Defined below.
    SecretId 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.
    RotateImmediately bool
    Specifies whether to rotate the secret immediately or wait until the next scheduled rotation window. The rotation schedule is defined in rotation_rules. For secrets that use a Lambda rotation function to rotate, if you don't immediately rotate the secret, Secrets Manager tests the rotation configuration by running the testSecret step (https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotate-secrets_how.html) of the Lambda rotation function. The test creates an AWSPENDING version of the secret and then removes it. Defaults to true.
    RotationLambdaArn string
    Specifies the ARN of the Lambda function that can rotate the secret. Must be supplied if the secret is not managed by AWS.
    rotationRules SecretRotationRotationRules
    A structure that defines the rotation configuration for this secret. Defined below.
    secretId 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.
    rotateImmediately Boolean
    Specifies whether to rotate the secret immediately or wait until the next scheduled rotation window. The rotation schedule is defined in rotation_rules. For secrets that use a Lambda rotation function to rotate, if you don't immediately rotate the secret, Secrets Manager tests the rotation configuration by running the testSecret step (https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotate-secrets_how.html) of the Lambda rotation function. The test creates an AWSPENDING version of the secret and then removes it. Defaults to true.
    rotationLambdaArn String
    Specifies the ARN of the Lambda function that can rotate the secret. Must be supplied if the secret is not managed by AWS.
    rotationRules SecretRotationRotationRules
    A structure that defines the rotation configuration for this secret. Defined below.
    secretId 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.
    rotateImmediately boolean
    Specifies whether to rotate the secret immediately or wait until the next scheduled rotation window. The rotation schedule is defined in rotation_rules. For secrets that use a Lambda rotation function to rotate, if you don't immediately rotate the secret, Secrets Manager tests the rotation configuration by running the testSecret step (https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotate-secrets_how.html) of the Lambda rotation function. The test creates an AWSPENDING version of the secret and then removes it. Defaults to true.
    rotationLambdaArn string
    Specifies the ARN of the Lambda function that can rotate the secret. Must be supplied if the secret is not managed by AWS.
    rotation_rules SecretRotationRotationRulesArgs
    A structure that defines the rotation configuration for this secret. Defined below.
    secret_id str
    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.
    rotate_immediately bool
    Specifies whether to rotate the secret immediately or wait until the next scheduled rotation window. The rotation schedule is defined in rotation_rules. For secrets that use a Lambda rotation function to rotate, if you don't immediately rotate the secret, Secrets Manager tests the rotation configuration by running the testSecret step (https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotate-secrets_how.html) of the Lambda rotation function. The test creates an AWSPENDING version of the secret and then removes it. Defaults to true.
    rotation_lambda_arn str
    Specifies the ARN of the Lambda function that can rotate the secret. Must be supplied if the secret is not managed by AWS.
    rotationRules Property Map
    A structure that defines the rotation configuration for this secret. Defined below.
    secretId 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.
    rotateImmediately Boolean
    Specifies whether to rotate the secret immediately or wait until the next scheduled rotation window. The rotation schedule is defined in rotation_rules. For secrets that use a Lambda rotation function to rotate, if you don't immediately rotate the secret, Secrets Manager tests the rotation configuration by running the testSecret step (https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotate-secrets_how.html) of the Lambda rotation function. The test creates an AWSPENDING version of the secret and then removes it. Defaults to true.
    rotationLambdaArn String
    Specifies the ARN of the Lambda function that can rotate the secret. Must be supplied if the secret is not managed by AWS.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the SecretRotation resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    RotationEnabled bool
    Specifies whether automatic rotation is enabled for this secret.
    Id string
    The provider-assigned unique ID for this managed resource.
    RotationEnabled bool
    Specifies whether automatic rotation is enabled for this secret.
    id String
    The provider-assigned unique ID for this managed resource.
    rotationEnabled Boolean
    Specifies whether automatic rotation is enabled for this secret.
    id string
    The provider-assigned unique ID for this managed resource.
    rotationEnabled boolean
    Specifies whether automatic rotation is enabled for this secret.
    id str
    The provider-assigned unique ID for this managed resource.
    rotation_enabled bool
    Specifies whether automatic rotation is enabled for this secret.
    id String
    The provider-assigned unique ID for this managed resource.
    rotationEnabled Boolean
    Specifies whether automatic rotation is enabled for this secret.

    Look up Existing SecretRotation Resource

    Get an existing SecretRotation resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: SecretRotationState, opts?: CustomResourceOptions): SecretRotation
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            rotate_immediately: Optional[bool] = None,
            rotation_enabled: Optional[bool] = None,
            rotation_lambda_arn: Optional[str] = None,
            rotation_rules: Optional[SecretRotationRotationRulesArgs] = None,
            secret_id: Optional[str] = None) -> SecretRotation
    func GetSecretRotation(ctx *Context, name string, id IDInput, state *SecretRotationState, opts ...ResourceOption) (*SecretRotation, error)
    public static SecretRotation Get(string name, Input<string> id, SecretRotationState? state, CustomResourceOptions? opts = null)
    public static SecretRotation get(String name, Output<String> id, SecretRotationState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    RotateImmediately bool
    Specifies whether to rotate the secret immediately or wait until the next scheduled rotation window. The rotation schedule is defined in rotation_rules. For secrets that use a Lambda rotation function to rotate, if you don't immediately rotate the secret, Secrets Manager tests the rotation configuration by running the testSecret step (https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotate-secrets_how.html) of the Lambda rotation function. The test creates an AWSPENDING version of the secret and then removes it. Defaults to true.
    RotationEnabled bool
    Specifies whether automatic rotation is enabled for this secret.
    RotationLambdaArn string
    Specifies the ARN of the Lambda function that can rotate the secret. Must be supplied if the secret is not managed by AWS.
    RotationRules SecretRotationRotationRules
    A structure that defines the rotation configuration for this secret. Defined below.
    SecretId 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.
    RotateImmediately bool
    Specifies whether to rotate the secret immediately or wait until the next scheduled rotation window. The rotation schedule is defined in rotation_rules. For secrets that use a Lambda rotation function to rotate, if you don't immediately rotate the secret, Secrets Manager tests the rotation configuration by running the testSecret step (https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotate-secrets_how.html) of the Lambda rotation function. The test creates an AWSPENDING version of the secret and then removes it. Defaults to true.
    RotationEnabled bool
    Specifies whether automatic rotation is enabled for this secret.
    RotationLambdaArn string
    Specifies the ARN of the Lambda function that can rotate the secret. Must be supplied if the secret is not managed by AWS.
    RotationRules SecretRotationRotationRulesArgs
    A structure that defines the rotation configuration for this secret. Defined below.
    SecretId 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.
    rotateImmediately Boolean
    Specifies whether to rotate the secret immediately or wait until the next scheduled rotation window. The rotation schedule is defined in rotation_rules. For secrets that use a Lambda rotation function to rotate, if you don't immediately rotate the secret, Secrets Manager tests the rotation configuration by running the testSecret step (https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotate-secrets_how.html) of the Lambda rotation function. The test creates an AWSPENDING version of the secret and then removes it. Defaults to true.
    rotationEnabled Boolean
    Specifies whether automatic rotation is enabled for this secret.
    rotationLambdaArn String
    Specifies the ARN of the Lambda function that can rotate the secret. Must be supplied if the secret is not managed by AWS.
    rotationRules SecretRotationRotationRules
    A structure that defines the rotation configuration for this secret. Defined below.
    secretId 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.
    rotateImmediately boolean
    Specifies whether to rotate the secret immediately or wait until the next scheduled rotation window. The rotation schedule is defined in rotation_rules. For secrets that use a Lambda rotation function to rotate, if you don't immediately rotate the secret, Secrets Manager tests the rotation configuration by running the testSecret step (https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotate-secrets_how.html) of the Lambda rotation function. The test creates an AWSPENDING version of the secret and then removes it. Defaults to true.
    rotationEnabled boolean
    Specifies whether automatic rotation is enabled for this secret.
    rotationLambdaArn string
    Specifies the ARN of the Lambda function that can rotate the secret. Must be supplied if the secret is not managed by AWS.
    rotationRules SecretRotationRotationRules
    A structure that defines the rotation configuration for this secret. Defined below.
    secretId 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.
    rotate_immediately bool
    Specifies whether to rotate the secret immediately or wait until the next scheduled rotation window. The rotation schedule is defined in rotation_rules. For secrets that use a Lambda rotation function to rotate, if you don't immediately rotate the secret, Secrets Manager tests the rotation configuration by running the testSecret step (https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotate-secrets_how.html) of the Lambda rotation function. The test creates an AWSPENDING version of the secret and then removes it. Defaults to true.
    rotation_enabled bool
    Specifies whether automatic rotation is enabled for this secret.
    rotation_lambda_arn str
    Specifies the ARN of the Lambda function that can rotate the secret. Must be supplied if the secret is not managed by AWS.
    rotation_rules SecretRotationRotationRulesArgs
    A structure that defines the rotation configuration for this secret. Defined below.
    secret_id str
    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.
    rotateImmediately Boolean
    Specifies whether to rotate the secret immediately or wait until the next scheduled rotation window. The rotation schedule is defined in rotation_rules. For secrets that use a Lambda rotation function to rotate, if you don't immediately rotate the secret, Secrets Manager tests the rotation configuration by running the testSecret step (https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotate-secrets_how.html) of the Lambda rotation function. The test creates an AWSPENDING version of the secret and then removes it. Defaults to true.
    rotationEnabled Boolean
    Specifies whether automatic rotation is enabled for this secret.
    rotationLambdaArn String
    Specifies the ARN of the Lambda function that can rotate the secret. Must be supplied if the secret is not managed by AWS.
    rotationRules Property Map
    A structure that defines the rotation configuration for this secret. Defined below.
    secretId 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.

    Supporting Types

    SecretRotationRotationRules, SecretRotationRotationRulesArgs

    AutomaticallyAfterDays int
    Specifies the number of days between automatic scheduled rotations of the secret. Either automatically_after_days or schedule_expression must be specified.
    Duration string
    The length of the rotation window in hours. For example, 3h for a three hour window.
    ScheduleExpression string
    A cron() or rate() expression that defines the schedule for rotating your secret. Either automatically_after_days or schedule_expression must be specified.
    AutomaticallyAfterDays int
    Specifies the number of days between automatic scheduled rotations of the secret. Either automatically_after_days or schedule_expression must be specified.
    Duration string
    The length of the rotation window in hours. For example, 3h for a three hour window.
    ScheduleExpression string
    A cron() or rate() expression that defines the schedule for rotating your secret. Either automatically_after_days or schedule_expression must be specified.
    automaticallyAfterDays Integer
    Specifies the number of days between automatic scheduled rotations of the secret. Either automatically_after_days or schedule_expression must be specified.
    duration String
    The length of the rotation window in hours. For example, 3h for a three hour window.
    scheduleExpression String
    A cron() or rate() expression that defines the schedule for rotating your secret. Either automatically_after_days or schedule_expression must be specified.
    automaticallyAfterDays number
    Specifies the number of days between automatic scheduled rotations of the secret. Either automatically_after_days or schedule_expression must be specified.
    duration string
    The length of the rotation window in hours. For example, 3h for a three hour window.
    scheduleExpression string
    A cron() or rate() expression that defines the schedule for rotating your secret. Either automatically_after_days or schedule_expression must be specified.
    automatically_after_days int
    Specifies the number of days between automatic scheduled rotations of the secret. Either automatically_after_days or schedule_expression must be specified.
    duration str
    The length of the rotation window in hours. For example, 3h for a three hour window.
    schedule_expression str
    A cron() or rate() expression that defines the schedule for rotating your secret. Either automatically_after_days or schedule_expression must be specified.
    automaticallyAfterDays Number
    Specifies the number of days between automatic scheduled rotations of the secret. Either automatically_after_days or schedule_expression must be specified.
    duration String
    The length of the rotation window in hours. For example, 3h for a three hour window.
    scheduleExpression String
    A cron() or rate() expression that defines the schedule for rotating your secret. Either automatically_after_days or schedule_expression must be specified.

    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
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo
    AWS v6.54.0 published on Friday, Sep 27, 2024 by Pulumi