main.tf 447 B

12345678910111213141516171819202122
  1. # Admin keys
  2. resource "hcloud_ssh_key" "admin_keys" {
  3. count = length(var.admin_keys)
  4. name = var.admin_keys[count.index].name
  5. public_key = var.admin_keys[count.index].key
  6. labels = {
  7. role = "admin"
  8. }
  9. }
  10. # User keys
  11. resource "hcloud_ssh_key" "user_keys" {
  12. count = length(var.user_keys)
  13. name = var.user_keys[count.index].name
  14. public_key = var.user_keys[count.index].key
  15. labels = {
  16. role = "user"
  17. }
  18. }