Skip to content
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

When nix_image_custom is updated, instances are not re-created correctly #21

Open
mrkkrp opened this issue Jan 24, 2020 · 2 comments
Open

Comments

@mrkkrp
Copy link

mrkkrp commented Jan 24, 2020

I use nixos_image_custom to create a NixOS image from a given NixOS configuration and put it into a bucket. Then I use this image in google_compute_instance_template (via disk.source_image). The problem is that when I change the configuration I get the following error:

* google_compute_instance_template.buildkite_nixos: 1 error occurred:
* google_compute_instance_template.buildkite_nixos: reading body EOF

So I have to go delete the instance group first, then delete the template, and only after that I can run terraform plan and terraform apply. What should be happening instead is that terraform should be able to figure out that it should drop the old object in the bucket (containing the old image) and create a new object with the new image, then it should re-create template and instances accordingly.

@zimbatm
Copy link
Member

zimbatm commented Jan 24, 2020

I have seen that as well. I don't know exactly where the issue is coming from but it's annoying.

@flokli
Copy link

flokli commented Feb 18, 2020

This can be worked around by first doing a terraform apply -target=module.name_of_the_module, then a terraform apply.

Maybe something seems to be wrong with the order.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants