Skip to content

fix(dts): [138918015] change tags from list to set for tencentcloud_dts_sync_job to handle unordered tags response - #4559

Merged
SevenEarth merged 4 commits into
masterfrom
fix/dts-sync-job-tags-to-set
Oct 15, 2026
Merged

SevenEarth merged 4 commits into
masterfrom
fix/dts-sync-job-tags-to-set

Conversation

@iac-agent

Copy link
Copy Markdown
Collaborator

Changes

Change the tags field of tencentcloud_dts_sync_job from schema.TypeList to schema.TypeSet.

Problem

The tags field was defined as a list (schema.TypeList). However, after creation, the query API returns tags in an unordered manner. This caused Terraform to detect perpetual diffs because the order of tags in state did not match the unordered order returned by the API.

Solution

  • Changed tags schema type from schema.TypeList to schema.TypeSet so that tag comparison is order-independent.
  • Updated the Create handler to read tags via (*schema.Set).List() instead of v.([]interface{}).
  • Updated the test case to use resource.TestCheckTypeSetElemNestedAttrs for order-independent tag validation.

@iac-agent
iac-agent force-pushed the fix/dts-sync-job-tags-to-set branch from e156322 to 37f9c3b Compare October 14, 2026 07:55
@iac-agent iac-agent changed the title fix(dts): change tags from list to set for tencentcloud_dts_sync_job to handle unordered tags response fix(dts): [138918015] change tags from list to set for tencentcloud_dts_sync_job to handle unordered tags response Oct 14, 2026
@SevenEarth
SevenEarth merged commit 574d690 into master Oct 15, 2026
8 checks passed
@SevenEarth
SevenEarth deleted the fix/dts-sync-job-tags-to-set branch October 15, 2026 01:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants