-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
to use Lists instead of Sets
#426
Conversation
0b2ebe4
to
96ff9a8
Compare
azurerm_virtual_machine
to use Lists instead of Setsazurerm_virtual_machine
to use Lists instead of Sets
|
||
func TestAccAzureRMVirtualMachine_reorderedDisks(t *testing.T) { | ||
var beforeVm compute.VirtualMachine | ||
//var beforeVm, afterVm compute.VirtualMachine |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this comment needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
didn't realise I'd pushed this last comma sighs I'll remove it :)
resourceName := "azurerm_virtual_machine.test" | ||
ri := acctest.RandInt() | ||
config := testAccAzureRMVirtualMachine_reorderedDisksBefore(ri, testLocation()) | ||
//updatedConfig := testAccAzureRMVirtualMachine_reorderedDisksAfter(ri, testLocation()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same
@@ -1557,3 +1496,53 @@ func findStorageAccountResourceGroup(meta interface{}, storageAccountName string | |||
|
|||
return id.ResourceGroup, nil | |||
} | |||
|
|||
func resourceArmVirtualMachineStorageOsProfileHash(v interface{}) int { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a note here: the implicit schema.HashResource
has been working pretty well for me for most complex sets I've been doing. Unless there's specific rules that this structure needs to be abide by for hashing to remove some factors from the algorithm, you might be better off just using that. Can help get rid of some more code too 🙂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I was looking into that, unfortunately there's some fields missing from some of the Hash functions (hence why I had to change some from Set -> List -> Set) - and then just relocated them in the file :(
testCheckAzureRMVirtualMachineExists(resourceName, &beforeVm), | ||
), | ||
}, | ||
/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Concur on some of the commented out stuff here - could it just be removed as dead code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indeed, removed
), | ||
}, | ||
/* | ||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @tombuildsstuff! Left a few comments on the PR here pertaining to maybe simplification of the existing set hashing and commented out tests... otherwise LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with a minor thing about comments
I just tested the NIC ordering and the problem is still appearing. How/when can I see this fixed? |
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! |
Opening this to keep track of things, this seems fine in the initial testing of Linux - need to do some more extensive testing before proceeding with this
I've removed the failing test
TestAccAzureRMVirtualMachine_windowsLicenseType
because it's not possible to make this pass in our subscription (for licensing reasons) - however the test will pass in another subscriptionFixes #103
Fixes #99
Fixes #81
Fixes #72
Fixes #20