New in version 3000.
The Tencent Cloud Cloud Module is used to control access to the Tencent Cloud instance. https://intl.cloud.tencent.com/
/etc/salt/cloud.providers
or /etc/salt/cloud.providers.d/*.conf
:
my-tencentcloud-config:
driver: tencentcloud
# Tencent Cloud Secret Id
id: AKIDA64pOio9BMemkApzevX0HS169S4b750A
# Tencent Cloud Secret Key
key: 8r2xmPn0C5FDvRAlmcJimiTZKVRsk260
# Tencent Cloud Region
location: ap-guangzhou
tencentcloud-sdk-python
Return Tencent Cloud available image
CLI Example:
salt-cloud --list-images my-tencentcloud-config
salt-cloud -f avail_images my-tencentcloud-config
Return Tencent Cloud available region
CLI Example:
salt-cloud --list-locations my-tencentcloud-config
salt-cloud -f avail_locations my-tencentcloud-config
Return Tencent Cloud available instance type
CLI Example:
salt-cloud --list-sizes my-tencentcloud-config
salt-cloud -f avail_sizes my-tencentcloud-config
Create a single Tencent Cloud instance from a data dict.
Tencent Cloud profiles require a provider
, availability_zone
, image
and size
.
Set up profile at /etc/salt/cloud.profiles
or /etc/salt/cloud.profiles.d/*.conf
:
tencentcloud-guangzhou-s1sm1:
provider: my-tencentcloud-config
availability_zone: ap-guangzhou-3
image: img-31tjrtph
size: S1.SMALL1
allocate_public_ip: True
internet_max_bandwidth_out: 1
password: '153e41ec96140152'
securitygroups:
- sg-5e90804b
CLI Examples:
salt-cloud -p tencentcloud-guangzhou-s1 myinstance
Destroy a Tencent Cloud instance
CLI Example:
salt-cloud -a destroy myinstance
salt-cloud -d myinstance
Return the first configured instance.
Warn if dependencies aren't met.
Return a new provider client
Return all Tencent Cloud availability zones in current region
CLI Example:
salt-cloud -f list_availability_zones my-tencentcloud-config
Return all Tencent Cloud images in current region
CLI Example:
salt-cloud -f list_custom_images my-tencentcloud-config
Return a list of instances that are on the provider
CLI Examples:
salt-cloud -Q
Return a list of instances that are on the provider, with full details
CLI Examples:
salt-cloud -F
Return a list of instances that are on the provider, Only names, and their state, is returned.
CLI Examples:
salt-cloud -f list_nodes_min my-tencentcloud-config
Return a list of instances that are on the provider, with select fields
CLI Examples:
salt-cloud -S
Return all Tencent Cloud security groups in current region
CLI Example:
salt-cloud -f list_securitygroups my-tencentcloud-config
Reboot a Tencent Cloud instance
CLI Examples:
salt-cloud -a reboot myinstance
Return the script deployment object
Show the disk details of Tencent Cloud instance
CLI Examples:
salt-cloud -a show_disk myinstance
Show the details of Tencent Cloud image
CLI Examples:
salt-cloud -f show_image tencentcloud image=img-31tjrtph
Show the details of Tencent Cloud instance
CLI Examples:
salt-cloud -a show_instance myinstance
Start a Tencent Cloud instance Notice: the instance state must be stopped
CLI Examples:
salt-cloud -a start myinstance
Stop a Tencent Cloud running instance Note: use force=True to make force stop
CLI Examples:
salt-cloud -a stop myinstance
salt-cloud -a stop myinstance force=True