cdktf-aws-secure
TypeScript icon, indicating that this package has built-in type declarations

2.0.1 • Public • Published

NPM version PyPI version Release

Terraform CDK - AWS Secure constructs

The Level 2 construct can be used to set up your AWS account with the reasonably secure configuration baseline. Internally it uses the Terraform CDK and the AWS Provider.

Features

  • Account password policies
  • Cloudtrail
  • Guardduty
  • EBS encrypt default
  • VPC flow log
  • Security Hub
  • Enable Config rules above

Install

Just the constructs

npm install cdktf-aws-secure

Examples

import { Construct } from 'constructs';
import { Resource } from 'cdktf';
import { secure } from 'cdktf-aws-secure';

export class AwsSecure extends Resource {
    constructor(scope: Construct, name: string ) {
        super(scope, name);

        ////// Samples
        const policy = new secure.EnableAccountPasswordPolicy(this, 'DefaultAccountPwdPolicy', {})
        
        policy.addConfigRule() // and also add Config rule.

        // enable guardduty
        new secure.EnableGuardduty(this, 'EnableGuardduty', {});

        // enable cloudtrail
        new secure.EnableCloudTrail(this, 'EnableCloudTrail', {});

        // enable ebs encrypt default
        new secure.EnableEbsEncryption(this, 'EnableEbsEncryption', {});new secure.EnableGuardduty(this, 'EnableGuardduty');

        // enable vpc flow log
        new secure.EnableVpcFlowLog(this, 'EnableVpcFlowLog', {
            vpcId: 'vpc-0123456789'
        });

        // enable security hub
        new secure.EnableSecurityHub(this, 'EnableSecurityHub');
    }
}

Docs

See API Docs

Readme

Keywords

none

Package Sidebar

Install

npm i cdktf-aws-secure

Weekly Downloads

2

Version

2.0.1

License

Apache-2.0

Unpacked Size

672 kB

Total Files

30

Last publish

Collaborators

  • wkliao7804