download-iac
The stackgen appstack download-iac command downloads Infrastructure as Code (IaC) files generated for an appStack. Use them for local development, deployment, or CI/CD.
Usage
stackgen appstack download-iac [appstack-id] [flags]
Flags
| Flag | Type | Description |
|---|---|---|
--appstack-id | string | AppStack id to download. Use stackgen appstack list, show, or ls to look it up (older wording may call this a uuid). |
--appstack-name | string | Name of the appStack to download. |
--destination | string | Destination directory for zipped IaC. Appends .zip if not present. If omitted, the CLI picks a default path on your machine. |
--env-profile | string | Name of the environment profile to download. |
-h, --help | Help for download-iac. | |
--latest | Download IaC of the latest version of the specified appStack (default false). | |
--unpack | Unpack the downloaded zip file (default false). | |
--version | int32 | Version of the appStack to download. |
Examples
Download IaC by appStack ID
stackgen appstack download-iac --appstack-id app-1234abcd5678efgh --destination ./my-iac-files.zip
This command will:
- Download the IaC files for the specified appStack ID,
- Save the files to
./my-iac-files.zip.
Download IaC by appStack name
stackgen appstack download-iac --appstack-name my-production-app --destination ~/projects/infrastructure.zip
This command will:
- Download the IaC files for the appStack named
my-production-app, - Save the files to
~/projects/infrastructure.zip.
Download a specific version of an appStack
stackgen appstack download-iac --appstack-id app-1234abcd5678efgh --version 2 --destination ./v2-deployment.zip
This command will:
- Download the IaC files for version 2 of the appStack with the specified id,
- Save the files to
./v2-deployment.zip.
Download the latest version of an appStack
stackgen appstack download-iac --appstack-id app-1234abcd5678efgh --latest --destination ./latest-deployment.zip
This command will:
- Download the IaC files for the latest version of the appStack with the specified ID,
- Save the files to
./latest-deployment.zip.
note
- The downloaded file is a ZIP archive containing all necessary terraform files.
- You may need to extract and configure provider credentials before applying the IaC.
- If no destination is specified, files go to the CLI default path on your machine.
- Use
stackgen appstack list,show, orlsto list appStacks and ids.