Skip to content

feat(telemetrylink): resource labels - #1884

Open
ozanichkovsky wants to merge 5 commits into
stackitcloud:mainfrom
ozanichkovsky:feature/telemetrylink-resource-labels
Open

ozanichkovsky wants to merge 5 commits into
stackitcloud:mainfrom
ozanichkovsky:feature/telemetrylink-resource-labels

Conversation

@ozanichkovsky

Copy link
Copy Markdown
Contributor

Description

Resource labels for telemetry link resources.
Depends on SDK changes #14095

Checklist

  • Issue was linked above
  • Code format was applied: make fmt
  • Examples were added / adjusted (see examples/ directory)
  • 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)
  • Unit tests are passing: make test (will be checked by CI)
  • No linter issues: make lint (will be checked by CI)

Comment thread go.mod
)

// TODO: remove once a telemetrylink SDK release containing ResourceLabels is available
replace github.com/stackitcloud/stackit-sdk-go/services/telemetrylink => github.com/ozanichkovsky/stackit-sdk-go/services/telemetrylink v0.0.0-20261124165215-44fa5fe74b97

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

todo left


// testConfigVarsMaxLabelsRemoved sets an empty labels map so that the previously set label gets removed.
func testConfigVarsMaxLabelsRemoved() config.Variables {
newVars := make(config.Variables, len(testConfigVarsMin))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
newVars := make(config.Variables, len(testConfigVarsMin))
newVars := make(config.Variables, len(testConfigVarsMax))

Description: schemaDescriptions["labels"],
ElementType: types.StringType,
Optional: true,
},

@Fyusel Fyusel Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found some issues during testing:

  1. add e.g. three labels in your terraform config and run terraform apply
labels = {
    "key" = "value",
    "key1" = "value1",
    "key2" = "value2",
  }
  1. remove one label and run terraform apply (e.g. key1)
    -> state drift
│ Error: Provider produced inconsistent result after apply
│ 
│ When applying changes to stackit_telemetrylink.link, provider
│ "provider[\"registry.terraform.io/stackitcloud/stackit\"]" produced an unexpected new value: .labels: new element
│ "key1" has appeared.
│ 
│ This is a bug in the provider, which should be reported in the provider's own issue tracker.

Additionally two more issues:

  • removing the whole lables {} from the config does not work (this is different behavior than the router label implementation
  • even labels = {} does result in state drifts

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants