infrastructure-stack.ts 542 B

1234567891011121314151617
  1. import * as cdk from '@aws-cdk/core';
  2. import * as secretsmanager from '@aws-cdk/aws-secretsmanager';
  3. export class InfrastructureStack extends cdk.Stack {
  4. constructor(scope: cdk.Construct, id: string, props?: cdk.StackProps) {
  5. super(scope, id, props);
  6. new secretsmanager.Secret(this, 'Secret', {
  7. secretName: '/secrets/spring-cloud-aws-sample-app',
  8. generateSecretString: {
  9. secretStringTemplate: '{}',
  10. generateStringKey: 'password',
  11. excludeCharacters: '#$' // Spring tries to interpolate any ${} and #{}
  12. }
  13. });
  14. }
  15. }