Skip to content

Conversation

gitmkn
Copy link
Collaborator

@gitmkn gitmkn commented Apr 24, 2025

@Jalle19
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 hashicorp#6

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

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 hashicorp#6
@gitmkn gitmkn merged commit 988699c into tencentcloudstack:main Apr 24, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

tencentcloud-cvm Failed to wait for instance ready: instance(ins-xxxx) not exist
2 participants