Skip to main content
⏳ Estimated read time: 2 min read

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

FlagDescription
--appstack-name stringName of the appstack to download
--destination stringDestination directory for zipped IaC Gen code, will append .zip if not present (default "/home/user")
-h, --helpHelp for download-iac
--latestDownload IaC of the latest version of the specified appstack (default: false)
--uuid stringUUID of appstack to download, use 'stackgen appstack show' to get uuids of appstacks
--version int32Version of the appstack to download

Examples

Download IaC by appStack UUID

stackgen appstack download-iac 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 --uuid 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 --uuid 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