alicloud_ecs_key_pairs

This data source provides the Ecs Key Pairs of the current Alibaba Cloud user.

Example Usage

Basic Usage

data "alicloud_ecs_key_pairs" "example" {
  ids        = ["key_pair_name"]
  name_regex = "key_pair_name"
}

output "first_ecs_key_pair_id" {
  value = data.alicloud_ecs_key_pairs.example.pairs.0.id
}

Argument Reference

The following arguments are supported:

Argument Reference

The following attributes are exported in addition to the arguments listed above: