-
Notifications
You must be signed in to change notification settings - Fork 551
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
Support inheritable resource quotas #2133
Conversation
vault/resource_quota_lease_count.go
Outdated
if data["path"] == "" && d.Get("inheritable") == nil { | ||
data["inheritable"] = true | ||
} else if v, ok := d.GetOkExists("inheritable"); ok { | ||
data["inheritable"] = v.(bool) | ||
} |
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.
GetOkExists is deprecated so we prefer to use d.Get for booleans. This can be simplified and requires inheritable
to not be Computed.
if data["path"] == "" && d.Get("inheritable") == nil { | |
data["inheritable"] = true | |
} else if v, ok := d.GetOkExists("inheritable"); ok { | |
data["inheritable"] = v.(bool) | |
} | |
data["inheritable"] = d.Get("inheritable").(bool) |
vault/resource_quota_lease_count.go
Outdated
if data["path"] == "" && d.Get("inheritable") == nil { | ||
data["inheritable"] = true | ||
} else if v, ok := d.GetOkExists("inheritable"); ok { | ||
data["inheritable"] = v.(bool) | ||
} |
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.
GetOkExists is deprecated so we prefer to use d.Get for booleans. This can be simplified and requires inheritable
to not be Computed.
if data["path"] == "" && d.Get("inheritable") == nil { | |
data["inheritable"] = true | |
} else if v, ok := d.GetOkExists("inheritable"); ok { | |
data["inheritable"] = v.(bool) | |
} | |
data["inheritable"] = d.Get("inheritable").(bool) |
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.
Thanks for the contribution @husunal ! I left some comments that apply generally to the change. Thanks!
56ffdf8
to
87968fc
Compare
All tasks are done except for replacing
|
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 @husunal
@husunal I am running the build for all supported vault versions and then will merge if all is good. |
@husunal Failing on Vault 1.16.1 Ent:
|
Thank you @fairclothjm I’m unable to reproduce the error. Can we re-run the failed tests? |
It seems that the test failure is related to the new default lease count quota. I have updated the test to skip creating a quota in the root namespace if the version is 1.16 or greater. |
@fairclothjm can we run another build for all supported Vault versions? The issue caused by the new default lease count quota should now be fixed. |
Description
Support
inheritable
parameter for thevault_quota_rate_limit
andvault_quota_lease_count
resources.Checklist
Output from acceptance testing:
Community Note