Skip to content

Enforce required fields #135

Description

@nitrocode

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions