Skip to content

Commit d605d92

Browse files
authored
Merge pull request #14 from tencentcloudstack/fix/packerId
fix: support concurrent
2 parents 11c559e + 4398592 commit d605d92

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

builder/tencentcloud/cvm/run_config.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,8 @@ var ValidCBSType = []string{
116116
}
117117

118118
func (cf *TencentCloudRunConfig) Prepare(ctx *interpolate.Context) []error {
119-
packerId := fmt.Sprintf("packer_%s", uuid.TimeOrderedUUID()[:8])
119+
timeOrderedUUID := uuid.TimeOrderedUUID()
120+
packerId := fmt.Sprintf("packer_%s_%s", timeOrderedUUID[:8], timeOrderedUUID[9:13])
120121
if cf.Comm.SSHKeyPairName == "" && cf.Comm.SSHTemporaryKeyPairName == "" &&
121122
cf.Comm.SSHPrivateKeyFile == "" && cf.Comm.SSHPassword == "" && cf.Comm.WinRMPassword == "" {
122123
//tencentcloud support key pair name length max to 25

0 commit comments

Comments
 (0)