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

provider/aws: Validate regular expression passed via the name_regex attribute. #9622

Conversation

kwilczynski
Copy link
Contributor

This commit adds a simple ValidateFunc to check whether the regular
expression that was passed down via the name_regex attribute is valid.

Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
This commit adds a simple ValidateFunc to check whether the regular
expression that was passed down via the `name_regex` attribute is valid.

Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
@kwilczynski kwilczynski changed the title Validate regular expression passed via the name_regex attribute. provider/aws: Validate regular expression passed via the name_regex attribute. Oct 26, 2016
@kwilczynski
Copy link
Contributor Author

The unit test is passing:

$ make test TEST=./builtin/providers/aws TESTARGS='-v -run=TestResourceValidateNameRegex'
==> Checking that code complies with gofmt requirements...
==> Checking AWS provider for unchecked errors...
==> NOTE: at this time we only look for uncheck errors in the AWS package
go generate $(go list ./... | grep -v /terraform/vendor/)
2016/10/26 12:02:35 Generated command/internal_plugin_list.go
TF_ACC= go test ./builtin/providers/aws -v -run=TestResourceValidateNameRegex -timeout=30s -parallel=4
=== RUN   TestResourceValidateNameRegex
--- PASS: TestResourceValidateNameRegex (0.00s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    0.017s

@kwilczynski
Copy link
Contributor Author

Resolves #9608.

@stack72
Copy link
Contributor

stack72 commented Oct 26, 2016

LGTM! Thanks for fixing this so fast @kwilczynski :)

@stack72 stack72 merged commit 44614c6 into hashicorp:master Oct 26, 2016
mathieuherbert pushed a commit to mathieuherbert/terraform that referenced this pull request Oct 30, 2016
… attribute. (hashicorp#9622)

* Clean-up for Go 1.7+ version.

Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>

* Validate regular expression passed via the `name_regex` attribute.

This commit adds a simple ValidateFunc to check whether the regular
expression that was passed down via the `name_regex` attribute is valid.

Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
@ghost
Copy link

ghost commented Apr 21, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants