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/cloudflare: Add validation for record types and record content #11197

Merged
merged 2 commits into from
Jan 13, 2017

Conversation

grubernaut
Copy link
Contributor

Adds a validation function for cloudflare record types. Also adds an apply-time validation for the record's content based on record type. Currently only validating A and AAAA records, can be expanded to verify record content for every possible record type in the future.

$ make test TEST=./builtin/providers/cloudflare
==> 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
==> Installing errcheck...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/01/13 14:41:37 Generated command/internal_plugin_list.go
TF_ACC= go test ./builtin/providers/cloudflare  -timeout=30s -parallel=4
ok      github.com/hashicorp/terraform/builtin/providers/cloudflare     0.018s

Fixes: #11173

Adds a validation function for cloudflare record types. Also adds an apply-time validation for the record's content based on record type. Currently only validating `A` and `AAAA` records, can be expanded to verify record content for every possible record type in the future.

```
$ make test TEST=./builtin/providers/cloudflare
==> 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
==> Installing errcheck...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/01/13 14:41:37 Generated command/internal_plugin_list.go
TF_ACC= go test ./builtin/providers/cloudflare  -timeout=30s -parallel=4
ok      github.com/hashicorp/terraform/builtin/providers/cloudflare     0.018s
```

Fixes: #11173
@stack72
Copy link
Contributor

stack72 commented Jan 13, 2017

LGTM! Nice work :)

@grubernaut grubernaut merged commit fd20f16 into master Jan 13, 2017
@grubernaut grubernaut deleted the f-add-cloudflare-record-validation branch January 13, 2017 23:20
@ghost
Copy link

ghost commented Apr 18, 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 18, 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.

No validation performed on domain names for cloudflare_record
2 participants