Skip to content
Snippets Groups Projects
Commit 758b42df authored by Benguria Elguezabal, Gorka's avatar Benguria Elguezabal, Gorka
Browse files

first try to ramdomize keypair user name

parent fc8ed33a
No related branches found
No related tags found
1 merge request!1Monitoring
...@@ -89,16 +89,18 @@ resource "openstack_networking_router_interface_v2" "net1_router_interface" { ...@@ -89,16 +89,18 @@ resource "openstack_networking_router_interface_v2" "net1_router_interface" {
subnet_id = openstack_networking_subnet_v2.net1_subnet.id subnet_id = openstack_networking_subnet_v2.net1_subnet.id
} }
# generate random string
resource "random_string" "key_pair_user_name" {
length = 16
special = false
}
# Create ssh keys # Create ssh keys
resource "openstack_compute_keypair_v2" "user1" { resource "openstack_compute_keypair_v2" "user1" {
name = "user1" name = "$random_string.key_pair_user_name.result"
# public_key = "user1" # public_key = "user1"
} }
# CREATING SECURITY_GROUP # CREATING SECURITY_GROUP
resource "openstack_compute_secgroup_v2" "icmp" { resource "openstack_compute_secgroup_v2" "icmp" {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment