terraform-provider-newrelic: filter_current_dashboard of newrelic_one_dashboard is not handled properly
Please include the following with your bug report
- Your New Relic
providerconfiguration (sensitive details redacted) - A list of affected resources and/or data sources
- The configuration of the resources and/or data sources related to the bug report (i.e. from the list mentioned above)
- Description of the current behavior (the bug)
- Description of the expected behavior
- Any related log output
Terraform Version
1.0.9
Affected Resource(s)
Please list the resources as a list, for example:
newrelic_one_dashboardone_dashboard_raw(according to #1413 )
Terraform Configuration
Any basic config of newrelic_one_dashboard with widget_table and filter_current_dashboard=true
Actual Behavior
Terraform plan and apply operations show changes every time:
~ page {
...
~ widget_table {
~ filter_current_dashboard = false -> true
Expected Behavior
no changes
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
terraform applyorterraform plan(after apply)
Debug Output
Panic Output
Important Factoids
References
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 10
- Comments: 33 (12 by maintainers)
I agree with @zeffron @mbazhlekova this has fixed it for me and I have not found any edge cases. Thank you for fixing this!
The experience I have is the same as what is reported:
Even though the state of the dashboard is unchanged, and terraform applied successfully, subsequent back-to-back TF runs express that the value needs to change from
falsetotrue(but never do). Thus, the feature does not work; “filter_current_dashboard of newrelic_one_dashboard is not handled properly”.v2.41.0-beta.2 does seem to have resolved the issue for me.
Support for Lifecycle only exists on Resources, not Dynamic blocks. As the nature of a Dashboard can be complex at times and most have multiple pages and widgets, Dynamics are generally used.
https://github.com/hashicorp/terraform/issues/24188
I agree this helps the example, but for us it is not going to help in production.
Thanks @rdhar , I’ve added
one_dashboard_rawto the affected resources list with a hope that all of them could be fixed at once.@MrColeC @zeffron We rolled out another release - v2.41.0-beta.2 with a fix for the
linked_entity_guidserror. Please let us know if this resolves the issues you’re seeing.Can confirm the beta seems to work for our use case as well.
While re-trying #1413, I came across a li’l tidbit that might help address this issue (i.e., unnecessary noise in the execution logs) with an interim solution: leveraging
ignore_changesfrom Terraform’slifecyclemeta-argument docs.This will suppress redundant noise from
filter_current_dashboardon subsequent updates. Almost goes without saying, the ideal solution here would still be for the provider to properly register the value of the boolean, but this isn’t too shabby a workaround.Issue
Hi, this is still not working correctly in 2.34.1.
I had some issue setting up dashboards originated from a json file copy from an old dashboard. The original dashboard had
linked_entity_guids = []to the old dashboard.This works fine, however, it is pointing to the old dashboard.
So, I’ve changed the config to
The dashboard still points to the old one.
Experiments
I did some experiments
filter_current_dashbaord = trueto widget 2. However no filter is generated.