hashicorp / packer-plugin-tencentcloud

Packer plugin for Tencent Cloud Image Builder
https://www.packer.io/docs/builders/tencentcloud-cvm
Mozilla Public License 2.0
8 stars 12 forks source link

Use a unique value as ClientToken for each RunInstances request #131

Open Jalle19 opened 3 days ago

Jalle19 commented 3 days ago

The purpose of ClientToken is to ensure request idempotency in case the request needs to be retried. This means the value must be unique for all unique RunInstances API calls.

When building a template that references the same source multiple times (or multiple different sources), many calls to RunInstances are made. However, the same auto-generated instance name was used as ClientToken.

This changes ClientToken to be unique regardless of whether the user has supplied a unique instance_name for each source/build.

Fixes https://github.com/hashicorp/packer-plugin-tencentcloud/issues/6

Added additional logging for the instance IDs created to ease debugging.

hashicorp-cla-app[bot] commented 3 days ago

CLA assistant check
All committers have signed the CLA.

hashicorp-cla-app[bot] commented 3 days ago

CLA assistant check

Thank you for your submission! We require that all contributors sign our Contributor License Agreement ("CLA") before we can accept the contribution. Read and sign the agreement

Learn more about why HashiCorp requires a CLA and what the CLA includes


Sam Stenvall seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.

Have you signed the CLA already but the status is still pending? Recheck it.