@cfn-modules/secret

1.3.0 • Public • Published

Build Status NPM version

cfn-modules: AWS Secrets Manager secret

AWS Secrets Manager secret with encryption.

Install

Install Node.js and npm first!

npm i @cfn-modules/secret

Usage

If you pass in a KMS Module the key will be used to encrypt the secret.

---
AWSTemplateFormatVersion: '2010-09-09'
Description: 'cfn-modules example'
Resources:
  Secret:
    Type: 'AWS::CloudFormation::Stack'
    Properties:
      Parameters:
        KmsKeyModule: !GetAtt 'Key.Outputs.StackName' # optional
        Name: 'my-secret-name' #optional
        Description: 'A secret description' #optional
        CharactersToExclude: '"@/\' # optional
        PasswordLength: 30 # optional
      TemplateURL: './node_modules/@cfn-modules/secret/module.yml'

Examples

none

Related modules

Parameters

Name Description Default Required? Allowed values
KmsKeyModule Stack name of kms-key module no
Name The name to give the secret. This is the name shown in the AWS Console auto generated value no
Description The description to give the secret. This is the description shown in the AWS Console no
CharactersToExclude When generating the initial value these characters will not be used. '"@/\' no
PasswordLength The length of the generated password. 30 no

Wrapper

If you want to use an existing Secret, use the wrapper with the Arn of the existing secret:

---
AWSTemplateFormatVersion: '2010-09-09'
Description: 'cfn-modules example'
Resources:
  Secret:
    Type: 'AWS::CloudFormation::Stack'
    Properties:
      Parameters:
        Arn: 'arn:aws:secretsmanager:eu-west-1:111111111111:secret:name/of/secret' # required
      TemplateURL: './node_modules/@cfn-modules/secret/wrapper.yml'

Package Sidebar

Install

npm i @cfn-modules/secret

Weekly Downloads

75

Version

1.3.0

License

Apache-2.0

Unpacked Size

23.5 kB

Total Files

24

Last publish

Collaborators

  • andreaswittig
  • hellomichibye