Skip to content

Conversation

@rotem-cloud
Copy link
Collaborator

e2e tests output:
Summary:

Step 1: v4 terraform apply
Status: ✓ SUCCESS

Step 2: Migration (v4 → v5)
Status: ✓ SUCCESS

Step 3: v5 plan (before apply)
Status: ✓ No changes needed

Step 4: v5 terraform apply
Status: ✓ SUCCESS

Step 5: v5 plan (after apply)
Status: ✓ SUCCESS - Stable state achieved
Result: No changes detected

// The Cloudflare API returns domains in alphabetical order, and since v5 uses
// ListAttribute (ordered) instead of SetAttribute (unordered), we must sort
// domains in both config and state to prevent drift
if attr := body.GetAttribute("domains"); attr != nil {
Copy link
Collaborator

Choose a reason for hiding this comment

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

This might be worth extracting into a helper function, something like SortListAttributeAlphabetically

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

i'm actually working on a pr for that now

@rotem-cloud rotem-cloud merged commit e29a4a1 into main Jan 22, 2026
9 checks passed
@rotem-cloud rotem-cloud deleted the cloudflare/turnstile_widget_migration branch January 22, 2026 22:30
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.

2 participants