1.0.5 • Published 1 year ago

@invisinet/stack-creator v1.0.5

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

AWS SDK For Creating Cloudformation Stack

Authors

Overview

Effortlessly Create and Manage AWS CloudFormation Stacks Using Node.js

@invisinet/stack-creator empowers you to directly create and manage AWS CloudFormation stacks from your Node.js environment, streamlining infrastructure provisioning and automation. It offers:

  • Direct Stack Creation: Conveniently create stacks without manual AWS Console interactions.
  • Streamlined Automation: Integrate stack management seamlessly into your Node.js workflows.
  • Flexible Deployment: Choose between local installation or global execution via npx.
  • Secure Credentials Handling: Supports secure storage and retrieval of AWS credentials.
  • Customizable Configuration: Override default settings for specific needs.
  • Public Availability: Readily accessible through npm for effortless integration.

Key Features:

  • Simple command-line interface for stack creation and management.
  • Support for AWS credentials through environment variables or configuration files.
  • Ability to specify CloudFormation template files and optional configuration overrides.
  • Clear output for tracking stack creation progress and status.

Usage

Prerequisites: Node.js (LTS)

Usage Help:

You can get help meaning the required format by executing below command.

# Using npx
npx @invisinet/stack-creator help;
# or
npx @invisinet/stack-creator --help;
# or
npx @invisinet/stack-creator -h;
# or
npx @invisinet/stack-creator ?;

Usage steps:

# Using npx
# NOTE: `overrideParameterDefaults` is not mandatory if you don't override the default parameters
npx @invisinet/stack-creator region=<val> stackName=<val> accessKeyID=<val> secretAccessKey=<val> overrideParameterDefaults=<path>;

Default Parameters:

Below are the default parameters passed to create a Stack in CloudFormation. Refer Override Default Parameters to modify the defaults.

Parameters:
  MyIP:
    Default: "38.104.62.78/32"
    Description: "Enter your management IP address allows SSH"
    Type: String
  VpcName:
    Default: "InvisinetTest"
    Description: "Enter the name for the VPC"
    Type: String
  VpcCidr:
    Default: "10.0.0.0/16"
    Description: "Enter the CIDR block for the VPC"
    Type: String
  KeyNameGW:
    Default: "GWTest1"
    Description: "Enter name of GW keypair (Do not use default)"
    Type: String
  GWIP:
    Default: "10.0.10.10"
    Description: "Enter the PIP of the GW"
    Type: String
  GWname:
    Default: "InvisinetGW1"
    Description: "Enter GW name"
    Type: String
  ImageId:
    Default: "ami-06900c261bccc61f0"
    Description: "Enter the AMI ID for the GW EC2 instance"
    Type: String
  InstanceType:
    Default: "t2.medium"
    Description: "Enter the instance type for the GW EC2 instance"
    Type: String
  ManagementSubnetCidr:
    Default: "10.0.10.0/24"
    Description: "Enter the CIDR block for the management subnet"
    Type: String
  UntrustedSubnetCidr:
    Default: "10.0.0.0/24"
    Description: "Enter the CIDR block for the untrusted subnet"
    Type: String
  TrustedSubnetCidr:
    Default: "10.0.20.0/24"
    Description: "Enter the CIDR block for the trusted subnet"
    Type: String

Override Default Parameters

You can override the default parameters passed using a JSON file by following the below given format. Notice that in the below example most of the parameters aren't included. Because you can include the defaults that need to be changed by ignoring others.

{
  "MyIP": "8.8.8.8/22",
  "VpcName": "InvisinetClientVPC"
}

Examples

# Using npx
# NOTE: `overrideParameterDefaults` is not mandatory if you don't override the default parameters
npx @invisinet/stack-creator region=us-east-x stackName=test-stack-1 accessKeyID=S0M3ENCRYTEDV4LU3 secretAccessKey=S3CR3TACC355K3YV4LU3H4SH overrideParameterDefaults=C://Users/DwayneJohnson/override-template.json;

Contributing

No Contributions Allowed. But You can fork 👍.

License

LICENSE