Skip to content

Commit a3b1635

Browse files
committed
note to remind delete old clusters
1 parent c0552ec commit a3b1635

File tree

4 files changed

+5
-0
lines changed

4 files changed

+5
-0
lines changed

internal/convert/convert.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ const (
3333
commentGeneratedBy = "Generated by atlas-cli-plugin-terraform."
3434
commentConfirmReferences = "Please confirm that all references to this resource are updated."
3535
commentMovedBlock = "Moved blocks"
36+
commentRemovedOld = "Note: Remember to remove or coment out the old cluster definitions."
3637
)
3738

3839
type attrVals struct {
@@ -119,6 +120,7 @@ func fillMovedBlocks(body *hclwrite.Body, moveLabels []string) {
119120
}
120121
body.AppendNewline()
121122
hcl.AppendComment(body, commentMovedBlock)
123+
hcl.AppendComment(body, commentRemovedOld)
122124
body.AppendNewline()
123125
for i, moveLabel := range moveLabels {
124126
block := body.AppendNewBlock(nMoved, nil)

internal/convert/testdata/clu2adv/includeMoved_multiple.out.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ resource "another_resource" "another" {
103103
}
104104

105105
# Moved blocks
106+
# Note: Remember to remove or coment out the old cluster definitions.
106107

107108
moved {
108109
from = mongodbatlas_cluster.cluster1

internal/convert/testdata/clu2adv/includeMoved_single.out.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ resource "mongodbatlas_advanced_cluster" "cluster" {
2323
}
2424

2525
# Moved blocks
26+
# Note: Remember to remove or coment out the old cluster definitions.
2627

2728
moved {
2829
from = mongodbatlas_cluster.cluster

test/e2e/testdata/clu2adv.expected_moved.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ resource "mongodbatlas_advanced_cluster" "cluster" {
2626
}
2727

2828
# Moved blocks
29+
# Note: Remember to remove or coment out the old cluster definitions.
2930

3031
moved {
3132
from = mongodbatlas_cluster.cluster

0 commit comments

Comments
 (0)