diff --git a/iac/cloud/openstack/lib/openstack-keypair/main.tf b/iac/cloud/openstack/lib/openstack-keypair/main.tf index 37808dc..b24027f 100644 --- a/iac/cloud/openstack/lib/openstack-keypair/main.tf +++ b/iac/cloud/openstack/lib/openstack-keypair/main.tf @@ -1,5 +1,5 @@ resource "openstack_compute_keypair_v2" "ssh_keypair" { - name = format("%skey", var.naming_prefix) + name = replace(format("%skey", var.naming_prefix), ".", "-") } resource "local_file" "private_key" { @@ -12,4 +12,4 @@ resource "local_file" "public_key" { content = openstack_compute_keypair_v2.ssh_keypair.public_key filename = "${path.root}/id_rsa.pub" file_permission = "0644" -} \ No newline at end of file +}