output "key_pair_names" { value = [ for k, v in aws_key_pair.key_pair : v.key_name ] # Should just be the keys, but that might change }