From 43cfd3d1c93410a879f10c2ca762fbb134ac0e74 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Fri, 19 Aug 2016 12:09:19 -0400 Subject: [PATCH] command: fix regressions for state mv with count resource --- command/state_mv.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/command/state_mv.go b/command/state_mv.go index ea6c5a8cc..8a3c2c1af 100644 --- a/command/state_mv.go +++ b/command/state_mv.go @@ -156,6 +156,11 @@ func (c *StateMvCommand) addableResult(results []*terraform.StateFilterResult) i } } + // If we only have one item, add it directly + if len(result) == 1 { + return result[0] + } + return result default: