-
Notifications
You must be signed in to change notification settings - Fork 0
Per‐repository configuration
Adam Chance edited this page Nov 29, 2024
·
1 revision
How Amaurot acts against a repository is defined in the amaurot.json
file at the repository root.
An example amaurot.json
file is provided below:
{
"workspaces": [
{
"name": "Sandpit",
"directory": "tofu",
"var_files": [
"environments/sandpit.tfvars"
]
}
]
}
In this example file there is a top-level workspaces
element which is an array of workspace
.
A workspace
is defined as follows:
-
name
: The name of the workspace, used in plan and apply comments -
directory
: The path to the OpenTofu configuration files, relative to the repository root -
var_files
: An array of var files to be passed to OpenTofu, relative to the repository root
There is no requirement for any of the fields to have unique values.
As workspaces
is an array, a single repository can contain multiple workspaces:
{
"workspaces": [
{
"name": "Sandpit",
"directory": "tofu",
"var_files": [
"environments/sandpit.tfvars"
]
},
{
"name": "Staging",
"directory": "tofu",
"var_files": [
"environments/staging.tfvars"
]
},
{
"name": "Production",
"directory": "tofu",
"var_files": [
"environments/production.tfvars"
]
}
]
}
Amaurot has no hard limit as to how many workspaces a single repository can contain.