-
Notifications
You must be signed in to change notification settings - Fork 1
feat: Adds optionally moved blocks #26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Aliases: []string{"tf"}, | ||
} | ||
terraformCmd.AddCommand(clu2adv.Builder(), adv2.Builder()) | ||
terraformCmd.AddCommand(clu2adv.Builder()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove skeleton for adv_cluster v1 to v2 conversion to avoid customer confusion as it won't be implemented yet
expectedErrContains: "file must not exist: " + fileExpected, | ||
}, | ||
"basic use": { | ||
args: []string{"--file", fileIn, "--output", fileOut}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add flag for moved?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good idea, added here: d0617be
} | ||
|
||
resource "mongodbatlas_advanced_cluster" "forEach" { | ||
# for_each doesn't affect moved blocks, it works in the same way |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this means it will handle all the dynamic values?
0 index and different keys?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, moved will move state for all the indexes (including 0 that won't do anything but won't fail)
return false | ||
} | ||
|
||
func fillMovedBlocks(body *hclwrite.Body, moveLabels []string) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
God job! Not sure if it makes sense to add a comment about uncommenting the old resource when using moved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@EspenAlbert added here: a3b1635 |
Description
Adds optionally moved blocks. It also adds skeleton for 2e2 tests, tests that execute the plugin binary.
Link to any related issue(s): CLOUDP-302368
Type of change:
Required Checklist:
Further comments