diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
deleted file mode 100644
index 3945246..0000000
--- a/.pre-commit-config.yaml
+++ /dev/null
@@ -1,7 +0,0 @@
-# Prerequisites:
-# brew install pre-commit terraform-docs
-repos:
- - repo: https://github.com/antonbabenko/pre-commit-terraform
- rev: v1.88.0
- hooks:
- - id: terraform_docs
diff --git a/.terraform-docs.yml b/.terraform-docs.yml
new file mode 100644
index 0000000..48fe47d
--- /dev/null
+++ b/.terraform-docs.yml
@@ -0,0 +1,14 @@
+formatter: markdown table
+
+recursive:
+ enabled: false
+ path: modules
+ include-main: true
+
+output:
+ file: README.md
+ mode: inject
+ template: |-
+
+ {{ .Content }}
+
diff --git a/.trunk/trunk.yaml b/.trunk/trunk.yaml
index 7860320..90147aa 100644
--- a/.trunk/trunk.yaml
+++ b/.trunk/trunk.yaml
@@ -2,7 +2,7 @@
# To learn more about the format of this file, see https://docs.trunk.io/reference/trunk-yaml
version: 0.1
cli:
- version: 1.22.9
+ version: 1.22.8
# Trunk provides extensibility via plugins. (https://docs.trunk.io/plugins)
plugins:
sources:
@@ -39,6 +39,7 @@ lint:
- CHANGELOG.md
actions:
enabled:
+ - terraform-docs
- trunk-announce
- trunk-check-pre-push
- trunk-fmt-pre-commit
diff --git a/README.md b/README.md
index 7292aed..07b0f75 100644
--- a/README.md
+++ b/README.md
@@ -223,94 +223,102 @@ automation_settings:
This is to support easy local and outside-spacelift operations. Keeping variable values in a `tfvars` file per workspace allows you to simply pass that file to the relevant CLI command locally via the `-var-file` option so that you don't need to provide values individually. e.g. `tofu plan -var-file=tfvars/dev.tfvars`
-
-
+
+
+
## Requirements
-| Name | Version |
-| ------------------------------------------------------------------------ | ------- |
-| [terraform](#requirement_terraform) | >= 1.9 |
-| [spacelift](#requirement_spacelift) | >= 1.14 |
+| Name | Version |
+|------|---------|
+| [terraform](#requirement\_terraform) | >= 1.9 |
+| [jsonschema](#requirement\_jsonschema) | >= 0.2.1 |
+| [spacelift](#requirement\_spacelift) | >= 1.14 |
## Providers
-| Name | Version |
-| ------------------------------------------------------------------ | ------- |
-| [spacelift](#provider_spacelift) | 1.19.1 |
+| Name | Version |
+|------|---------|
+| [jsonschema](#provider\_jsonschema) | 0.2.1 |
+| [spacelift](#provider\_spacelift) | 1.19.1 |
## Modules
-| Name | Source | Version |
-| ----------------------------------------------- | ----------------------------------------- | ------- |
-| [deep](#module_deep) | cloudposse/config/yaml//modules/deepmerge | 1.0.2 |
+| Name | Source | Version |
+|------|--------|---------|
+| [deep](#module\_deep) | cloudposse/config/yaml//modules/deepmerge | 1.0.2 |
## Resources
-| Name | Type |
-| --------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- |
+| Name | Type |
+|------|------|
| [spacelift_aws_integration_attachment.default](https://registry.terraform.io/providers/spacelift-io/spacelift/latest/docs/resources/aws_integration_attachment) | resource |
-| [spacelift_drift_detection.default](https://registry.terraform.io/providers/spacelift-io/spacelift/latest/docs/resources/drift_detection) | resource |
-| [spacelift_stack.default](https://registry.terraform.io/providers/spacelift-io/spacelift/latest/docs/resources/stack) | resource |
-| [spacelift_stack_destructor.default](https://registry.terraform.io/providers/spacelift-io/spacelift/latest/docs/resources/stack_destructor) | resource |
+| [spacelift_drift_detection.default](https://registry.terraform.io/providers/spacelift-io/spacelift/latest/docs/resources/drift_detection) | resource |
+| [spacelift_stack.default](https://registry.terraform.io/providers/spacelift-io/spacelift/latest/docs/resources/stack) | resource |
+| [spacelift_stack_destructor.default](https://registry.terraform.io/providers/spacelift-io/spacelift/latest/docs/resources/stack_destructor) | resource |
+| [jsonschema_validator.runtime_overrides](https://registry.terraform.io/providers/bpedman/jsonschema/latest/docs/data-sources/validator) | data source |
+| [spacelift_spaces.all](https://registry.terraform.io/providers/spacelift-io/spacelift/latest/docs/data-sources/spaces) | data source |
## Inputs
-| Name | Description | Type | Default | Required |
-| --------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | :------: |
-| [additional_project_globs](#input_additional_project_globs) | Project globs is an optional list of paths to track stack changes of outside of the project root. Push policies are another alternative to track changes in additional paths. | `set(string)` | `[]` | no |
-| [administrative](#input_administrative) | Flag to mark the stack as administrative | `bool` | `false` | no |
-| [after_apply](#input_after_apply) | List of after-apply scripts | `list(string)` | `[]` | no |
-| [after_destroy](#input_after_destroy) | List of after-destroy scripts | `list(string)` | `[]` | no |
-| [after_init](#input_after_init) | List of after-init scripts | `list(string)` | `[]` | no |
-| [after_perform](#input_after_perform) | List of after-perform scripts | `list(string)` | `[]` | no |
-| [after_plan](#input_after_plan) | List of after-plan scripts | `list(string)` | `[]` | no |
-| [all_root_modules_enabled](#input_all_root_modules_enabled) | When set to true, all subdirectories in root_modules_path will be treated as root modules. | `bool` | `false` | no |
-| [autodeploy](#input_autodeploy) | Flag to enable/disable automatic deployment of the stack | `bool` | `true` | no |
-| [autoretry](#input_autoretry) | Flag to enable/disable automatic retry of the stack | `bool` | `false` | no |
-| [aws_integration_attachment_read](#input_aws_integration_attachment_read) | Indicates whether this attachment is used for read operations. | `bool` | `true` | no |
-| [aws_integration_attachment_write](#input_aws_integration_attachment_write) | Indicates whether this attachment is used for write operations. | `bool` | `true` | no |
-| [aws_integration_enabled](#input_aws_integration_enabled) | Indicates whether the AWS integration is enabled. | `bool` | `false` | no |
-| [aws_integration_id](#input_aws_integration_id) | ID of the AWS integration to attach. | `string` | `null` | no |
-| [before_apply](#input_before_apply) | List of before-apply scripts | `list(string)` | `[]` | no |
-| [before_destroy](#input_before_destroy) | List of before-destroy scripts | `list(string)` | `[]` | no |
-| [before_init](#input_before_init) | List of before-init scripts | `list(string)` | `[]` | no |
-| [before_perform](#input_before_perform) | List of before-perform scripts | `list(string)` | `[]` | no |
-| [before_plan](#input_before_plan) | List of before-plan scripts | `list(string)` | `[]` | no |
-| [branch](#input_branch) | Specify which branch to use within the infrastructure repository. | `string` | `"main"` | no |
-| [common_config_file](#input_common_config_file) | Name of the common configuration file for the stack across a root module. | `string` | `"common.yaml"` | no |
-| [default_tf_workspace_enabled](#input_default_tf_workspace_enabled) | Enables the use of `default` Terraform workspace instead of managing multiple workspaces within a root module.
NOTE: We encourage the use of Terraform workspaces to manage multiple environments.
However, you will want to disable this behavior if you're utilizing different backends for each instance
of your root modules (we call this "Dynamic Backends"). | `bool` | `false` | no |
-| [description](#input_description) | A description for the created Stacks. This is a template string that will be rendered with the final config object for the stack.
See the main.tf for full internals of that object and the documentation on templatestring for usage.
https://opentofu.org/docs/language/functions/templatestring/ | `string` | `"Root Module: ${root_module}\nProject Root: ${project_root}\nWorkspace: ${terraform_workspace}\nManaged by spacelift-automation Terraform root module."` | no |
-| [destructor_enabled](#input_destructor_enabled) | Flag to enable/disable the destructor for the Stack. | `bool` | `false` | no |
-| [drift_detection_enabled](#input_drift_detection_enabled) | Flag to enable/disable Drift Detection configuration for a Stack. | `bool` | `false` | no |
-| [drift_detection_ignore_state](#input_drift_detection_ignore_state) | Controls whether drift detection should be performed on a stack
in any final state instead of just 'Finished'. | `bool` | `false` | no |
-| [drift_detection_reconcile](#input_drift_detection_reconcile) | Flag to enable/disable automatic reconciliation of drifts. | `bool` | `false` | no |
-| [drift_detection_schedule](#input_drift_detection_schedule) | The schedule for drift detection. | `list(string)` |
[| no | -| [drift_detection_timezone](#input_drift_detection_timezone) | The timezone for drift detection. | `string` | `"UTC"` | no | -| [enable_local_preview](#input_enable_local_preview) | Indicates whether local preview runs can be triggered on this Stack. | `bool` | `false` | no | -| [enable_well_known_secret_masking](#input_enable_well_known_secret_masking) | Indicates whether well-known secret masking is enabled. | `bool` | `true` | no | -| [enabled_root_modules](#input_enabled_root_modules) | List of root modules where to look for stack config files.
"0 4 * * *"
]
object({
namespace = string
id = optional(string)
}) | `null` | no |
-| [labels](#input_labels) | List of labels to apply to the stacks. | `list(string)` | `[]` | no |
-| [manage_state](#input_manage_state) | Determines if Spacelift should manage state for this stack. | `bool` | `false` | no |
-| [protect_from_deletion](#input_protect_from_deletion) | Protect this stack from accidental deletion. If set, attempts to delete this stack will fail. | `bool` | `false` | no |
-| [repository](#input_repository) | The name of your infrastructure repo | `string` | n/a | yes |
-| [root_module_structure](#input_root_module_structure) | The root module structure of the Stacks that you're reading in. See README for full details.[| no | +| [drift\_detection\_timezone](#input\_drift\_detection\_timezone) | The timezone for drift detection. | `string` | `"UTC"` | no | +| [enable\_local\_preview](#input\_enable\_local\_preview) | Indicates whether local preview runs can be triggered on this Stack. | `bool` | `false` | no | +| [enable\_well\_known\_secret\_masking](#input\_enable\_well\_known\_secret\_masking) | Indicates whether well-known secret masking is enabled. | `bool` | `true` | no | +| [enabled\_root\_modules](#input\_enabled\_root\_modules) | List of root modules where to look for stack config files.
"0 4 * * *"
]
object({
namespace = string
id = optional(string)
}) | `null` | no |
+| [labels](#input\_labels) | List of labels to apply to the stacks. | `list(string)` | `[]` | no |
+| [manage\_state](#input\_manage\_state) | Determines if Spacelift should manage state for this stack. | `bool` | `false` | no |
+| [protect\_from\_deletion](#input\_protect\_from\_deletion) | Protect this stack from accidental deletion. If set, attempts to delete this stack will fail. | `bool` | `false` | no |
+| [repository](#input\_repository) | The name of your infrastructure repo | `string` | n/a | yes |
+| [root\_module\_structure](#input\_root\_module\_structure) | The root module structure of the Stacks that you're reading in. See README for full details.