-
Notifications
You must be signed in to change notification settings - Fork 556
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Support allowed_domains_template on ssh_secret_backend_role. Fixes hashicorp#1675 #1676
Support allowed_domains_template on ssh_secret_backend_role. Fixes hashicorp#1675 #1676
Conversation
What is required to get this merged? |
@vinay-gopalan, @fairclothjm do you mind having a look? |
I need this as well. I have raised an enterprise support request to try and get the review/merge/release of this expedited. |
@vinay-gopalan this was first linked to 3.15.0 milestone, but is now associated with 3.16.0 (was the milestone renamed?). |
@@ -215,6 +220,10 @@ func sshSecretBackendRoleWrite(d *schema.ResourceData, meta interface{}) error { | |||
data["allowed_critical_options"] = v.(string) | |||
} | |||
|
|||
if v, ok := d.GetOk("allowed_domains_template"); ok { |
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.
For booleans we prefer to use d.Get
since with the sdk v2 that we are using you cannot reliably determine if a boolean is currently set in the configuration, as opposed to stored in the prior state or set via a default value.
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.
+1 on using d.Get
for boolean field here; we can likely add it to L217 in data
w/ the rest of the booleans
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.
Looking great and thanks for putting up this PR! Had a couple of initial comments 😄
@@ -215,6 +220,10 @@ func sshSecretBackendRoleWrite(d *schema.ResourceData, meta interface{}) error { | |||
data["allowed_critical_options"] = v.(string) | |||
} | |||
|
|||
if v, ok := d.GetOk("allowed_domains_template"); ok { |
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.
+1 on using d.Get
for boolean field here; we can likely add it to L217 in data
w/ the rest of the booleans
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.
Looking great! Tests are passing, just had a small comment about wrapping lines in the docs since it's a new addition, but should be good to get in after that! Thanks 😄
Co-authored-by: vinay-gopalan <86625824+vinay-gopalan@users.noreply.github.com>
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, thanks for your contribution!
Looks like we missed a version check on this field. Since it was added in 1.12, the tests for 1.11 are breaking. Going to revert this and merge along with the fix PR |
Community Note
Closes #1675
Release note for CHANGELOG:
Output from acceptance testing: