Managing Snowflake with Infrastructure-as-Code
In practice, Snowflake environments experience state-drift frequently. Warehouses get tuned, schemas evolve, and admins still need the Snowsight console from time to time.
Autoschematic's push-pull model is a great fit here: you can import your existing Snowflake resources, manage them as code, and pull remote state back into Git to resolve it.
Add the Snowflake connector
Starting from a blank Git repo, create the main autoschematic.ron config file:
Since this is a Pip(...) connector, autoschematic install will really do
...under the hood. Other connectors might be installed with Cargo, for example.
Snowflake authentication
The Snowflake connector will seamlessly work with your existing Snowflake CLI configuration, such as config.toml or connections.toml.
Import existing Snowflake resources
The easiest way to get started is to import your real Snowflake state before you hand-write anything.
After import, you should see a repo layout along these lines:
Make a change locally
Once you edit a file, you'll need to stage it in git with git add before running Autoschematic:
If you delete a staged Snowflake file, the connector will plan a corresponding DROP ... operation for that object, for example.
Create new users and roles
autoschematic create can scaffold these RBAC resources for you:
The Snowflake connector also exposes snowflake/users/[name].ron.

