Manage appStacks
The stackgen appstack
command is used to manage appStacks for complex infrastructure code generation. This command provides several subcommands for creating, modifying, and managing appStacks throughout their lifecycle.
Usage
stackgen appstack [subcommand] [flags]
Common Flags
Flag | Description |
---|---|
-h , --help | Help for appStack |
--local-analysis | Run analysis locally instead of using StackGen server |
--scm-api | SCM API against which scm commands will be executed (default "https://api.github.com/") |
--scm-type | SCM Type. Valid values are github/gitlab/bitbucket/gitea (default "github") |
Subcommands
Here's an overview of the available subcommands:
create
Creates a new appStack based on specified parameters. This subcommand allows you to define cloud provider, components, scan strategies, and deployment options for your application. It analyzes your application's requirements and generates the appropriate infrastructure components needed to run your application. Use this command when you want to build a new infrastructure setup from your application code.
create-version
Creates a new version of an existing appStack while maintaining the same core configuration. This subcommand is useful for tracking changes in your infrastructure over time, implementing improvements, or adapting to application updates. Each version maintains the original enforcement policies but allows you to evolve your infrastructure while keeping a history of previous versions.
delete
Removes an appStack from the system. This subcommand allows you to clean up resources and remove appStacks that are no longer needed. It includes safeguards to prevent accidental deletion, such as confirmation prompts that can be bypassed with the force flag when used in automation scenarios.
download-iac
Downloads the Infrastructure as Code (IaC) files generated for an appStack. This subcommand exports the infrastructure definitions as deployable code files, which can be used with tools like Terraform to provision actual cloud resources. You can specify the version and deployment type to control exactly what gets exported.
show
Displays information about appStacks in your account. This subcommand provides visibility into your appStacks, their versions, and associated metadata. You can filter the list by name or UUID to find specific appStacks. This command is frequently used to retrieve the UUID needed for other commands like download-iac, create-version, or delete.
status
Checks the current status of an appStack. This subcommand allows you to monitor the processing state of an appStack, verify if it's ready for use, and identify any issues that need to be addressed. It provides details about the analysis progress, validation results, required actions, and compliance with defined policies.