Skip to content

Commit 2518a03

Browse files
tongyimingmikatong
and
mikatong
authored
fix(cvm): [117892563]launch failed prompt (#2695)
* fix launch failed prompt * update * update --------- Co-authored-by: mikatong <[email protected]>
1 parent 372cacc commit 2518a03

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tencentcloud/services/cvm/resource_tc_instance.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -697,6 +697,9 @@ func resourceTencentCloudInstanceCreate(d *schema.ResourceData, meta interface{}
697697
}
698698
if instance != nil && *instance.InstanceState == CVM_STATUS_LAUNCH_FAILED {
699699
//LatestOperationCodeMode
700+
if instance.LatestOperationErrorMsg != nil {
701+
return resource.NonRetryableError(fmt.Errorf("cvm instance %s launch failed. Error msg: %s.\n", *instance.InstanceId, *instance.LatestOperationErrorMsg))
702+
}
700703
return resource.NonRetryableError(fmt.Errorf("cvm instance %s launch failed, this resource will not be stored to tfstate and will auto removed\n.", *instance.InstanceId))
701704
}
702705
if instance != nil && *instance.InstanceState == CVM_STATUS_RUNNING {

0 commit comments

Comments
 (0)