Closed rismoney closed 3 years ago
alright I figured it. For new readers of this- if you use modules with the provider you will need a provider.tf (or any tf file) :
terraform {
required_providers {
oneview = {
source = "HewlettPackard/oneview"
version = "6.2.0-13"
}
}
}
inside the module source directory.
Then you need to run terraform state replace-provider registry.terraform.io/-/oneview registry.terraform.io/hewlettpackard/oneview
Then you can run C:\terraform13\terraform.exe init -upgrade
I spoke too soon. This yields a
To work with module.server1.data.local_file.mappings its original
provider configuration at provider["registry.terraform.io/-/local"] is
required, but it has been removed. This occurs when a provider configuration
is removed while objects created by that provider still exist in the state.
Re-add the provider configuration to destroy
module.server1.data.local_file.mappings, after which you can remove the
provider configuration again.
Going to try passing the module into the child... I shouldn't have to specify the required provider in the child module, it should inherit.
wait that is a diff provider, local. standdown.
made it passed that with C:\terraform13\terraform.exe state replace-provider registry.terraform.io/-/local registry.terraform.io/hashicorp/local
Hi Rich , if your problem is resolved please close the issue. Something similar was raised earlier.
https://github.com/HewlettPackard/terraform-provider-oneview/issues/351
I am currently using terraform 12, 6.0 and want to go to terraform 13 6.2
So I previosuly only had this:
Now I added this (and left the above):
I then got the error message:
Then I ran the above command
terraform state replace-provider registry.terraform.io/-/oneview registry.terraform.io/hewlettpackard/oneview
Now I still get the error:
How do I properly configure/update state this?