download-iac
The stackgen appstack download-iac
command allows you to download Infrastructure as Code (IaC) files generated for an appStack. These files can be used for local development, deployment, or integration with CI/CD pipelines.
Usage
stackgen appstack download-iac [appstack-uuid] [flags]
Flags
Flag | Type | Description |
---|---|---|
--appstack-id | string | UUID of appstack to download, use stackgen appstack show to get UUIDs of appstack. |
--appstack-name | string | Name of the appstack to download. |
--destination | string | Destination directory for zipped IaC Gen code, will append .zip if not present (default /home/user ). |
--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 ). | |
--version int32 | Version of the appstack to download. |
Examples
Download IaC by appStack UUID
stackgen appstack download-iac --appstack-id 12345-uuid --destination ./my-iac-files.zip
This command will:
- Download the IaC files for the specified appStack UUID,
- 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 12345-uuid --version 2 --destination ./v2-deployment.zip
This command will:
- Download the IaC files for Version 2 of the appStack with the specified UUID,
- Save the files to
./v2-deployment.zip
.
Download the latest version of an appStack
stackgen appstack download-iac --appstack-id 12345-uuid --latest --destination ./latest-deployment.zip
This command will:
- Download the IaC files for the latest version of the appStack with the specified UUID,
- 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, the files will be saved to the default location (
/home/user
). - Use
stackgen appstack show
to list available appStacks and their UUIDs.