Imports should come before Adds in change summaries (#33147)

This commit is contained in:
Liam Cervante 2023-05-04 15:06:48 +02:00 committed by GitHub
parent 81eb73731d
commit 77f10c4f68
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 8 deletions

View File

@ -226,9 +226,9 @@ func (plan Plan) renderHuman(renderer Renderer, mode plans.Mode, opts ...PlanRen
if importingCount > 0 {
renderer.Streams.Printf(
renderer.Colorize.Color("\n[bold]Plan:[reset] %d to add, %d to import, %d to change, %d to destroy.\n"),
counts[plans.Create]+counts[plans.DeleteThenCreate]+counts[plans.CreateThenDelete],
renderer.Colorize.Color("\n[bold]Plan:[reset] %d to import, %d to add, %d to change, %d to destroy.\n"),
importingCount,
counts[plans.Create]+counts[plans.DeleteThenCreate]+counts[plans.CreateThenDelete],
counts[plans.Update],
counts[plans.Delete]+counts[plans.DeleteThenCreate]+counts[plans.CreateThenDelete])
} else {

View File

@ -141,7 +141,7 @@ Terraform will perform the following actions:
value = "Hello, World!"
}
Plan: 0 to add, 1 to import, 0 to change, 0 to destroy.
Plan: 1 to import, 0 to add, 0 to change, 0 to destroy.
`,
},
"import_and_move": {
@ -181,7 +181,7 @@ Terraform will perform the following actions:
value = "Hello, World!"
}
Plan: 0 to add, 1 to import, 0 to change, 0 to destroy.
Plan: 1 to import, 0 to add, 0 to change, 0 to destroy.
`,
},
"import_move_and_update": {
@ -226,7 +226,7 @@ Terraform will perform the following actions:
~ value = "Hello, World!" -> "Hello, Universe!"
}
Plan: 0 to add, 1 to import, 1 to change, 0 to destroy.
Plan: 1 to import, 0 to add, 1 to change, 0 to destroy.
`,
},
"import_and_update": {
@ -269,7 +269,7 @@ Terraform will perform the following actions:
~ value = "Hello, World!" -> "Hello, Universe!"
}
Plan: 0 to add, 1 to import, 1 to change, 0 to destroy.
Plan: 1 to import, 0 to add, 1 to change, 0 to destroy.
`,
},
"import_and_update_with_no_id": {
@ -310,7 +310,7 @@ Terraform will perform the following actions:
~ value = "Hello, World!" -> "Hello, Universe!"
}
Plan: 0 to add, 1 to import, 1 to change, 0 to destroy.
Plan: 1 to import, 0 to add, 1 to change, 0 to destroy.
`,
},
"import_and_replace": {
@ -356,7 +356,7 @@ Terraform will perform the following actions:
value = "Hello, World!"
}
Plan: 1 to add, 1 to import, 0 to change, 1 to destroy.
Plan: 1 to import, 1 to add, 0 to change, 1 to destroy.
`,
},
}