feat: initial draft implementation for string exclusions #645
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Added a draft implementation for issue: #630
Adds two properties to the
random_string
as well asrandom_password
resource:exclusions
Set of Stringexclusions_case_sensitive
Boolean (default false)The goal is to provide a set of exclusions for the generated string (or password), if the generated string matches any of the exclusions it will regenerate the string until it has no match. If preferred I can change the exclusions to a configurable set of Regex patterns (might offer more flexibility).
Because it is my first time contributing to the terraform-provider-random, I'd love to first get a review on the following questions before I proceed with the implementation (e.g. going deep on testing and finalizing the implementation).
exclusions
be changed to a set of Regex instead of a plain string, I think it might offer more flexibility. Also because case sensitivity is already build-in to regex, we could work with only theexclusions
argument instead of having a separate configuration option for case sensitivity.