-
Notifications
You must be signed in to change notification settings - Fork 9.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invalid address to set: []string{"root_block_device", "0", "encrypted"} #5108
Comments
I ran into the same problem too when I tried to destroy the infrastructure.
|
Same problem, using version 0.6.12. Related to #4481 ?
|
Having the same issue. I don't have a roo_block_device specified anywhere. Just a ebs_block_device. |
Same problem here with the 0.6.15, it works with the 0.6.9 FYI: I created one resource with the 0.6.9, then I updated to the 0.6.15, then I added two resources more and I got this error but only in the new resources.
The three have the same definition.
|
Same, here. Now I can't do a terraform destroy and have to manually delete stuff - uhg Error refreshing state: 1 error(s) occurred:
Edit: I edited the terraform.tfstate file and removed the aws_launch_configuration.admin then I was able to do a 'terraform destroy' |
I know why this is happening, but I don't have a fix I'm comfortable with yet. Based on this: https://aws.amazon.com/blogs/aws/new-encrypted-ebs-boot-volumes/ it is clear that root devices can be encrypted. So, the API is returning "encrypted = false" on these devices. When However, when Thus: So, my initial workaround was simply to add that attribute, borrowing it from the "ebs_volume" schema. That works nicely to prevent the error (hint, hint), but also allows the In fact, based on various issues and PRs: #5360 #6428 , and the docs stating:
I think that the use of the I need to look back through the tricks of Schema to see if I can write that, or someone closer to the project may be able to do it more quickly. I'll see what I can do. |
Hmm, looks like In
|
Just ran into this issue myself. Is there a workaround? Adding an encryption variable still doesn't fix it. This config:
Still outputs:
I'm not quite getting the 'hint/hint'. |
Sorry, the hint was about the internal implementation. There is no workaround yet without patching TF source, because it's a state parsing problem in Terraform. I believe the bug is tickled by using "ebs_block_device" to manage your root device. Once that's set with "encrypted = false" in the state, you're going to get the error. It may be possible to change that to "root_block_device" and hack the state file to match, but I haven't tried it. Back the state up first, and dig in there at your own risk. I'm going to work on a proper PR right now, mimicking the behavior of However, thinking about this over the last day or so makes me wonder about the "encrypted" keyword, and whether it's really doing what it's supposed to. I'll run some practical tests as well. (as an aside, I'm not speaking for or affiliated with Hashicorp. Just volunteering here, as we've seen this bug as well.) |
That PR will prevent the problem seen here, and prompt the user to fix an incorrect There are some other safety checks I'd like to add, but implementation issues were getting in my way. |
Hey all – I'm trying to reproduce this problem but am having trouble, I'm trying to figure out if a patch is still needed. I tried creating a Launch Configuration with very simple parameters in v0.6.09 and then upgrading to v0.6.16 and had no issue. Here's my config:
I created it v0.6.09 and then upgraded to the latest release, and plan, apply, taint, destroy and create all worked as expected. If this is still a problem, can you help me reproduce it? |
I was able to reproduce it by running with 0.6.15, then it persisted with 0.6.16. Like you, I wasn't able to see it now with clean state in 0.6.16. I suspect that jumping from 0.6.9 to 0.6.16 never gets an incorrect "Encrypted" field in the state. I think that #6452 partially addressed this issue in 0.6.16. However, even on 0.6.16 I still see needless rebuilds initiated on the launch config. Here's my config (us-west-2):
So, on an all 0.6.16 run I get a creation correctly, but the subsequent plan (no changes) says:
Since the With 0.6.15, that config fails to instantiate at all:
Using the partial state from that
Even a destroy fails (0.6.16 again):
Using my patch in #6512 I can destroy the existing resources without an "address to set" error, as it can read back and ignore the Thanks for the attention to this issue. I'm happy to help test, identify, and even rework that PR if needed. |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Hi,
after I upgraded terraform from 0.6.9 to 0.6.11 I no longer can manage my infrastructure.
After downgrading back to 0.6.9 it works fine.
I get this error:
Here is my config:
The text was updated successfully, but these errors were encountered: