terraform-provider-stackit icon indicating copy to clipboard operation
terraform-provider-stackit copied to clipboard

fix(observability/instance): adjust drift

Open mitterle-sit opened this issue 2 months ago • 6 comments

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)

mitterle-sit avatar Oct 29 '25 14:10 mitterle-sit

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.

github-actions[bot] avatar Nov 06 '25 02:11 github-actions[bot]

Bump

mitterle-sit avatar Nov 06 '25 07:11 mitterle-sit

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

marceljk avatar Nov 06 '25 10:11 marceljk

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 #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.

mitterle-sit avatar Nov 10 '25 07:11 mitterle-sit

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.

github-actions[bot] avatar Nov 22 '25 02:11 github-actions[bot]

Hi, are there any changes needed to get this PR merged ?

mitterle-sit avatar Nov 24 '25 07:11 mitterle-sit

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.

github-actions[bot] avatar Dec 02 '25 02:12 github-actions[bot]

@marceljk Is there any news on this?

haeussermanp avatar Dec 09 '25 11:12 haeussermanp

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

marceljk avatar Dec 16 '25 15:12 marceljk