Quickstart

This quickstart guide walks you through installing and configuring Takomo, and deploying your first AWS CloudFormation stack.

AWS Credentials Setup

To get started, you’ll need an AWS account with permissions to deploy resources.

  1. Create an IAM user with AdministratorAccess permissions.
  2. Generate access keys for the user.
  3. Add the credentials to your ~/.aws/credentials file under a new profile named takomo-quick-start:
~/.aws/credentials
1[takomo-quick-start]
2aws_access_key_id = ENTER_YOUR_ACCESS_KEY_ID_HERE
3aws_secret_access_key = ENTER_YOUR_SECRET_ACCESS_KEY_HERE

Project Setup

Create and navigate to your project directory:

1mkdir takomo-quick-start
2cd takomo-quick-start

Initialize a new Node.js project:

1npm init -y

Install Takomo as a development dependency:

1npm install --save-dev takomo

Verify the installation:

1npx tkm --version

Stack Configuration

We’ll deploy a simple VPC stack with a customizable CIDR block.

Create a stacks directory:

1mkdir stacks

Inside the stacks directory, create a file named vpc.yml:

1regions: eu-west-1
2parameters:
3  CidrBlock: 10.0.0.0/24

Stack Template

Now, let’s define the CloudFormation template for the VPC.

Create a templates directory next to stacks:

1mkdir templates

Inside the templates directory, create a file named vpc.yml:

1Description: My VPC
2Parameters:
3  CidrBlock:
4  Type: String
5  Description: VPC CIDR block
6Resources:
7  VPC:
8    Type: AWS::EC2::VPC
9    Properties:
10      CidrBlock: !Ref CidrBlock

Deploy the Stack

From the root directory of your project, deploy the stack using:

1npx tkm stacks deploy --profile takomo-quick-start

You will be prompted to confirm the deployment and review a plan showing the proposed changes. Answer yes to proceed.

If your credentials are set up correctly and the IAM user has sufficient permissions, the deployment will succeed.

Clean Up

To remove the stack and its resources:

1npx tkm stacks undeploy --profile takomo-quick-start

Takomo will show a plan before proceeding. Confirm to undeploy, and you’ll see a summary of the results afterward.