Fix resource_mongodbatlas_secret_role missing roles - #2047
Conversation
fairclothjm
left a comment
There was a problem hiding this comment.
@jgrumboe Thanks for the contribution! Could you please make the following updates:
- use
d.GetOkin favor ofd.HasChangeas suggested - add a changelog entry
- add a test that captures the failures scenario we are addressing in this PR
|
@fairclothjm sure, I will look it this. I have a question regarding the test: the problem we want to test against is to check the payload for the Vault API request. I've looked at other tests and just saw testing results. How can I check the payload of the request? |
|
@jgrumboe Thanks, I will try to shed some light here. Currently we have 3 TestSteps that cover role.
There is no need to check the payload for the Vault API request. When TF applies a configuration it will write to Vault, then immediately read back the data from the Vault API, set the TF state to what was read from the Vault API, and finally our test will assert that the TF state is what we expect. Hope that helps! |
|
Yes, that helps! |
8b4a2d3 to
bf9e357
Compare
|
@fairclothjm I've splitted the original test function (with |
bf9e357 to
45a7cf1
Compare
45a7cf1 to
0b2ee22
Compare
fairclothjm
left a comment
There was a problem hiding this comment.
LGTM! Thanks @jgrumboe !
Description
This PR fixes a problem where
vault_mongodbatlas_secret_roleis not sending therolesattribute at every API call for Vault`s mongodbatlas roles API endpoint.Closes #2025
Checklist
Output from acceptance testing:
Community Note