-
Notifications
You must be signed in to change notification settings - Fork 4.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
[v0.10.0] azurerm_image permanent recreation bug #224
Comments
Currently I'm using
Funny enough, the changes to |
hey @DonEstefan I am trying to recreate the scenario above and not having much luck. I pasted my full config file below the output I am seeing - can you paste a small repro config for me to investigate further?
My main.tf file
|
Hi @echuvyrov,
so every time i run "terraform plan" I get
|
I am having the same issue. VMS built referncing this image are also destroyed and recreated every run when it detects the blob_uri as "changed".
Running plan after a sucesfull run with no changes produces the following"
|
Hey @jake-delorme @DonEstefan I think I finally figured out what's going here. My sample HCL included the "caching" parameter in the "os_disk" section of the "azurerm_image" whereas yours didn't. When I removed that parameter I got the same behavior (image recreation on every run) that you reported. I submitted a PR (above) to fix that. In the meantime, you can work around the issue by specifying that param in your script (assuming my findings are correct of course :)). Let me know how it goes! |
[MS] Added default caching value as expected by API - fixing #224
Hey @echuvyrov, |
Hey @DonEstefan Glad to hear that's working for you now. I've merged @echuvyrov's PR #259 which includes a fix for this - and should go out in the next release; as such I'm going to close this issue, but please feel free to re-open this if there's still an issue here :) Thanks! |
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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks! |
Terraform Version
Terraform v0.10.0
terraform-provider-azurerm_v0.1.4_x4
Affected Resource(s)
azurerm_image
Terraform Configuration Files
Expected Behavior
image is created on first "terrafrom apply"
image will be deleted and recreated when "blob_uri" changes and "terraform apply" is run again
image will not be deleted when blob_uri is unchanged and "terraform apply" is run again
Actual Behavior
image is deleted and recreated in every "terraform apply" run - even if blob_uri is unchanged
Steps to Reproduce
terraform apply
(image will be created)terraform plan
(shows unnecessary recreation)The text was updated successfully, but these errors were encountered: