cdk-instance-stop-rule
TypeScript icon, indicating that this package has built-in type declarations

0.1.2 • Public • Published

tecRacer CDK Packages

This package creates an EC2 instance with an Cloudwatch Stop rule included.

Installation

node

npm i cdk-instance-stop-rule

Example usage ts

    // The code that defines your stack goes here
    const testVPC = new Vpc(this, 'TestVpc', {
      maxAzs: 2,
  });
  const linuxImage = new AmazonLinuxImage({
      generation: AmazonLinuxGeneration.AMAZON_LINUX_2,
      edition: AmazonLinuxEdition.STANDARD,
      virtualization: AmazonLinuxVirt.HVM,
      storage: AmazonLinuxStorage.GENERAL_PURPOSE,
  });
  const instanceType = InstanceType.of(InstanceClass.T3A, InstanceSize.MICRO);
  new InstanceStopRule(this, "myTest Instance",{
      machineImage: linuxImage,
      instanceType: instanceType,
      instanceName: "testServer",
      vpc: testVPC,
      stopHour: 17,
  });

Useful commands

  • npm run build compile typescript to js
  • npm run watch watch for changes and compile
  • npm run test perform the jest unit tests

Readme

Keywords

Package Sidebar

Install

npm i cdk-instance-stop-rule

Weekly Downloads

1

Version

0.1.2

License

Apache-2.0

Unpacked Size

46.5 kB

Total Files

18

Last publish

Collaborators

  • megaproaktiv