alicloud_accountalicloud_action_trailalicloud_cas_certificatealicloud_cms_monitor_hostalicloud_cs_kubernetes_clusteralicloud_cs_kubernetes_cluster_nodealicloud_ecs_auto_provisioning_groupalicloud_ecs_autoscaling_groupalicloud_ecs_diskalicloud_ecs_disk_metric_read_iopsalicloud_ecs_disk_metric_read_iops_dailyalicloud_ecs_disk_metric_read_iops_hourlyalicloud_ecs_disk_metric_write_iopsalicloud_ecs_disk_metric_write_iops_dailyalicloud_ecs_disk_metric_write_iops_hourlyalicloud_ecs_imagealicloud_ecs_instancealicloud_ecs_instance_metric_cpu_utilization_dailyalicloud_ecs_instance_metric_cpu_utilization_hourlyalicloud_ecs_key_pairalicloud_ecs_launch_templatealicloud_ecs_network_interfacealicloud_ecs_regionalicloud_ecs_security_groupalicloud_ecs_snapshotalicloud_ecs_zonealicloud_kms_keyalicloud_kms_secretalicloud_oss_bucketalicloud_ram_access_keyalicloud_ram_credential_reportalicloud_ram_groupalicloud_ram_password_policyalicloud_ram_policyalicloud_ram_rolealicloud_ram_security_preferencealicloud_ram_useralicloud_rds_backupalicloud_rds_databasealicloud_rds_instancealicloud_rds_instance_metric_connectionsalicloud_rds_instance_metric_connections_dailyalicloud_rds_instance_metric_cpu_utilizationalicloud_rds_instance_metric_cpu_utilization_dailyalicloud_rds_instance_metric_cpu_utilization_hourlyalicloud_security_center_field_statisticsalicloud_security_center_versionalicloud_slb_load_balanceralicloud_vpcalicloud_vpc_dhcp_options_setalicloud_vpc_eipalicloud_vpc_flow_logalicloud_vpc_nat_gatewayalicloud_vpc_network_aclalicloud_vpc_route_entryalicloud_vpc_route_tablealicloud_vpc_ssl_vpn_client_certalicloud_vpc_ssl_vpn_serveralicloud_vpc_vpn_connectionalicloud_vpc_vpn_customer_gatewayalicloud_vpc_vpn_gatewayalicloud_vpc_vswitch
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, regionfrom 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_idfrom 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_instancefrom alicloud_ecs_launch_template, jsonb_array_elements( latest_version_details -> 'LaunchTemplateData' -> 'DataDisks' -> 'DataDisk' ) as disk_configwhere (disk_config ->> 'Encrypted') :: boolean and (disk_config ->> 'DeleteWithInstance') :: boolean;
Query examples
.inspect alicloud_ecs_launch_template
Alicloud ECS Launch Template
Name | Type | Description |
---|---|---|
_ctx | jsonb | Steampipe context in JSON form, e.g. connection_name. |
account_id | text | The Alicloud Account ID in which the resource is located. |
akas | jsonb | Array of globally unique identifier strings (also known as) for the resource. |
create_time | timestamp with time zone | The time when the launch template was created. |
created_by | text | Specifies the creator of the launch template. |
default_version_number | bigint | The default version number of the launch template. |
latest_version_details | jsonb | Describes the configuration of latest launch template version. |
latest_version_number | bigint | The latest version number of the launch template. |
launch_template_id | text | An unique identifier for the resource. |
modified_time | timestamp with time zone | The time when the launch template was modified. |
name | text | A friendly name for the resource. |
region | text | The Alicloud region in which the resource is located. |
resource_group_id | text | The ID of the resource group to which the launch template belongs. |
tags | jsonb | A map of tags for the resource. |
tags_src | jsonb | A list of tags attached with the resource. |
title | text | Title of the resource. |