terraflex.yaml
terraflex.yaml
is the main config file terraflex looks at.
This file must be at the root of where terraflex
is being run at.
Tip
Checkout the examples section at Getting Started tab.
Models
ConfigFile
The configuration file for terraflex.
Attributes:
Name | Type | Description |
---|---|---|
version |
str
|
The version of the configuration file. |
storage_providers |
dict[str, StorageProviderConfig]
|
The configuration for the storage providers. |
transformers |
dict[str, TransformerConfig]
|
The configuration for the transformers. |
stacks |
dict[str, StackConfig]
|
The configuration for the stacks. |
Source code in terraflex/server/config.py
97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 |
|
StackConfig
Configuration for a terraform stack.
Attributes:
Name | Type | Description |
---|---|---|
state_storage |
StorageProviderUsageConfig
|
The storage provider configuration for the state file. |
transformers |
list[str]
|
The list of transformers to apply to the data. |
Source code in terraflex/server/config.py
85 86 87 88 89 90 91 92 93 94 |
|
TransformerConfig
Base Transformer configuration.
Each transformer defines it's own unique configuration parameters - and the parameters will be passed through to the transformer.
Attributes:
Name | Type | Description |
---|---|---|
type |
str
|
The type of the transformer. |
**kwargs |
str
|
Additional configuration for the transformer. |
Source code in terraflex/server/config.py
70 71 72 73 74 75 76 77 78 79 80 81 82 |
|
StorageProviderConfig
Data struct that contains the configuration for a storage provider.
Each storage provider defines it's own unique configuration parameters - and the parameters will be passed through to the storage provider.
Attributes:
Name | Type | Description |
---|---|---|
type |
str
|
storage provider type as declared in the entrypoint. |
**kwargs |
str
|
storage provider specific configuration parameters. |
Example
In this example, the local
storage provider has a folder
parameter that is required.
The storage provider will get a dict: {"folder": "/path/to/folder"}
as the configuration.
type: local
folder: /path/to/folder
Source code in terraflex/server/config.py
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
|
StorageProviderUsageConfig
Data struct that contains the parameters that link to a specific file in a given storage provider.
Each storage provider defines it's own unique usage parameters.
Please refer to your storage provider usage config for key specification.
Attributes:
Name | Type | Description |
---|---|---|
provider |
str
|
storage provider name defined in |
params |
Optional[dict[str, Any]]
|
storage provider specific usage parameters - each storage provider defines it's own params - and this dict will be processed and validated dynamically by each storage provider. |
Example
This is an example of a local
storage provider usage config:
provider: local
params:
path: ./path/to/item.txt
Source code in terraflex/server/config.py
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
|