ksyun_instance

最近更新时间:2019-12-23 17:19:13

查看PDF

This data source provides a list of instance resources based on the availability zone and instance ID.

Example Usage

# Get instances
data "ksyun_instances" "default" {
  output_file = "output_result"
  ids = []
  project_id = []
  network_interface {
  network_interface_id = []
  subnet_id = []
  group_id = []
  }
  instance_state {
  name =  []
  }
  availability_zone {
  name =  []
  }
}

Argument Reference

The following arguments are supported:

  • ids - (Optional) A list of instance IDs.
  • name_regex - (Optional) A regex string to filter results by instance name.
  • output_file - (Optional) The name of the file to store data source results output by executing terraform plan.

Attributes Reference

In addition to all arguments above, the following attributes are exported:

  • instances - Instances documented below.

This attribute (instances) supports the following:

  • instance_id - The ID of the instance.
  • instance_state - The state of the instance.
  • subnet_id - The ID of the subnet linked to the instance.
  • image_id - The ID of the image to be uses by the instance.
  • instance_type - The type of the instance.
  • security_group_id - The ID of the associated security group.
  • instance_name - The name of the instance.
  • project_id - The ID of the project to which the instance is assigned.
  • user_data - The user data to be specified into this instance.
  • creation_date - Time of creation.
  • charge_type - Instance charge type.
  • availability_zone_name - The name of the availability zone where the instance is located.
  • private_ip_address - Instance private IP address.
  • disk_size - The size of the system disk.
  • disk_type - The type of the system disk.

文档内容是否对您有帮助?

根本没帮助
文档较差
文档一般
文档不错
文档很好

在文档使用中是否遇到以下问题

内容不全,不深入
内容更新不及时
描述不清晰,比较混乱
系统或功能太复杂,缺乏足够的引导
内容冗长

更多建议

0/200

评价建议不能为空

提交成功!

非常感谢您的反馈,我们会继续努力做到更好!

问题反馈