Creating a Repo
At its core, Autoschematic uses Git as part of its state model. This means that everything you do with Autoschematic will take place within a Git repository. You'll probably want to create a dedicated repository for each Autoschematic project. All the infrastructure that runs this site is provisioned with Autoschematic! You can check out its dedicated repo here:
https://github.com/autoschematic-sh/autoschematic.sh-core-infra
You should see a file, autoschematic.ron
, created in the root of your new repo. This is the main Autoschematic configuration file.
It looks something like this. We've added some explanatory comments.
In Autoschematic, resources and configuration files are divided into prefixes. A prefix is kind of like a Resource Group in Azure, or a Namespace in Kubernetes. You might use prefixes to separate different teams, offices, apps, accounts, or any other division you desire.
A prefix just corresponds to a folder at the root of your repo. Nested folders can be prefixes too, but care should be taken to ensure that a prefix isn't created inside another prefix.
Here are some ways you could arrange your prefixes:
Or perhaps:
The choice is yours. You probably want to just start with one prefix, like this:
autoschematic.ron
There are only a few rules about prefixes that Autoschematic will enforce:
- A prefix can never contain another prefix
- A prefix must always exist under the root of the git repository, and can never use relative path components like
.././
- A prefix should always map to a single folder, and never to a symlink or similar
You might notice that we have an empty list of "connectors". In the next section, we'll explain just what Connectors are, and how you can add and install them. Note: if you're not already using the vscode extension, it's highly recommended! It includes syntax highlighting and language server support for all of the Autoschematic core configuration files, as well as for most connector resource files.