GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - stackql/stackql-deploy-rs: Statefile-less IaC framework for declarative cloud resource management using StackQL written in Rust

BranchesTags
Open more actions menu

Latest commit

 

History

182 Commits
182 Commits

Folders and files

NameName
Last commit message
Last commit date
.cargo
.cargo
 
 
.github
.github
 
 
ci-scripts
ci-scripts
 
 
docs
docs
 
 
examples
examples
 
 
get-app
get-app
 
 
scripts
scripts
 
 
src
src
 
 
template-hub
template-hub
 
 
tests
tests
 
 
website
website
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
AGENTS.md
AGENTS.md
 
 
CHANGELOG.md
CHANGELOG.md
 
 
CLAUDE.md
CLAUDE.md
 
 
CODE_OF_CONDUCT.md
CODE_OF_CONDUCT.md
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
Cargo.lock
Cargo.lock
 
 
Cargo.toml
Cargo.toml
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
SECURITY.md
SECURITY.md
 
 
build.rs
build.rs
 
 
internal-stackql-deploy-build-install.sh
internal-stackql-deploy-build-install.sh
 
 
public-stackql-deploy-install.sh
public-stackql-deploy-install.sh
 
 
sync.sh
sync.sh
 
 
test-get-app.ps1
test-get-app.ps1
 
 
test-get-app.sh
test-get-app.sh
 
 

Repository files navigation

stackql-deploy logo

Model-driven resource provisioning and deployment framework using StackQL.

Crates.io Crates.io Downloads License: MIT Platform Docs


stackql-deploy is a multi-cloud Infrastructure-as-Code framework inspired by dbt, built on top of StackQL. Define cloud resources as SQL-like models, then build, test, and teardown across any environment — no state files required.

This is the Rust rewrite (v2.x). The original Python package (v1.x, last release 1.9.4) is now archived — see its changelog for prior history.

Install

Via cargo:

cargo install stackql-deploy

Direct binary download (Linux, macOS, Windows — x86_64 and ARM64):

Download the latest release from the GitHub Releases page, extract, and place the binary on your PATH.

How it works

A stackql-deploy project is a directory with a manifest and StackQL query files:

example_stack/
├── stackql_manifest.yml
└── resources/
    └── monitor_resource_group.iql

The manifest declares providers, global variables, and resources:

version: 1
name: example_stack
description: activity monitor stack
providers:
  - azure
globals:
  - name: subscription_id
    value: "{{ vars.AZURE_SUBSCRIPTION_ID }}"
  - name: location
    value: eastus
resources:
  - name: monitor_resource_group
    description: azure resource group
    props:
      - name: resource_group_name
        value: "activity-monitor-{{ globals.stack_env }}"

Use stackql-deploy init example_stack --provider azure to scaffold a new project.

Resource .iql files define mutation and check queries using SQL anchors:

/*+ create */
INSERT INTO azure.resources.resource_groups(
  resourceGroupName, subscriptionId, location
)
SELECT '{{ resource_group_name }}', '{{ subscription_id }}', '{{ location }}'

/*+ update */
UPDATE azure.resources.resource_groups
SET location = '{{ location }}'
WHERE resourceGroupName = '{{ resource_group_name }}'
  AND subscriptionId = '{{ subscription_id }}'

/*+ delete */
DELETE FROM azure.resources.resource_groups
WHERE resourceGroupName = '{{ resource_group_name }}'
  AND subscriptionId = '{{ subscription_id }}'

/*+ exists */
SELECT COUNT(*) as count FROM azure.resources.resource_groups
WHERE subscriptionId = '{{ subscription_id }}'
  AND resourceGroupName = '{{ resource_group_name }}'

/*+ statecheck, retries=5, retry_delay=5 */
SELECT COUNT(*) as count FROM azure.resources.resource_groups
WHERE subscriptionId = '{{ subscription_id }}'
  AND resourceGroupName = '{{ resource_group_name }}'
  AND location = '{{ location }}'
  AND JSON_EXTRACT(properties, '$.provisioningState') = 'Succeeded'

/*+ exports */
SELECT resourceGroupName, location
FROM azure.resources.resource_groups
WHERE subscriptionId = '{{ subscription_id }}'
  AND resourceGroupName = '{{ resource_group_name }}'

Query execution strategy

For each resource, stackql-deploy selects an execution path based on which anchors are defined in the .iql file:

graph TB
    A[resource] --> B{has\ncreateorupdate?}
    B -- Yes --> C[run createorupdate\nskip all checks]
    B -- No --> D{has statecheck?}

    D -- Yes --> E[exists check]
    E --> F{exists?}
    F -- No --> G[create]
    F -- Yes --> H[statecheck]
    H --> I{correct\nstate?}
    I -- Yes --> J[✅ up to date]
    I -- No --> K[update]
    G & K --> L[post-deploy exports]

    D -- No --> M{has exports?}
    M -- Yes --> N[⚡ try exports first]
    N --> O{returned\ndata?}
    O -- Yes --> P[✅ validated +\nexports captured\nin 1 query]
    O -- No --> Q[exists check]
    Q --> R{exists?}
    R -- No --> S[create]
    R -- Yes --> S2[update]
    S & S2 --> T[exports]
    M -- No --> U[exists check\ncreate or update]
Loading

Tip: when there is no statecheck, an exports query that selects from the live resource serves as both a validation and data-extraction step in a single API call.

Usage

# Preview what would change (no mutations)
stackql-deploy build example_stack dev --dry-run

# Deploy
stackql-deploy build example_stack dev -e AZURE_SUBSCRIPTION_ID=00000000-0000-0000-0000-000000000000

# Run checks only
stackql-deploy test example_stack dev

# Deprovision (reverse order)
stackql-deploy teardown example_stack dev

Common flags:

Flag Description
--dry-run Print queries, make no changes
--on-failure=rollback rollback, ignore, or error (default)
--env-file=.env Load environment variables from a file
-e KEY=value Pass individual environment variables
--log-level DEBUG, INFO, WARNING, ERROR, CRITICAL
--show-queries Print rendered SQL before execution

Show environment and provider info:

stackql-deploy info

Full command reference:

stackql-deploy --help

Documentation

Full documentation — manifest reference, query anchors, template filters, provider examples is at stackql-deploy.io/docs.

Contributing

Contributions are welcome. Please read CONTRIBUTING.md and the Code of Conduct first. AGENTS.md describes the repository layout, the build and test commands, and the conventions the project follows.

License

MIT - see LICENSE.

About

Statefile-less IaC framework for declarative cloud resource management using StackQL written in Rust

Topics

iacrust-langstackqlterraform-alternative

Resources

Readme
MIT license

Code of conduct

Code of conduct

Contributing

Contributing

Security policy

Security policy
Activity
Custom properties

Stars

1 star

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.