atmos
atmos copied to clipboard
Schema validation: For unrecognized keys, show warnings or throw an error
Have a question? Please checkout our Slack Community or visit our Slack Archive.
Describe the Feature
To the untrained eye, this may look good
components:
terraform:
eks:
enabled: true
availability_zones: [ "us-east-2a" ]
However, atmos will gladly use this config and pass it along to terraform but will omit the vars because the vars key is not used above.
To prevent the above, atmos could look for keys like settings, backend, and vars after components.terraform.xyz. Since enabled doesn't match any of those, it would be nice if atmos threw an error or showed a warning to describe the unrecognized inputs.
Describe Ideal Solution
Warning: unrecognized input `enabled` in `components.terraform.eks` in `stacks/catalog/eks.yaml`. Current location allows for the following keys: `settings`, `backend`, or `vars`.
or
Error: unrecognized input `enabled` in `components.terraform.eks` in `stacks/catalog/eks.yaml`. Current location allows for the following keys: `settings`, `backend`, or `vars`.