Skip to content

Commit e24f4bc

Browse files
committed
Change resource name to this
1 parent b35e5b0 commit e24f4bc

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

main.tf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,20 @@ locals {
33
private_key_filename = "${format("%s.%s", var.name, "key")}"
44
}
55

6-
resource "openstack_compute_keypair_v2" "generated_keypair" {
6+
resource "openstack_compute_keypair_v2" "this" {
77
count = "${var.generate_ssh_key}"
88
name = "${var.name}"
99
}
1010

11-
resource "openstack_compute_keypair_v2" "provided_public_key" {
11+
resource "openstack_compute_keypair_v2" "this_provided" {
1212
count = "${1 - var.generate_ssh_key}"
1313
name = "${var.name}"
1414
public_key = "${file("${var.public_key_file}")}"
1515
}
1616

1717
resource "local_file" "private_key_pem" {
1818
count = "${1 - var.generate_ssh_key}"
19-
depends_on = ["openstack_compute_keypair_v2.provided_public_key"]
20-
content = "${openstack_compute_keypair_v2.provided_public_key.private_key}"
19+
depends_on = ["openstack_compute_keypair_v2.this_provided"]
20+
content = "${openstack_compute_keypair_v2.this_provided.private_key}"
2121
filename = "${local.private_key_filename}"
2222
}

outputs.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
output "private_key_file" {
22
description = "Private Key"
3-
value = "${openstack_compute_keypair_v2.generated_keypair.*.private_key}"
3+
value = "${openstack_compute_keypair_v2.this.*.private_key}"
44
}
55

66
output "public_key_file" {
77
description = "Public Key"
8-
value = "${openstack_compute_keypair_v2.provided_public_key.*.public_key}"
8+
value = "${openstack_compute_keypair_v2.this_provided.*.public_key}"
99
}

0 commit comments

Comments
 (0)