-
Notifications
You must be signed in to change notification settings - Fork 385
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
[datadog_synthetics_test] Fix multistep client certificate #2683
[datadog_synthetics_test] Fix multistep client certificate #2683
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.
Great work! Do you have an idea of how to capture this in unit tests?
return &certString, &keyString | ||
} | ||
|
||
func overrideStateCertificate(requestClientCertificates []interface{}, configCert, configKey string) 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.
You don't do anything with the returned error - is it expected?
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.
Overall LGTM, great work!
Left a few comments on structure to keep the provider implementation moving into the right direction.
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 understand it's not the cleanest, but it's good enough like that. With buildDatadogRequestCertificates
aligned, we'll try to align further the retrieval later.
Great job! Thanks a lot for taking into account our reviews 🙇
…step-client-certificate
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.
🚀
/merge |
Devflow running:
|
Description
This PR was created in response to this issue where applying a multistep test with a client certificate multiple times would result in the certificate being deleted in the backend.
The tricky thing here is that the certificate is never stored in the tf state for security reasons, and we pass an empty value to the backend if its value does not change. Because we don't have the step ids in terraform, the backend can't partially update the step and just overrides everything, thus the certificate is destroyed.
As a fix, we decided to pass the certificate on each tf update.