Skip to main content

Powered by

SnkRes iwrap is developed and maintained by SnkRes

Quick Start

This guide will help you get started with iwrap and deploy your first infrastructure in just a few minutes.

Prerequisites

Before you begin, ensure you have:
  • Node.js 18+ (if installing via npm)
  • Terraform 1.0+ installed and in your PATH
  • AWS CLI configured with credentials
  • AWS account with appropriate permissions
Make sure Terraform is accessible from your terminal. You can verify by running terraform version.

Installation

Choose your preferred installation method:
npm install -g iwrap
Verify installation:
iwrap --version

Deploy Your First Infrastructure

Follow these steps to get your first deployment up and running:
1

Initialize Project

Create a new directory and initialize your iwrap project:
mkdir my-infrastructure
cd my-infrastructure
iwrap init
This creates:
  • config/ directory with example configuration files
  • terraform/ directory structure
  • templates/ directory with code templates
The iwrap init command sets up a complete project structure with example configurations you can customize.
2

Configure AWS Account

Add your AWS account. You can use auto-detection (recommended) or add manually:
# Detect accounts from your AWS CLI configuration
iwrap account detect

# Import the detected account
iwrap account import production
Set the active account:
iwrap account set dev-account
Make sure your AWS credentials are configured correctly. Run aws configure list to verify.
3

Define Services

Edit config/services.yaml to define your services. Here’s an example for an ECS service:
config/services.yaml
services:
  - name: api-service
    type: ecs
    image: myapp/api:latest
    port: 8080
    cpu: 512
    memory: 1024
    count:
      min: 1
      max: 10
      desired: 2
    environment: dev
For more service types and configuration options, see the Service Configuration Guide.
4

Plan Deployment

Before deploying, review what will be created:
iwrap deploy plan --env dev
This shows you a Terraform plan of all resources that will be created, modified, or destroyed.
5

Deploy

Deploy your infrastructure to the dev environment:
iwrap deploy --env dev
The deployment will:
  • Validate your configuration
  • Generate Terraform files
  • Apply the Terraform plan
  • Display deployment status
Use the --auto-approve flag to skip confirmation prompts in CI/CD pipelines.

What’s Next?

Now that you’ve deployed your first infrastructure, explore these resources: