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 support for roles to both rate limit and lease count quotas #1994

Merged
merged 10 commits into from
Aug 31, 2023

Conversation

raskchanky
Copy link
Contributor

This adds support for the role attribute for both rate limit and lease count quotas.

Closes #1782

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" comments, they generate extra noise for pull request followers and do not help prioritize the request

Release note for CHANGELOG:

Add support for the `role` attribute for both rate limit and lease count quotas

Output from acceptance testing:

~/s/h/terraform-provider-vault ❯❯❯ (vault-14105) env TF_ACC=1 VAULT_TOKEN=root VAULT_ADDR=http://127.0.0.1:8200 go test -v -count=1 -run="^TestQuotaRateLimitWithRole\$" ./vault
2023/08/29 16:08:26 [INFO] Using Vault token with the following policies: root
=== RUN   TestQuotaRateLimitWithRole
--- PASS: TestQuotaRateLimitWithRole (0.80s)
PASS
ok      github.com/hashicorp/terraform-provider-vault/vault     1.336s
~/s/h/terraform-provider-vault ❯❯❯ (vault-14105) env TF_ACC=1 TF_ACC_ENTERPRISE=1 VAULT_TOKEN=root VAULT_ADDR=http://127.0.0.1:8200 go test -v -count=1 -run="^TestQuotaLeaseCountWithRole\$" ./vault
2023/08/29 16:08:38 [INFO] Using Vault token with the following policies: root
=== RUN   TestQuotaLeaseCountWithRole
--- PASS: TestQuotaLeaseCountWithRole (1.21s)
PASS
ok      github.com/hashicorp/terraform-provider-vault/vault     1.617s
~/s/h/terraform-provider-vault ❯❯❯ (vault-14105)

@raskchanky
Copy link
Contributor Author

This is my first PR to this repo so if I did something wrong here, please let me know 😅

Copy link
Contributor

@fairclothjm fairclothjm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good @raskchanky ! Thanks! Just a few comments

@raskchanky raskchanky requested a review from fairclothjm August 30, 2023 17:19
Copy link
Contributor

@fairclothjm fairclothjm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks!

@fairclothjm fairclothjm modified the milestones: 3.20.0, Future, 3.21.0 Aug 30, 2023
Copy link
Contributor

@fairclothjm fairclothjm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I forgot to mention the Import test step the last time around. Sorry about that! Otherwise LGTM! Thanks!

Copy link
Contributor

@vinay-gopalan vinay-gopalan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working through this! Apologies for the longer comments, these are definitely more nuanced bits of the TFVP so wanted to take a sec to be more descriptive! Happy to answer any more questions if needed :)

vault/resource_quota_lease_count.go Outdated Show resolved Hide resolved
vault/resource_quota_lease_count.go Outdated Show resolved Hide resolved
vault/resource_quota_lease_count.go Outdated Show resolved Hide resolved
vault/resource_quota_lease_count_test.go Outdated Show resolved Hide resolved
@raskchanky
Copy link
Contributor Author

@vinay-gopalan Thank you so much for all the comments! Never apologize for too much information. This is terrific stuff, particularly for someone like me that's so new to this code. I appreciate all the time you took to write all this up.

@raskchanky
Copy link
Contributor Author

@vinay-gopalan @fairclothjm Anything else to do here or is this good to merge?

Copy link
Contributor

@fairclothjm fairclothjm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@raskchanky raskchanky merged commit e78540a into main Aug 31, 2023
@raskchanky raskchanky deleted the vault-14105 branch August 31, 2023 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature Request: Add support for the role parameter in vault_quota_rate_limit
3 participants