Skip to content

chore: clean up comments, fix go.mod replace and cyclomatic complexity#83

Merged
l50 merged 2 commits into
mainfrom
chore/cleanup-comments-fix-hooks
Apr 7, 2026
Merged

chore: clean up comments, fix go.mod replace and cyclomatic complexity#83
l50 merged 2 commits into
mainfrom
chore/cleanup-comments-fix-hooks

Conversation

@l50
Copy link
Copy Markdown
Contributor

@l50 l50 commented Apr 7, 2026

Key Changes:

  • Introduced new ami command group for AMI image management (build, purge, list)
  • Added env command group for environment creation and listing
  • Updated Go dependencies to support new CLI features and AWS Image Builder
  • Improved terragrunt runner to use correct argument and env var conventions

Added:

  • AMI management CLI:
    • New ami command group with subcommands:
      • build: Build AMIs from warpgate templates, supports parallel builds,
        progress bars, and resource reuse
      • purge: Remove leftover EC2 Image Builder pipeline resources
      • list-resources: List pipeline resources created by warpgate
    • Template discovery, dynamic flag handling, and progress reporting for AMI builds
  • Environment management CLI:
    • New env command group with subcommands:
      • create: Scaffold new deployment environments with infra and config files
        (supports randomized variant config and force overwrite)
      • list: List available environments, regions, and config status
    • Automation of HCL file creation, infrastructure copying, and config generation
  • Dependency updates in go.mod and go.sum to support new AWS, warpgate,
    and related functionality

Changed:

  • Terragrunt runner logic:
    • Changed run-all execution to use terragrunt run --all for consistency with
      recent terragrunt versions
    • Updated environment variable for custom terraform binary from
      TERRAGRUNT_TFPATH to TG_TF_PATH
    • Removed redundant comments and simplified struct field documentation
  • Infrastructure AMI filters:
    • Refined additional_windows_ami_filters in test and staging deployments to
      match only timestamped AMIs, excluding older goad-dc-base-2016 images

Removed:

  • Outdated or redundant inline documentation and comments from
    internal/terragrunt/runner.go to streamline code and maintain clarity

**Added:**

- Introduced new `ami` CLI command for AMI image management, including subcommands
  for building, purging, and listing EC2 Image Builder pipeline resources
  (`cli/cmd/ami.go`)
- Added `env` CLI command for managing deployment environments, supporting
  creation (with variant config generation) and listing of environments
  (`cli/cmd/env_cmd.go`)

**Changed:**

- Updated `go.mod` and `go.sum` to include dependencies for warpgate v3,
  AWS Image Builder, and related tooling
- Upgraded various indirect dependencies to match requirements for AMI and
  variant config features
- Modified `terragrunt/runner.go` to:
  - Change run-all invocation to `terragrunt run --all` instead of `run-all`
  - Use `TG_TF_PATH` environment variable for Terraform binary override
  - Remove redundant or outdated comments for clarity
  - Improve argument handling and logging for consistency with new commands
@l50 l50 changed the title feat: add ami and env management CLI commands and update dependencies chore: clean up comments, fix go.mod replace and cyclomatic complexity Apr 7, 2026
**Changed:**

- Suppressed lint warnings by explicitly ignoring return values from
  `Close()` and `Setenv()` calls using blank identifiers
- Updated calls to `color.New(...).Fprintf` to ignore returned values,
  preventing unused result warnings
@l50 l50 merged commit e5cd5ee into main Apr 7, 2026
6 checks passed
@l50 l50 deleted the chore/cleanup-comments-fix-hooks branch April 7, 2026 03:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant