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

Standardize context for input and chaining #99

Merged
merged 7 commits into from
Aug 27, 2020
Merged

Standardize context for input and chaining #99

merged 7 commits into from
Aug 27, 2020

Conversation

Nuru
Copy link
Contributor

@Nuru Nuru commented Aug 27, 2020

what

  • Refine the context object concept:
    • The previous context output contained normalized and generated data. This has now been renamed normalized_context
    • The new context object output simply propagates the input unmodified
    • The new context.tf file can be dropped into any module to provide standard context inputs and a context output (module.this.context) that can be fed into other modules
  • Refine the id length limit:
    • Rename id_max_length to id_length_limit
    • Prevent consecutive delimiters and at the same time ensure that if the id is truncated, it is truncate to exactly id_length_limit characters
  • Ensure that it is possible to eliminate delimiters by setting delimiter = "". Closes Empty delimiter does not work with TF 0.12 #77
  • Add additional tests for all of the above.

why

  • Provide a consistent interface to our modules, allow chaining, and provide something like a global setting as requested in Make var.label_order "global" #88
  • Make length limit for id more intuitive. Since id is also used as a tag value, and AWS limits tag value length to 255 characters, limit the id length by default so it will not break AWS.
  • Some environments do not allow non-alphabetic characters in names
  • Greater code coverage for testing helps prevent bugs from creeping in as new features are added

@Nuru Nuru requested review from osterman and aknysh August 27, 2020 04:50
@Nuru Nuru requested a review from a team as a code owner August 27, 2020 04:50
@Nuru Nuru changed the title Context Standardize context for input and chaining Aug 27, 2020
@Nuru
Copy link
Contributor Author

Nuru commented Aug 27, 2020

/test all

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

Successfully merging this pull request may close these issues.

Empty delimiter does not work with TF 0.12
2 participants