fix(observability/instance): adjust drift
Description
With some of the newer versions the Observability Instance Ressource generates a lot of diff noise if a alert_config is specified.
# module.observability.stackit_observability_instance.observability[0] will be updated in-place
~ resource "stackit_observability_instance" "observability" ***
~ alert_config = ***
~ global = ***
+ opsgenie_api_key = (sensitive value)
+ opsgenie_api_url = (known after apply)
~ resolve_timeout = "5m" -> (known after apply)
~ smtp_auth_identity = "*****" -> (known after apply)
# Warning: this attribute value will no longer be marked as sensitive
# after applying this change.
~ smtp_auth_password = (sensitive value)
~ smtp_auth_username = "*****" -> (known after apply)
~ smtp_from = "[email protected]" -> (known after apply)
~ smtp_smart_host = "*****" -> (known after apply)
*** -> (known after apply)
# (2 unchanged attributes hidden)
***
id = "redacted"
name = "redacted"
~ plan_id = "redacted" -> (known after apply)
# (24 unchanged attributes hidden)
***
This issue tries to solve this noisiness. If there are changes needed just let me know.
Checklist
- [ ] Issue was linked above
- [x] Code format was applied:
make fmt - [ ] Examples were added / adjusted (see
examples/directory) - [x] Docs are up-to-date:
make generate-docs(will be checked by CI) - [ ] Unit tests got implemented or updated
- [ ] Acceptance tests got implemented or updated (see e.g. here)
- [x] Unit tests are passing:
make test(will be checked by CI) - [x] No linter issues:
make lint(will be checked by CI)
This PR was marked as stale after 7 days of inactivity and will be closed after another 7 days of further inactivity. If this PR should be kept open, just add a comment, remove the stale label or push new commits to it.
Bump
Thanks for your contributions! The send_resolve attribute in webhook_configs still creates some diffs, when it's not set in the configuration. This can be fixed when it's explicit set, as mentioned here by you https://github.com/stackitcloud/terraform-provider-stackit/issues/1003#issuecomment-3356315212.
https://github.com/stackitcloud/terraform-provider-stackit/blob/1b7bc0597834e64dadbd12788e2112061a089d6b/stackit/internal/services/observability/instance/resource.go#L734-L749
Could you set it to computed and default: true, similar like it's done for google_chat and ms_teams? This would probably fix this issue #1003
Thanks for your contributions! The
send_resolveattribute inwebhook_configsstill creates some diffs, when it's not set in the configuration. This can be fixed when it's explicit set, as mentioned here by you #1003 (comment).https://github.com/stackitcloud/terraform-provider-stackit/blob/1b7bc0597834e64dadbd12788e2112061a089d6b/stackit/internal/services/observability/instance/resource.go#L734-L749
Could you set it to computed and default: true, similar like it's done for google_chat and ms_teams? This would probably fix this issue #1003
I added it to more places with a default value of true and computed, since there are three places of send_resolved. The Instance is still created without an issue and no drift so I think this is fine. If this was not the intention I can still revert it to only the one place mentioned.
This PR was marked as stale after 7 days of inactivity and will be closed after another 7 days of further inactivity. If this PR should be kept open, just add a comment, remove the stale label or push new commits to it.
Hi, are there any changes needed to get this PR merged ?
This PR was marked as stale after 7 days of inactivity and will be closed after another 7 days of further inactivity. If this PR should be kept open, just add a comment, remove the stale label or push new commits to it.
@marceljk Is there any news on this?
Hi, it's approved from the second review as well and will be part of our next release.
Thanks for your contribution!
Best regards Marcel