How to fix config to remove the error A managed resource "openstack_compute_instance_v2" "instance" has not been declared in the root module?

Version:
terraform version
Terraform v0.12.24
+ provider.openstack v1.26.0

Config:
resource "openstack_compute_keypair_v2" "my-cloud-key" {
 name = "apatsev-key"
 public_key = file("/home/user/.ssh/id_rsa.pub")
}

resource "openstack_compute_instance_v2" "test" {
 count = 3
 name = "zookeper-${count.index}"
 image_name = "CentOS_7.6_CloudImage_201901"
 flavor_name = "c2.m8.d40"
 key_pair = openstack_compute_keypair_v2.my-cloud-key.name
 security_groups = ["any-any"]

 network {
 name = var.network
}

}

output "ip" {
 value = "${openstack_compute_instance_v2.instance.network.0.fixed_ip_v4}"
}
April 19th 20 at 12:39
1 answer
April 19th 20 at 12:41
Solution
replace
openstack_compute_instance_v2.instance.network.0.fixed_ip_v4
on
openstack_compute_instance_v2.test.network.0.fixed_ip_v4
Thank you - Hayley.Kuhn56 commented on April 19th 20 at 12:44

Find more questions by tags DevOps