forked from aws/aws-cdk
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(secretsmanager): replicate secrets to multiple regions (aws#14266)
Secret replication to multiple regions. Closes aws#14061 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
- Loading branch information
Showing
5 changed files
with
130 additions
and
1 deletion.
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
15 changes: 15 additions & 0 deletions
15
packages/@aws-cdk/aws-secretsmanager/test/integ.replica.expected.json
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,15 @@ | ||
{ | ||
"Resources": { | ||
"SecretA720EF05": { | ||
"Type": "AWS::SecretsManager::Secret", | ||
"Properties": { | ||
"GenerateSecretString": {}, | ||
"ReplicaRegions": [ | ||
{ | ||
"Region": "eu-central-1" | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
packages/@aws-cdk/aws-secretsmanager/test/integ.replica.ts
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,15 @@ | ||
import * as cdk from '@aws-cdk/core'; | ||
import * as secretsmanager from '../lib'; | ||
|
||
class TestStack extends cdk.Stack { | ||
constructor(scope: cdk.App, id: string) { | ||
super(scope, id); | ||
|
||
const secret = new secretsmanager.Secret(this, 'Secret'); | ||
secret.addReplicaRegion('eu-central-1'); | ||
} | ||
} | ||
|
||
const app = new cdk.App(); | ||
new TestStack(app, 'cdk-integ-secrets-replica'); | ||
app.synth(); |
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