Skip to main content

init

Command used to initialize a new stackql-deploy project structure.


Syntax

stackql-deploy init STACK_DIR [FLAGS]

Arguments

ArgumentDescriptionExample
STACK_DIRThe directory (and name) for the project to be createdmy-stack

Optional Flags

FlagDescriptionExample
--providerSpecify a cloud provider to start your project with. Supported values: aws, azure, google. Default is azure.--provider aws

Description

The init command sets up a new project structure for a stackql-deploy stack. It creates the necessary directories and populates them with template files tailored to the specified cloud provider.

  • If no provider is specified, the default provider is azure.
  • The command ensures that the project name is converted to a lower-case, hyphen-separated format.
  • The command also generates provider-specific example templates within the resources directory.

Supported providers include:

  • AWS: Creates a sample VPC resource.
  • Azure: Creates a sample Resource Group.
  • Google Cloud: Creates a sample VPC resource.

If a provider is not supported, the command will default to azure and notify the user.

Examples

Initialize a new project with default provider

This command initializes a new project with the name my-stack using the default provider (azure):

stackql-deploy init my-stack
tip

init will create your project structure including the stack directory including the stackql_manifest.yml and README.md files, and a resources directory with a sample StackQL resource query file (.iql file). You can modify a project to use whichever providers are available in the StackQL Provider Registry.

Initialize a new project with the aws provider

Initialize a new project with the name my-aws-stack using aws as the provider:

stackql-deploy init my-aws-stack --provider aws