-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Michael Tuszynski
committed
Mar 25, 2021
1 parent
be60677
commit 1c7914b
Showing
4 changed files
with
77 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
--- | ||
AWSTemplateFormatVersion: 2010-09-09 | ||
Transform: | ||
- "AWS::Serverless-2016-10-31" | ||
|
||
Parameters: | ||
App: | ||
Type: String | ||
Description: Your application's name. | ||
Env: | ||
Type: String | ||
Description: The environment name your service, job, or workflow is being deployed to. | ||
Name: | ||
Type: String | ||
Description: The name of the service, job, or workflow being deployed. | ||
|
||
Resources: | ||
SecretRotationTemplate: | ||
Type: AWS::Serverless::Application | ||
Properties: | ||
Location: | ||
ApplicationId: arn:aws:serverlessrepo:us-east-1:297356227824:applications/SecretsManagerRDSPostgreSQLRotationSingleUser | ||
SemanticVersion: 1.1.60 | ||
Parameters: | ||
endpoint: !Sub https://secretsmanager.${AWS::Region}.amazonaws.com | ||
functionName: !Sub ${AWS::StackName}-func | ||
vpcSecurityGroupIds: !ImportValue RotationSecurityGroup | ||
vpcSubnetIds: | ||
Fn::Join: | ||
- "," | ||
- - !Select [ | ||
0, | ||
!Split [ | ||
",", | ||
{ "Fn::ImportValue": !Sub "${App}-${Env}-PrivateSubnets" }, | ||
], | ||
] | ||
- !Select [ | ||
1, | ||
!Split [ | ||
",", | ||
{ "Fn::ImportValue": !Sub "${App}-${Env}-PrivateSubnets" }, | ||
], | ||
] | ||
|
||
SecretRotationSchedule: | ||
Type: AWS::SecretsManager::RotationSchedule | ||
Properties: | ||
SecretId: !ImportValue AuroraSecret | ||
RotationLambdaARN: !GetAtt SecretRotationTemplate.Outputs.RotationLambdaARN | ||
RotationRules: | ||
AutomaticallyAfterDays: 30 |