Closed vancluever closed 7 years ago
Hey @pryorda, if you have the capability to do so, can you try building #187 from source and seeing if it fixes your issue? It does not look like state migration was firing and as such the ID being referenced was the old v0.3.x state ID, which is not a managed object reference.
Instructions here
Thanks!
Ill update shortly.
Looks like it worked. Build just does a plan.
CO007 ➜ consul-vsphere git:(DEVOPS-653) ✗ ./build.sh
Encrypted data bag detected, decrypting with provided secret.
Encrypted data bag detected, decrypting with provided secret.
ERROR: The object you are looking for could not be found
Response: Cannot load data bag item consul-QA for data bag terraform-secrets
Downloading modules...
Get: file:///home/dpryor/git/terraform/modules/consul/url_monitor
Get: file:///home/dpryor/git/terraform/modules/vsphere_instance_linux
Get: file:///home/dpryor/git/terraform/modules/config_chef_linux
Get: file:///home/dpryor/git/terraform/modules/vsphere_instance_linux
Get: file:///home/dpryor/git/terraform/modules/config_chef_linux
Initializing the backend...
Successfully configured the backend "consul"! Terraform will automatically
use this backend unless the backend configuration changes.
Initializing provider plugins...
- Checking for available provider plugins on https://releases.hashicorp.com...
- Downloading plugin for provider "template" (1.0.0)...
- Downloading plugin for provider "aws" (1.0.0)...
- Downloading plugin for provider "null" (1.0.0)...
- Downloading plugin for provider "consul" (1.0.0)...
- Downloading plugin for provider "chef" (0.1.0)...
The following providers do not have any version constraints in configuration,
so the latest version was installed.
To prevent automatic upgrades to new major versions that may contain breaking
changes, it is recommended to add version = "..." constraints to the
corresponding provider blocks in configuration, with the constraint strings
suggested below.
* provider.aws: version = "~> 1.0"
* provider.chef: version = "~> 0.1"
* provider.consul: version = "~> 1.0"
* provider.null: version = "~> 1.0"
* provider.template: version = "~> 1.0"
Terraform has been successfully initialized!
You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.
If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.
Command => terraform plan -input=true -var-file=envs/QA.tfvars -var-file=envs/secrets/QA.tfvars .
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.
data.template_file.monitor_json: Refreshing state...
data.null_data_source.hostname: Refreshing state...
data.null_data_source.role: Refreshing state...
consul_keys.url_monitor: Refreshing state... (ID: consul)
data.null_data_source.role: Refreshing state...
data.null_data_source.role: Refreshing state...
data.null_data_source.hostname: Refreshing state...
data.null_data_source.hostname: Refreshing state...
data.null_data_source.hostname: Refreshing state...
chef_role.consul-standalone: Refreshing state... (ID: consul-standalone)
data.null_data_source.role: Refreshing state...
vsphere_virtual_disk.data_disk.2: Refreshing state... (ID: qa-consul-server3.sac.data_disk.vmdk)
vsphere_virtual_disk.data_disk.1: Refreshing state... (ID: qa-consul-server2.sac.data_disk.vmdk)
vsphere_virtual_disk.data_disk.0: Refreshing state... (ID: qa-consul-server1.sac.data_disk.vmdk)
data.vsphere_datacenter.datacenter: Refreshing state...
data.vsphere_datacenter.datacenter: Refreshing state...
vsphere_folder.instance: Refreshing state... (ID: Datacenter/QA/QAEX)
data.aws_route53_zone.private-domain: Refreshing state...
data.aws_route53_zone.private-domain: Refreshing state...
aws_route53_record.instance-dns.2: Refreshing state... (ID: ..-consul-server3.sac_A)
aws_route53_record.instance-dns.1: Refreshing state... (ID: ...-consul-server2.sac_A)
aws_route53_record.instance-dns.0: Refreshing state... (ID: ...-consul-server1.sac_A)
vsphere_virtual_machine.instance.2: Refreshing state... (ID: QA/QAEX/qa-consul-server3.sac)
vsphere_virtual_machine.instance.0: Refreshing state... (ID: QA/QAEX/qa-consul-server1.sac)
vsphere_virtual_machine.instance.1: Refreshing state... (ID: QA/QAEX/qa-consul-server2.sac)
null_resource.cluster_chef_provisioning.0: Refreshing state... (ID: 4030699871865257443)
null_resource.cluster_chef_provisioning.1: Refreshing state... (ID: 2470691103505233667)
null_resource.cluster_chef_provisioning.2: Refreshing state... (ID: 4040479122863971535)
No changes. Infrastructure is up-to-date.
This means that Terraform did not detect any differences between your
configuration and real physical resources that exist. As a result, Terraform
doesn't need to do anything.
CO007 ➜ consul-vsphere git:(DEVOPS-653) ✗
Great! Will be merging the fix shortly and there will be a release shortly :+1:
Can you update thread this once its been released?
Hey @pryorda - sorry, was heads down on another issue - v0.4.1 should have been released a while ago now (probably about 10 minutes after that update was posted). You should be able to grab it now!
Yep, Thank you sir!
Decoupling this from #156 - from @pryorda
Having this issue as well. Going from v0.3 to 0.4 breaks stuffs
Module
Example .tfvars
v0.4 attempt
and the error