-
Notifications
You must be signed in to change notification settings - Fork 684
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
Terraform refresh is not getting remote state ? #113
Comments
Hm, when I try it now (instance is not exists in BMC) I got even strange error:
removing given resource from state file and run it again is now only option. |
In tftstate after refresh you can see this:
so it simple accept terminated as ok state. Validation of state (RUNNING) missing ? |
I'll pick this up. |
@mikejihbe is working this, fix may not come in this week. |
I'm working on making repro steps into an acceptance test now. |
I've got a reproduction for this issue, but that also uncovered a similar problem with certain subnet edge cases. PR for that (#151) is up, working on the fixes for this now. |
ok, fixes are in #159. I'd love you to verify that it resolves your issue, I'll let you know when it's in the latest release. Or I can help you build from source if you're eager! |
My test procedure (let me know if it's not ok). Terminated instance state seems to be Compilation
Terraform test, kill one instance via OBMC UI
Let you know when I made full reprovision ;-) |
Well seems that it looping/wait for output from module on removed instance, than crashed (without change of state, means terraform still think that instance is running). 1. stable state
2. Remove one instance (mysql) via BMCS UIterraform refresh
terraform plan
terraform apply
TFState content
|
@josephholsten let me know if there is anything I can do to help you |
is this still a problem? if so can you attach your tf files? I've tried creating an instance using terraform |
But this is not correct. Terraform should maintain state, so if any
instance/resource die out of terraform run it should recreate it, not save
remote state (see how backends like aws or openstack works) Also when you
wait for ttl in BMCS (terminated resource disapear) than you get error in
terraform apply (expect terminated state but it’s not exists)
Vasek
so 16. 9. 2017 v 2:47 odesílatel Ramy Cohen Masri <[email protected]>
napsal:
is this still a problem? if so can you attach your tf files?
I've tried creating an instance using terraform
I terminate the instance using the UI
Run terraform refresh
state of instance resource in the tfstate is correctly set to TERMINATED
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#113 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AFTDuiTVrXEhZqIWmwfdva0ZZxxZazXpks5sixqkgaJpZM4Ngo0l>
.
--
-- May the fox be with you ...
/\
(~(
) ) /\_/\
(_=---_(@ @)
( \ /
/|/----\|\ V
" " " "
|
ok, i'm working on fix so that resources would be recreated on further applies if they are terminated. I can't reproduce the other issue: |
This was fixed in v2.0.1 |
Perfect, thanks a lot |
Description of the bug:
I'm creating full VCP stack and some test instances. If I remove VM instance via API/UI terraform doesn't catch this (other items like IPSec works).
terraform apply
this OCID is terminated instance.
The text was updated successfully, but these errors were encountered: