Answer the question
In order to leave comments, you need to log in
How to fix the config to remove the error A managed resource "openstack_compute_instance_v2" "instance" has not been declared in the root module?
Versions:
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}"
}
Answer the question
In order to leave comments, you need to log in
replace
openstack_compute_instance_v2.instance.network.0.fixed_ip_v4
with
openstack_compute_instance_v2.test.network.0.fixed_ip_v4
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question