Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enforce required fields #135

Open
nitrocode opened this issue Jun 6, 2022 · 0 comments
Open

Enforce required fields #135

nitrocode opened this issue Jun 6, 2022 · 0 comments

Comments

@nitrocode
Copy link
Member

nitrocode commented Jun 6, 2022

Have a question? Please checkout our Slack Community or visit our Slack Archive.

Slack Community

Describe the Feature

It would be nice to enforce a required field. Sometimes we omit the name field because we're going through a transition where we are moving name from default.auto.tfvars to a yaml catalog and sometimes this field is omitted by mistake.

By enforcing required fields on the null label we can ensure that expected fields are always in place e.g. so we do not have a case where we accidentally create a resource such as an IAM role with a missing name.

Expected Behavior

Use something like required_fields = ["tenant", "namespace", "environment", "name"] for example and if any of those fields are missing, throw an error.

This would also remove the need to use required_tags from introspection.mixin.tf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant