hashicorp / hashicorp/packer-plugin-tencentcloud

Tencentcloud v1.2.0 plugin crash

Open
#147 4 comments 1 reaction 0 assignees View on GitHub
bug
Dominant language
Go
Stars
8
Forks
11
PR merge metrics
No merged PRs in 30d

Description

#### Overview of the Issue

Tencentcloud plugin on version 1.2.0 panic upon calling packer build:
```
2025/03/05 10:48:49 packer-plugin-tencentcloud_v1.2.0_x5.0_linux_amd64 plugin: panic: interface conversion: interface {} is float64, not string
```

#### Reproduction Steps

* Use provided packer file.
* packer init example.pkr.hcl
* packer build example.pkr.hcl

Note that that the plugin crashes immediately. Version 1.1.0 does not have this problem.

### Plugin and Packer version

Packer v1.12.0
Tencentcloud v1.2.0

### Simplified Packer Buildfile

```
packer {
required_plugins {
tencentcloud = {
version = "1.2.0"
source = "github.com/hashicorp/tencentcloud"
}
}
}

variable "secret_id" {
type = string
default = "${env("TENCENTCLOUD_SECRET_ID")}"
}

variable "secret_key" {
type = string
default = "${env("TENCENTCLOUD_SECRET_KEY")}"
}

source "tencentcloud-cvm" "autogenerated_1" {
associate_public_ip_address = true
disk_type = "CLOUD_PREMIUM"
image_name = "PackerTest"
instance_type = "S3.SMALL1"
packer_debug = true
region = "eu-frankfurt"
secret_id = "${var.secret_id}"
secret_key = "${var.secret_key}"
source_image_id = "img-487zeit5"
ssh_username = "root"
zone = "eu-frankfurt-1"
}

build {
sources = ["source.tencentcloud-cvm.autogenerated_1"]

provisioner "shell" {
inline = ["sleep 30"]
}
}
```

### Operating system and Environment details

Linux, x64
PopOS! (Ubuntu 22.04)
Kernel verison 6.9.3-76060903-generic

### Log Fragments and crash.log files

Log and crash log available at https://gist.github.com/dstevensson/b7ccd5ee35d142c3e48756748a4e5e85

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.