-
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
azurerm_virtual_machine_data_disk_attachment shows incorrect changes during plan #1784
Comments
I have not thoroughly reviewed your code, but I think your problem is related to the "element ()" function Check these threads: |
Hi @jcmaasb - Not related to either of the issues you mentioned. |
hey @rohrerb Thanks for opening this issue - apologies for the delayed response here! There's a couple of known issues with
Would you be able to take a look and see if that works for you? Thanks! |
Hi @tombuildsstuff, Thank you for the suggestion. That fixed my issue... Looking forward to 0.12 :D |
@rohrerb glad to hear that's now working for you :) Since this has now been resolved I'm going to close this issue for the moment. |
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
Affected Resource(s)
azurerm_virtual_machine_data_disk_attachment
Terraform Configuration Files
Terraform files can be found here - https://gist.github.com/rohrerb/4b449b778a6d902014f580a34e7390df
File format as follows:
Debug Output
Expected Behavior
The first VM shouldn't have any changes when we increment the VM count.
Actual Behavior
The first [0] VM's
azurerm_virtual_machine_data_disk_attachment
resource is prompting for change.Steps to Reproduce
terraform init
terraform apply
instance_count
from 1 to 2 in main.tfterraform apply
You will see that the first VM disk attach is wanting to be modified.
The interesting part is that it will go away if you just apply the 2nd vm & disk creation.
terraform apply -target module.x11x.azurerm_managed_disk.data_disk[1] -target module.x11x.azurerm_virtual_machine.vm[1]
terraform plan
The
module.x11x.azurerm_virtual_machine_data_disk_attachment.data_disk_attach[0]
is no longer prompting. I did nail it down to themanaged_disk_id
which is causing the resource mod, but no clue why yet.Any ideas?
FYI - @tombuildsstuff
The text was updated successfully, but these errors were encountered: