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

Allow specifying values for "EnhancedService" #134

Open Jalle19 opened 1 month ago

Jalle19 commented 1 month ago

Description

Currently, the EnhancedService (https://www.tencentcloud.com/document/api/213/15753#enhancedservice) block is omitted completely, leading to all three services being installed (security, monitoring, automation). The documentation says that AutomationService defaults to false (https://www.tencentcloud.com/document/api/213/15753#runautomationserviceenabled), but this doesn't seem to be the case in practice, judging by the contents of cvm_init.sh:

# cat cvm_init.sh
cd  /qcloud_init/tat_agent_linux_install_1.0.5
./install.sh usevpc
cd  /qcloud_init/stargate_linux_install_20210222
./install.sh usevpc
cd  /qcloud_init/basic_linux_install_1.2.30
./install.sh usevpc public
cd  /qcloud_init/ydeyes_linux_install_5.1.0.118
./install.sh usevpc
ls -l /qcloud_init/ >> /tmp/cvm_init.log
rm -rf /qcloud_init

Use Case(s)

We want to omit automatic installation of ydeyes. This can be done using a checkbox when launching instances manually from the console.

Potential configuration

Optional booleans for each of the services

Jalle19 commented 1 month ago

Whether to enable the TAT service. If this parameter is not specified, the TAT service is enabled for public images and disabled for other images by default.

Okay so this is why tat_agent got installed even though documentation for RunAutomationServiceEnabled says this:

Whether to enable the TAT service. Valid values: TRUE: yes; FALSE: no

Default: FALSE.