-
Notifications
You must be signed in to change notification settings - Fork 558
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 SSH sign endpoint #2409
base: main
Are you sure you want to change the base?
Conversation
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 great overall, two small suggestions and the conflicts will need to be resolved before approval.
consts.FieldCertType: { | ||
Type: schema.TypeString, | ||
Optional: true, | ||
Default: "user", |
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.
I think the preference these days is not to specify Default on the TFVP side and just allow the backend to specify them.
|
||
payload := map[string]interface{}{ | ||
"public_key": publicKey, | ||
"ttl": ttl, |
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.
I think for all optional fields we should only add them to the payload if it was provided within the tf configuration. So we probably need another loop iterating over all the optional fields and do a GetOk and adding only if the boolean was true.
} | ||
` | ||
|
||
func testDataSourceSSHSecretBackendSign_check(s *terraform.State) error { |
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.
Wonderful test!
Description
Relates OR Closes #0000
Checklist
Output from acceptance testing:
Community Note