turbot/alicloud

steampipe plugin install alicloudsteampipe plugin install alicloud

Table: alicloud_ecs_launch_template

A launch template helps you quickly create an ECS instance. A template contains configurations that you can use to create instances for various scenarios with specific requirements.

A template can include any configurations except passwords. It can include key pairs, RAM roles, instance type, and network configurations.

You can create multiple versions of each template. Each version can contain different configurations. You can then create an instance using any version of the template.

Examples

Basic info

select
name,
launch_template_id,
default_version_number,
latest_version_number,
region
from
alicloud_ecs_launch_template;

Get the current template version's configuration

select
name,
latest_version_details -> 'LaunchTemplateData' ->> 'InstanceName' as instance_name,
latest_version_details -> 'LaunchTemplateData' ->> 'InstanceType' as instance_type,
latest_version_details -> 'LaunchTemplateData' ->> 'InternetChargeType' as instance_charge_type,
latest_version_details -> 'LaunchTemplateData' ->> 'ImageId' as image_id,
latest_version_details -> 'LaunchTemplateData' ->> 'VpcId' as vpc_id,
latest_version_details -> 'LaunchTemplateData' ->> 'VSwitchId' as v_switch_id,
latest_version_details -> 'LaunchTemplateData' ->> 'SecurityGroupId' as security_group_id
from
alicloud_ecs_launch_template;

List templates that use encrypted storage disk

select
name,
disk_config ->> 'Encrypted' as disk_encryption,
disk_config ->> 'DeleteWithInstance' as delete_with_instance
from
alicloud_ecs_launch_template,
jsonb_array_elements(latest_version_details -> 'LaunchTemplateData' -> 'DataDisks' -> 'DataDisk') as disk_config
where
(disk_config ->> 'Encrypted')::boolean
and (disk_config ->> 'DeleteWithInstance')::boolean;

.inspect alicloud_ecs_launch_template

Alicloud ECS Launch Template

NameTypeDescription
account_idtextThe Alicloud Account ID in which the resource is located.
akasjsonbArray of globally unique identifier strings (also known as) for the resource.
create_timetimestamp without time zoneThe time when the launch template was created.
created_bytextSpecifies the creator of the launch template.
default_version_numberbigintThe default version number of the launch template.
latest_version_detailsjsonbDescribes the configuration of latest launch template version.
latest_version_numberbigintThe latest version number of the launch template.
launch_template_idtextAn unique identifier for the resource.
modified_timetimestamp without time zoneThe time when the launch template was modified.
nametextA friendly name for the resource.
regiontextThe Alicloud region in which the resource is located.
resource_group_idtextThe ID of the resource group to which the launch template belongs.
tagsjsonbA map of tags for the resource.
tags_srcjsonbA list of tags attached with the resource.
titletextTitle of the resource.