-
Notifications
You must be signed in to change notification settings - Fork 545
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 vault_quota_rate_limit
resource
#825
Conversation
af6a7b1
to
44c4413
Compare
Test failure is unrelated:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good so far! I had some small requests and I just noticed the included test doesn't pass, at least for me, can you check it out?
[terraform-provider-vault][quota-rate-limit](4)$ VAULT_TOKEN=root make testacc TEST=./vault/... TESTARGS="-run=TestQuotaRateLimit -count=1" ⏎ ✹ ✭
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./vault/... -v -run=TestQuotaRateLimit -count=1 -timeout 120m
=== RUN TestQuotaRateLimit
testing.go:701: Error destroying resource! WARNING: Dangling resources
may exist. The full state and error is shown below.
Error: Check failed: Resource Quota Rate Limit tf-test-7029932848308157165 still exists
State: <no state>
--- FAIL: TestQuotaRateLimit (0.23s)
FAIL
FAIL github.com/terraform-providers/terraform-provider-vault/vault 0.498s
FAIL
make: *** [testacc] Error 1
@catsby Sorry for the silence. Let me look into your comments ASAP. |
@catsby I have made the changes you suggested. I cannot replicate your test failure. What version of Vault are you running the tests against? The test passes on CI and it's running against the CI Test failure is due to a persistently flaky test. |
Hey @lawliet89 - I've been running the tests with a Vault server compiled from the
Can you try running that command? I'm running Vault 1.5.3 with |
Vault doesn't like it when you have multiple quotas for the same path. I can add another separate test to support running the tests in parallel for different secret mounts but I also do want to have a test for |
Well, I was assuming that after the test completed the first time, all quotas would be removed before the second test ran. That would mean any previous quota at that path would have been deleted, so there shouldn't be a conflict. Am I misunderstanding something here? |
I modified the tests and made the attribute
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM thanks!
* Add `vault_quota_rate_limit` resource * Fix tab * Fix documentation * Remove unused functionemove unused function * Add validation function * Make `path` `ForceNew`
Community Note
Fixes #824
Release note for CHANGELOG:
Output from acceptance testing: