@pahud/cdktf-aws-ecs
TypeScript icon, indicating that this package has built-in type declarations

0.1.92 • Public • Published

npm version PyPI version release construct hub

cdktf-aws-ecs

CDKTF construct library for Amazon ECS.

Usage

The following sample creates:

  1. A new VPC
  2. Amazon ECS cluster
  3. Autoscaling Group capacity provider
  4. Autoscaling Group with Launch Template
import { Cluster } from '@pahud/cdktf-aws-ecs';

// create the cluster
const cluster = new Cluster(stack, 'EcsCluster');

// create the ASG capacity with capacity provider
cluster.addAsgCapacity('ASGCapacity', {
  maxCapacity: 10,
  minCapacity: 0,
  desiredCapacity: 2,
});

Existing VPC subnets

To deploy in any existing VPC, specify the vpcSubnets.

cluster.addAsgCapacity('ASGCapacity', {
  vpcSubnets: ['subnet-111','subnet-222','subnet-333' ],
});

Bottlerocket support

To create cluster capacity with Bottlerocket machine image:

cluster.addAsgCapacity('BRCapacity', {
  machineImage: new BottleRocketImage(stack),
});

Readme

Keywords

Package Sidebar

Install

npm i @pahud/cdktf-aws-ecs

Weekly Downloads

58

Version

0.1.92

License

Apache-2.0

Unpacked Size

412 kB

Total Files

24

Last publish

Collaborators

  • pahud