-
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_api_key] Stop overwriting key values in state when the API omits the key #2544
Conversation
/merge |
🚂 MergeQueue: pull request added to the queue The median merge time in Use |
❌ MergeQueue: This merge request is not mergeable, blocked by github PR can't be merged according to github policy. It's probably because:
If you need support, contact us on Slack #devflow with those details! |
/merge |
🚂 MergeQueue: pull request added to the queue The median merge time in Use |
❌ MergeQueue: This merge request is not mergeable, blocked by github PR can't be merged according to github policy. It's probably because:
If you need support, contact us on Slack #devflow with those details! |
/merge |
🚂 MergeQueue: pull request added to the queue The median merge time in Use |
When updating or importing API key resources, if the Datadog API does not include the optional computed key field, then the field is overwritten with an empty string in terraform state. The key is immutable so it does not need to be updated once it has been initially set.
Added a check to ensure the field is set before writing it into the response.
Tested manually via integration test against API responses with and without the key field. Updated unit test to match new behavior and not depend on the API returning an optional field.