stackctl

[ library, mit, program, unclassified ] [ Propose Tags ] [ Report a vulnerability ]

Modules

[Last Documentation]

  • Stackctl
    • Stackctl.AWS
      • Stackctl.AWS.CloudFormation
      • Stackctl.AWS.Core
      • Stackctl.AWS.EC2
      • Stackctl.AWS.Lambda
      • Stackctl.AWS.Orphans
      • Stackctl.AWS.STS
      • Stackctl.AWS.Scope
    • Stackctl.Action
    • Stackctl.AutoSSO
    • Stackctl.CLI
    • Stackctl.CancelHandler
    • Stackctl.ColorOption
    • Stackctl.Colors
    • Stackctl.Commands
    • Stackctl.Config
      • Stackctl.Config.RequiredVersion
    • Stackctl.DirectoryOption
    • Stackctl.FilterOption
    • Stackctl.OneOrListOf
    • Stackctl.Options
    • Stackctl.ParameterOption
    • Stackctl.Prelude
    • Stackctl.Prompt
    • Stackctl.RemovedStack
    • Stackctl.Sort
    • Spec
      • Stackctl.Spec.Capture
      • Stackctl.Spec.Cat
      • Stackctl.Spec.Changes
        • Stackctl.Spec.Changes.Format
      • Stackctl.Spec.Deploy
      • Stackctl.Spec.Discover
      • Stackctl.Spec.Generate
      • Stackctl.Spec.List
    • Stackctl.StackDescription
    • Stackctl.StackSpec
    • Stackctl.StackSpecPath
    • Stackctl.StackSpecYaml
    • Stackctl.Subcommand
    • Stackctl.TagOption
    • Stackctl.VerboseOption
    • Stackctl.Version

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 1.1.0.0, 1.1.0.1, 1.1.0.2, 1.1.0.3, 1.1.0.4, 1.1.0.5, 1.1.1.0, 1.1.1.1, 1.1.2.0, 1.1.2.1, 1.1.2.2, 1.1.3.0, 1.1.3.1, 1.1.4.0, 1.2.0.0, 1.3.0.0, 1.3.0.1, 1.3.0.2, 1.4.0.0, 1.4.0.1, 1.4.2.0, 1.4.2.1, 1.4.2.2, 1.4.3.0, 1.4.4.0, 1.5.0.0, 1.5.0.1, 1.6.0.0, 1.6.1.0, 1.6.1.1, 1.6.1.2, 1.7.0.0, 1.7.1.0, 1.7.2.0
Change log CHANGELOG.md
Dependencies aeson (>=2.0.3.0), aeson-casing (>=0.2.0.0), aeson-pretty (>=0.8.9), amazonka (>=2.0), amazonka-cloudformation (>=2.0), amazonka-core (>=2.0), amazonka-ec2 (>=2.0), amazonka-lambda (>=2.0), amazonka-mtl (>=0.1.1.0), amazonka-sso (>=2.0), amazonka-sts (>=2.0), base (>=4 && <5), Blammo (>=1.1.2.3), bytestring (>=0.11.3.1), cfn-flip (>=0.1.0.3), conduit (>=1.3.4.3), containers (>=0.6.5.1), envparse (>=0.5.0), errors (>=2.3.0), exceptions (>=0.10.4), extra (>=1.7.12), filepath (>=1.4.2.2), Glob (>=0.10.2), lens (>=5.1.1), lens-aeson (>=1.2.2), monad-logger (>=0.3.37), mtl (>=2.2.2), optparse-applicative (>=0.17.0.0), QuickCheck (>=2.14.2), resourcet (>=1.2.6), rio (>=0.1.22.0), semigroups (>=0.20), stackctl, text (>=1.2.5.0), text-metrics (>=0.3.2), time (>=1.11.1.1), transformers (>=0.5.6.2), typed-process (>=0.2.10.1), unix (>=2.7.2.2), unliftio (>=0.2.25.0), unordered-containers (>=0.2.19.1), uuid (>=1.3.15), yaml (>=0.11.8.0) [details]
License MIT
Copyright 2022 Renaissance Learning Inc
Author Freckle Engineering
Maintainer freckle-engineering@renaissance.com
Home page https://github.com/freckle/stackctl#readme
Bug tracker https://github.com/freckle/stackctl/issues
Source repo head: git clone https://github.com/freckle/stackctl
Uploaded by PatrickBrisbin at 2024-09-24T14:28:09Z
Distributions
Executables stackctl
Downloads 1372 total (10 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs not available [build log]
All reported builds failed as of 2024-09-24 [all 2 reports]

Readme for stackctl-1.7.2.0

[back to package description]

Stackctl

Hackage CI

Manage CloudFormation Stacks through specifications.

About

stackctl is a command-line tool for working with Stack Specifications. A Stack Specification is a file-system format for describing deployed (or to-be-deployed) CloudFormation Stacks including the Template, Parameters, and Tags. stackctl can be used to pretty-print, diff, and deploy these specifications.

This project also contains a Haskell library for doing the same.

Install

Pre-requisites

  • Have ~/.local/bin on your $PATH
  • Have ~/.local/share/man on your $MANPATH (for documentation)
  • If on OSX, brew install coreutils (i.e. have ginstall available)
  • If on OSX, brew install jq

Scripted

curl -L https://raw.githubusercontent.com/freckle/stackctl/main/install | bash

[!NOTE] Some in the community have expressed concerns about the security of so-called "curl-sh" installations. We think the argument has been pretty well debunked, but feel free to use the manual steps instead.

Manual

Go to the latest release and download the .tar.gz asset appropriate for your OS. Navigate to the directory containing the downloaded file and run:

tar xvf stackctl-*.tar.gz
cd stackctl

User installation:

make install PREFIX="$HOME/.local"

Global installation

sudo make install

Usage

Once installed, see:

  • stackctl --help,
  • stackctl <command> --help,
  • man 1 stackctl, or
  • man 1 stackctl <command>

The man pages are also available online, but contain documentation as of main, and not your installed version.

Comparison to AWS CloudFormation Git Sync

AWS CloudFormation Git Sync was recently released by AWS. It allows you to link a repository on GitHub to a CloudFormation Stack. The repository contains a "deployment file" that defines a template-file-path, parameters, and tags -- effectively, a Stack Specification.

When AWS notices updates to the deployment or template file land on a defined branch, it updates the configured Stack accordingly, emitting events to SNS as it does.

This is great for simple use-cases, and we fully expect they'll improve and extend it such that it obviates Stackctl one day. In the meantime, there are currently the following limitations when compared to Stackctl:

  1. A repository can only target a single account and region
  2. There is no changeset flow amenable to previewing changes via PRs. You update the file(s) on main and it syncs, that's it. If you're using a PR, you have only linting and human review as possible pre-deployment steps.
  3. There is no way to specify description, capabilities, or dependencies
  4. As of 12/23, there seemed to be some bugs, and the setup installs a managed event bridge that "phones home", sending events about your updates to some other AWS account (source)

Relationship to CloudGenesis

CloudGenesis is a project that also takes a directory of Stack Specifications and deploys them when changed. Its on-disk format inspired ours and, in fact, directories built for CloudGenesis can be managed by stackctl (not necessarily the other way around).

The key differences are:

  • CloudGenesis supplies AWS CodeBuild tooling for handling changes to your GitOps repository; Stackctl expects you to implement a GitHub Action that installs and executes stackctl commands as appropriate

    This makes Stackctl better if you need or want to also run the same tooling in a local context, but it makes CloudGenesis better if you need or want this activity to remain within the boundaries of your AWS VPC.

  • CloudGenesis reacts to file-change events in S3, which only happens when you synchronize from main; Stackctl can run on any branch and easily be scoped to files changed in the PR or push.

    This enables Stackctl features like commenting with ChangeSet details on PRs, which are not possible in CloudGenesis as it's currently implemented.

  • Stackctl adds the Depends key, for ordering multi-Stack processing


CHANGELOG | LICENSE