Skip to content
This repository was archived by the owner on Jan 21, 2020. It is now read-only.

Commit a4165de

Browse files
kaufersDavid Chung
authored andcommitted
Use the LogicalID in the resource name during tf import (#737)
Signed-off-by: Steven Kaufer <[email protected]>
1 parent 194574c commit a4165de

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pkg/run/v0/terraform/terraform.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,10 @@ func parseInstanceSpecFromGroup(groupSpecURL, groupID string) (*instance.Spec, e
193193
}
194194
tags["infrakit.group"] = groupID
195195
}
196+
// Use the first logical ID if set
197+
if len(groupProps.Allocation.LogicalIDs) > 0 {
198+
tags["LogicalID"] = string(groupProps.Allocation.LogicalIDs[0])
199+
}
196200

197201
spec := instance.Spec{
198202
Properties: groupProps.Instance.Properties,

0 commit comments

Comments
 (0)