@@ -12,6 +12,8 @@ a [communicator](/packer/docs/templates/legacy_json_templates/communicator) can
12
12
13
13
### Required:
14
14
15
+ <!-- Code generated from the comments of the TencentCloudAccessConfig struct in builder/tencentcloud/cvm/access_config.go; DO NOT EDIT MANUALLY -->
16
+
15
17
- ` secret_id ` (string) - Tencentcloud secret id. You should set it directly,
16
18
or set the ` TENCENTCLOUD_SECRET_ID ` environment variable.
17
19
@@ -26,100 +28,162 @@ a [communicator](/packer/docs/templates/legacy_json_templates/communicator) can
26
28
reference [ Region and Zone] ( https://intl.cloud.tencent.com/document/product/213/6091 )
27
29
for parameter taking.
28
30
31
+ <!-- End of code generated from the comments of the TencentCloudAccessConfig struct in builder/tencentcloud/cvm/access_config.go; -->
32
+
33
+
34
+ <!-- Code generated from the comments of the TencentCloudRunConfig struct in builder/tencentcloud/cvm/run_config.go; DO NOT EDIT MANUALLY -->
35
+
29
36
- ` instance_type ` (string) - The instance type your cvm will be launched by.
30
37
You should reference [ Instance Type] ( https://intl.cloud.tencent.com/document/product/213/11518 )
31
38
for parameter taking.
32
39
33
- - ` source_image_id ` (string) - The base image id of Image you want to create
34
- your customized image from.
40
+ <!-- End of code generated from the comments of the TencentCloudRunConfig struct in builder/tencentcloud/cvm/run_config.go; -->
41
+
42
+
43
+ <!-- Code generated from the comments of the TencentCloudImageConfig struct in builder/tencentcloud/cvm/image_config.go; DO NOT EDIT MANUALLY -->
35
44
36
45
- ` image_name ` (string) - The name you want to create your customize image,
37
46
it should be composed of no more than 60 characters, of letters, numbers
38
47
or minus sign.
39
48
49
+ <!-- End of code generated from the comments of the TencentCloudImageConfig struct in builder/tencentcloud/cvm/image_config.go; -->
50
+
51
+
40
52
### Optional:
41
53
42
- - ` force_poweroff ` (boolean) - Indicates whether to perform a forced shutdown to
43
- create an image when soft shutdown fails. Default value is ` false ` .
54
+ <!-- Code generated from the comments of the TencentCloudAccessConfig struct in builder/tencentcloud/cvm/access_config.go; DO NOT EDIT MANUALLY -->
55
+
56
+ - ` cvm_endpoint ` (string) - The endpoint you want to reach the cloud endpoint,
57
+ if tce cloud you should set a tce cvm endpoint.
58
+
59
+ - ` vpc_endpoint ` (string) - The endpoint you want to reach the cloud endpoint,
60
+ if tce cloud you should set a tce vpc endpoint.
61
+
62
+ - ` security_token ` (string) - STS access token, can be set through template or by exporting
63
+ as environment variable such as ` export TENCENTCLOUD_SECURITY_TOKEN=value ` .
64
+
65
+ - ` assume_role ` (TencentCloudAccessRole) - The ` assume_role ` block.
66
+ If provided, packer will attempt to assume this role using the supplied credentials.
67
+ - ` role_arn ` (string) - The ARN of the role to assume.
68
+ It can be sourced from the ` TENCENTCLOUD_ASSUME_ROLE_ARN ` .
69
+ - ` session_name ` (string) - The session name to use when making the AssumeRole call.
70
+ It can be sourced from the ` TENCENTCLOUD_ASSUME_ROLE_SESSION_NAME ` .
71
+ - ` session_duration ` (int) - The duration of the session when making the AssumeRole call.
72
+ Its value ranges from 0 to 43200(seconds), and default is 7200 seconds.
73
+ It can be sourced from the ` TENCENTCLOUD_ASSUME_ROLE_SESSION_DURATION ` .
74
+
75
+ - ` profile ` (string) - The profile name as set in the shared credentials.
76
+ It can also be sourced from the ` TENCENTCLOUD_PROFILE ` environment variable.
77
+ If not set, the default profile created with ` tccli configure ` will be used.
78
+ If not set this defaults to ` default ` .
79
+
80
+ - ` shared_credentials_dir ` (string) - The directory of the shared credentials.
81
+ It can also be sourced from the ` TENCENTCLOUD_SHARED_CREDENTIALS_DIR ` environment variable.
82
+ If not set this defaults to ` ~/.tccli ` .
83
+
84
+ <!-- End of code generated from the comments of the TencentCloudAccessConfig struct in builder/tencentcloud/cvm/access_config.go; -->
85
+
86
+
87
+ <!-- Code generated from the comments of the TencentCloudImageConfig struct in builder/tencentcloud/cvm/image_config.go; DO NOT EDIT MANUALLY -->
44
88
45
89
- ` image_description ` (string) - Image description. It should no more than 60 characters.
46
90
47
- - ` reboot ` (boolean, ** deprecated ** ) - Whether shutdown cvm to create Image.
48
- Please refer to parameter ` force_poweroff ` .
91
+ - ` force_poweroff ` (bool ) - Indicates whether to perform a forced shutdown to
92
+ create an image when soft shutdown fails. Default value is ` false ` .
49
93
50
- - ` sysprep ` (boolean ) - Whether enable Sysprep during creating windows image.
94
+ - ` sysprep ` (bool ) - Whether enable Sysprep during creating windows image.
51
95
52
- - ` image_copy_regions ` (array of strings ) - Regions that will be copied to after
96
+ - ` image_copy_regions ` ([ ] string ) - regions that will be copied to after
53
97
your image created.
54
98
55
- - ` image_share_accounts ` (array of strings ) - Accounts that will be shared to
99
+ - ` image_share_accounts ` ([ ] string ) - accounts that will be shared to
56
100
after your image created.
57
101
58
- - ` skip_region_validation ` (boolean) - Do not check region and zone when validate.
102
+ - ` image_tags ` (map[ string] string) - Key/value pair tags that will be applied to the resulting image.
103
+
104
+ <!-- End of code generated from the comments of the TencentCloudImageConfig struct in builder/tencentcloud/cvm/image_config.go; -->
105
+
59
106
60
- - ` associate_public_ip_address ` (boolean) - Whether allocate public ip to your cvm.
107
+ <!-- Code generated from the comments of the TencentCloudRunConfig struct in builder/tencentcloud/cvm/run_config.go; DO NOT EDIT MANUALLY -->
108
+
109
+ - ` associate_public_ip_address ` (bool) - Whether allocate public ip to your cvm.
61
110
Default value is ` false ` .
62
111
63
- If not set, you could access your cvm from the same vpc.
112
+ - ` source_image_id ` (string) - The base image id of Image you want to create
113
+ your customized image from.
114
+
115
+ - ` source_image_name ` (string) - The base image name of Image you want to create your
116
+ customized image from.Conflict with SourceImageId.
64
117
65
- - ` internet_max_bandwidth_out ` (number) - Max bandwidth out your cvm will be launched by(in MB).
66
- values can be set between 1 ~ 100.
118
+ - ` instance_charge_type ` (string) - Charge type of cvm, values can be ` POSTPAID_BY_HOUR ` (default) ` SPOTPAID `
67
119
68
120
- ` instance_name ` (string) - Instance name.
69
121
70
122
- ` disk_type ` (string) - Root disk type your cvm will be launched by, default is ` CLOUD_PREMIUM ` . you could
71
123
reference [ Disk Type] ( https://intl.cloud.tencent.com/document/product/213/15753#SystemDisk )
72
124
for parameter taking.
73
125
74
- - ` disk_size ` (number) - Root disk size your cvm will be launched by. values range(in GB):
75
-
126
+ - ` disk_size ` (int64) - Root disk size your cvm will be launched by. values range(in GB):
76
127
- LOCAL_BASIC: 50
77
128
- Other: 50 ~ 1000 (need whitelist if > 50)
78
129
79
- - ` data_disks ` (array of data disks) - Add one or more data disks to the instance before creating the
80
- image. Note that if the source image has data disk snapshots, this argument will be ignored, and
81
- the running instance will use source image data disk settings, in such case, ` disk_type `
82
- argument will be used as disk type for all data disks, and each data disk size will use the
83
- origin value in source image.
130
+ - ` data_disks ` ([ ] tencentCloudDataDisk) - Add one or more data disks to the instance before creating the image.
131
+ Note that if the source image has data disk snapshots, this argument
132
+ will be ignored, and the running instance will use source image data
133
+ disk settings, in such case, ` disk_type ` argument will be used as disk
134
+ type for all data disks, and each data disk size will use the origin
135
+ value in source image.
84
136
The data disks allow for the following argument:
85
-
86
- - ` disk_type ` - Type of the data disk. Valid choices: ` CLOUD_BASIC ` , ` CLOUD_PREMIUM ` and ` CLOUD_SSD ` .
87
- - ` disk_size ` - Size of the data disk.
88
- - ` disk_snapshot_id ` - Id of the snapshot for a data disk.
137
+ - ` disk_type ` - Type of the data disk. Valid choices: ` CLOUD_BASIC ` , ` CLOUD_PREMIUM ` and ` CLOUD_SSD ` .
138
+ - ` disk_size ` - Size of the data disk.
139
+ - ` disk_snapshot_id ` - Id of the snapshot for a data disk.
89
140
90
141
- ` vpc_id ` (string) - Specify vpc your cvm will be launched by.
91
142
92
143
- ` vpc_name ` (string) - Specify vpc name you will create. if ` vpc_id ` is not set, Packer will
93
144
create a vpc for you named this parameter.
94
145
95
- - ` cidr_block ` (boolean) - Specify cider block of the vpc you will create if ` vpc_id ` is not set.
96
-
97
146
- ` subnet_id ` (string) - Specify subnet your cvm will be launched by.
98
147
99
148
- ` subnet_name ` (string) - Specify subnet name you will create. if ` subnet_id ` is not set, Packer will
100
149
create a subnet for you named this parameter.
101
150
102
- - ` subnect_cidr_block ` (boolean) - Specify cider block of the subnet you will create if
103
- ` subnet_id ` is not set.
151
+ - ` cidr_block ` (string) - Specify cider block of the vpc you will create if vpc_id not set
104
152
105
- - ` security_group_id ` (string) - Specify security group your cvm will be launched by.
153
+ - ` subnect_cidr_block ` (string) - Specify cider block of the subnet you will create if
154
+ subnet_id not set
106
155
107
- - ` security_group_name ` (string) - Specify security name you will create if ` security_group_id ` is not set.
156
+ - ` internet_charge_type ` (string) - Internet charge type of cvm, values can be TRAFFIC_POSTPAID_BY_HOUR, BANDWIDTH_POSTPAID_BY_HOUR, BANDWIDTH_PACKAGE
157
+
158
+ - ` internet_max_bandwidth_out ` (int64) - Max bandwidth out your cvm will be launched by(in MB).
159
+ values can be set between 1 ~ 100.
160
+
161
+ - ` bandwidth_package_id ` (string) - When internet_charge_type is BANDWIDTH_PACKAGE, bandwidth_package_id is required
162
+
163
+ - ` security_group_id ` (string) - Specify securitygroup your cvm will be launched by.
164
+
165
+ - ` security_group_name ` (string) - Specify security name you will create if security_group_id not set.
108
166
109
167
- ` user_data ` (string) - userdata.
110
168
111
169
- ` user_data_file ` (string) - userdata file.
112
170
113
171
- ` host_name ` (string) - host name.
114
172
115
- - ` run_tags ` (map of strings) - Tags to apply to the instance that is _ launched_ to create the image.
173
+ - ` cam_role_name ` (string) - CAM role name.
174
+
175
+ - ` run_tags ` (map[ string] string) - Tags to apply to the instance that is _ launched_ to create the image.
116
176
These tags are _ not_ applied to the resulting image.
117
177
118
- - ` cvm_endpoint ` (string) - The endpoint you want to reach the cloud endpoint,
119
- if tce cloud you should set a tce cvm endpoint.
178
+ - ` run_tag ` ([ ] {key string, value string}) - Same as [ ` run_tags ` ] ( #run_tags ) but defined as a singular repeatable
179
+ block containing a ` key ` and a ` value ` field. In HCL2 mode the
180
+ [ ` dynamic_block ` ] ( /packer/docs/templates/hcl_templates/expressions#dynamic-blocks )
181
+ will allow you to create those programatically.
182
+
183
+ - ` ssh_private_ip ` (bool) - SSH Private Ip
184
+
185
+ <!-- End of code generated from the comments of the TencentCloudRunConfig struct in builder/tencentcloud/cvm/run_config.go; -->
120
186
121
- - ` vpc_endpoint ` (string) - The endpoint you want to reach the cloud endpoint,
122
- if tce cloud you should set a tce vpc endpoint.
123
187
124
188
### Communicator Configuration
125
189
0 commit comments