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

Add 'StringDoesNotMatch' validation function #240

Merged
merged 1 commit into from
Nov 7, 2019
Merged

Add 'StringDoesNotMatch' validation function #240

merged 1 commit into from
Nov 7, 2019

Conversation

ewbankkit
Copy link
Contributor

Add StringDoesNotMatch(), a validator to ensure that the provided value does NOT match a given regular expression.
Pulled over from hashicorp/terraform-provider-aws#9941.

$ make test
==> Checking that code complies with gofmt requirements...
go generate ./...
go test ./...
ok  	github.com/hashicorp/terraform-plugin-sdk/helper/acctest	(cached)
ok  	github.com/hashicorp/terraform-plugin-sdk/helper/customdiff	(cached)
?   	github.com/hashicorp/terraform-plugin-sdk/helper/encryption	[no test files]
ok  	github.com/hashicorp/terraform-plugin-sdk/helper/hashcode	(cached)
?   	github.com/hashicorp/terraform-plugin-sdk/helper/logging	[no test files]
ok  	github.com/hashicorp/terraform-plugin-sdk/helper/mutexkv	(cached)
ok  	github.com/hashicorp/terraform-plugin-sdk/helper/pathorcontents	(cached)
ok  	github.com/hashicorp/terraform-plugin-sdk/helper/resource	(cached)
ok  	github.com/hashicorp/terraform-plugin-sdk/helper/schema	(cached)
ok  	github.com/hashicorp/terraform-plugin-sdk/helper/structure	(cached)
ok  	github.com/hashicorp/terraform-plugin-sdk/helper/validation	0.221s
ok  	github.com/hashicorp/terraform-plugin-sdk/httpclient	(cached)
ok  	github.com/hashicorp/terraform-plugin-sdk/internal/addrs	(cached)
ok  	github.com/hashicorp/terraform-plugin-sdk/internal/command/format	(cached)
ok  	github.com/hashicorp/terraform-plugin-sdk/internal/configs	(cached)
ok  	github.com/hashicorp/terraform-plugin-sdk/internal/configs/configload	(cached)
ok  	github.com/hashicorp/terraform-plugin-sdk/internal/configs/configschema	(cached)
ok  	github.com/hashicorp/terraform-plugin-sdk/internal/configs/hcl2shim	(cached)
ok  	github.com/hashicorp/terraform-plugin-sdk/internal/dag	(cached)
?   	github.com/hashicorp/terraform-plugin-sdk/internal/earlyconfig	[no test files]
ok  	github.com/hashicorp/terraform-plugin-sdk/internal/flatmap	(cached)
ok  	github.com/hashicorp/terraform-plugin-sdk/internal/helper/config	(cached)
ok  	github.com/hashicorp/terraform-plugin-sdk/internal/helper/didyoumean	(cached)
ok  	github.com/hashicorp/terraform-plugin-sdk/internal/helper/experiment	(cached)
ok  	github.com/hashicorp/terraform-plugin-sdk/internal/helper/plugin	(cached)
ok  	github.com/hashicorp/terraform-plugin-sdk/internal/httpclient	(cached)
ok  	github.com/hashicorp/terraform-plugin-sdk/internal/initwd	(cached)
ok  	github.com/hashicorp/terraform-plugin-sdk/internal/lang	(cached)
ok  	github.com/hashicorp/terraform-plugin-sdk/internal/lang/blocktoattr	(cached)
ok  	github.com/hashicorp/terraform-plugin-sdk/internal/lang/funcs	(cached)
?   	github.com/hashicorp/terraform-plugin-sdk/internal/modsdir	[no test files]
ok  	github.com/hashicorp/terraform-plugin-sdk/internal/moduledeps	(cached)
ok  	github.com/hashicorp/terraform-plugin-sdk/internal/plans	(cached)
?   	github.com/hashicorp/terraform-plugin-sdk/internal/plans/internal/planproto	[no test files]
ok  	github.com/hashicorp/terraform-plugin-sdk/internal/plans/objchange	(cached)
ok  	github.com/hashicorp/terraform-plugin-sdk/internal/plans/planfile	(cached)
ok  	github.com/hashicorp/terraform-plugin-sdk/internal/plugin/convert	(cached)
ok  	github.com/hashicorp/terraform-plugin-sdk/internal/plugin/discovery	(cached)
?   	github.com/hashicorp/terraform-plugin-sdk/internal/plugin/mock_proto	[no test files]
ok  	github.com/hashicorp/terraform-plugin-sdk/internal/providers	(cached)
?   	github.com/hashicorp/terraform-plugin-sdk/internal/provisioners	[no test files]
ok  	github.com/hashicorp/terraform-plugin-sdk/internal/registry	(cached)
ok  	github.com/hashicorp/terraform-plugin-sdk/internal/registry/regsrc	(cached)
ok  	github.com/hashicorp/terraform-plugin-sdk/internal/registry/response	(cached)
?   	github.com/hashicorp/terraform-plugin-sdk/internal/registry/test	[no test files]
ok  	github.com/hashicorp/terraform-plugin-sdk/internal/states	(cached)
ok  	github.com/hashicorp/terraform-plugin-sdk/internal/states/statefile	(cached)
ok  	github.com/hashicorp/terraform-plugin-sdk/internal/tfdiags	(cached)
?   	github.com/hashicorp/terraform-plugin-sdk/internal/tfplugin5	[no test files]
ok  	github.com/hashicorp/terraform-plugin-sdk/internal/vault/helper/pgpkeys	(cached)
ok  	github.com/hashicorp/terraform-plugin-sdk/internal/vault/sdk/helper/compressutil	(cached)
ok  	github.com/hashicorp/terraform-plugin-sdk/internal/vault/sdk/helper/jsonutil	(cached)
?   	github.com/hashicorp/terraform-plugin-sdk/internal/version	[no test files]
?   	github.com/hashicorp/terraform-plugin-sdk/meta	[no test files]
ok  	github.com/hashicorp/terraform-plugin-sdk/plugin	(cached)
ok  	github.com/hashicorp/terraform-plugin-sdk/terraform	(cached)

@appilon appilon merged commit de90773 into hashicorp:master Nov 7, 2019
@ewbankkit ewbankkit deleted the validate-string-does-not-match branch November 7, 2019 19:46
@ghost
Copy link

ghost commented Mar 31, 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 Mar 31, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants