stackgen import
Usage
The stackgen import
command allows you to import infrastructure configuration from different sources
such as Terraform state files.
stackgen import [subcommand] [flags]
Common Flags
Flag | Type | Description |
---|---|---|
--appstack-id | string | Appstack ID to import into an existing appstack. This creates a new appstack version. |
--appstack-name | string | Appstack name to create if importing into a new appstack. It must be unique. |
-f , --file | string | Path to the source file (required) |
-h , --help | Help for import |
Subcommands
Here's an overview of the available subcommands:
state
Parses a Terraform state file (.tfstate) and imports the infrastructure configuration into a new or existing appStack. This subcommand automates the process of keeping your infrastructure in sync with your Terraform-managed resources by creating a new appStack or a new version of an existing one directly from the CLI. Ideal for CI/CD pipelines, it reduces manual work, ensures compliance, and supports seamless version control without needing to access the UI. Use this command to integrate Terraform-managed infrastructure into StackGen workflows efficiently.