Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(secretsmanager): hosted rotation with fromSecretNameV2() does not create correct iam policy #28379

Merged
merged 9 commits into from
Dec 20, 2023

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@
"SecretSchedule18F2CB66": {
"Type": "AWS::SecretsManager::RotationSchedule",
"Properties": {
"SecretId": {
"Ref": "SecretA720EF05"
},
"HostedRotationLambda": {
"ExcludeCharacters": " %+~`#$&*()|[]{}:;<>?!'/@\"\\",
"RotationType": "MySQLSingleUser"
},
"RotationRules": {
"ScheduleExpression": "rate(30 days)"
},
"SecretId": {
"Ref": "SecretA720EF05"
}
}
},
Expand Down Expand Up @@ -75,16 +75,16 @@
"CustomSecretScheduleDD99F351": {
"Type": "AWS::SecretsManager::RotationSchedule",
"Properties": {
"SecretId": {
"Ref": "CustomSecret5DC95D87"
},
"HostedRotationLambda": {
"ExcludeCharacters": "&@/",
"RotationType": "MySQLSingleUser"
},
"RotateImmediatelyOnUpdate": false,
"RotationRules": {
"ScheduleExpression": "rate(30 days)"
},
"SecretId": {
"Ref": "CustomSecret5DC95D87"
}
}
},
Expand Down Expand Up @@ -123,6 +123,85 @@
"Ref": "CustomSecret5DC95D87"
}
}
},
"MySecret8FE80B51": {
"Type": "AWS::SecretsManager::Secret",
"Properties": {
"GenerateSecretString": {}
},
"UpdateReplacePolicy": "Delete",
"DeletionPolicy": "Delete"
},
"MySecretRotationSchedule673B961C": {
"Type": "AWS::SecretsManager::RotationSchedule",
"Properties": {
"HostedRotationLambda": {
"ExcludeCharacters": " %+~`#$&*()|[]{}:;<>?!'/@\"\\",
"MasterSecretArn": {
"Fn::Join": [
"",
[
"arn:",
{
"Ref": "AWS::Partition"
},
":secretsmanager:",
{
"Ref": "AWS::Region"
},
":",
{
"Ref": "AWS::AccountId"
},
":secret:MasterSecret-??????"
]
]
},
"RotationType": "PostgreSQLMultiUser"
},
"RotationRules": {
"ScheduleExpression": "rate(30 days)"
},
"SecretId": {
"Ref": "MySecret8FE80B51"
}
}
},
"MySecretPolicyDAD0E682": {
"Type": "AWS::SecretsManager::ResourcePolicy",
"Properties": {
"ResourcePolicy": {
"Statement": [
{
"Action": "secretsmanager:DeleteSecret",
"Effect": "Deny",
"Principal": {
"AWS": {
"Fn::Join": [
"",
[
"arn:",
{
"Ref": "AWS::Partition"
},
":iam::",
{
"Ref": "AWS::AccountId"
},
":root"
]
]
}
},
"Resource": "*"
}
],
"Version": "2012-10-17"
},
"SecretId": {
"Ref": "MySecret8FE80B51"
}
}
}
},
"Parameters": {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading