{"action":"created","issue":{"url":"https://api.github.com/repos/terraform-providers/terraform-provider-azurerm/issues/1043","repository_url":"https://api.github.com/repos/terraform-providers/terraform-provider-azurerm","labels_url":"https://api.github.com/repos/terraform-providers/terraform-provider-azurerm/issues/1043/labels{/name}","comments_url":"https://api.github.com/repos/terraform-providers/terraform-provider-azurerm/issues/1043/comments","events_url":"https://api.github.com/repos/terraform-providers/terraform-provider-azurerm/issues/1043/events","html_url":"https://github.com/terraform-providers/terraform-provider-azurerm/issues/1043","id":309838160,"node_id":"MDU6SXNzdWUzMDk4MzgxNjA=","number":1043,"title":"\"diffs didn't match during apply\" when updating Scale Set","user":{"login":"bpoland","id":24273909,"node_id":"MDQ6VXNlcjI0MjczOTA5","avatar_url":"https://avatars0.githubusercontent.com/u/24273909?v=4","gravatar_id":"","url":"https://api.github.com/users/bpoland","html_url":"https://github.com/bpoland","followers_url":"https://api.github.com/users/bpoland/followers","following_url":"https://api.github.com/users/bpoland/following{/other_user}","gists_url":"https://api.github.com/users/bpoland/gists{/gist_id}","starred_url":"https://api.github.com/users/bpoland/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bpoland/subscriptions","organizations_url":"https://api.github.com/users/bpoland/orgs","repos_url":"https://api.github.com/users/bpoland/repos","events_url":"https://api.github.com/users/bpoland/events{/privacy}","received_events_url":"https://api.github.com/users/bpoland/received_events","type":"User","site_admin":false},"labels":[{"id":620326271,"node_id":"MDU6TGFiZWw2MjAzMjYyNzE=","url":"https://api.github.com/repos/terraform-providers/terraform-provider-azurerm/labels/bug","name":"bug","color":"ff8c1a","default":true},{"id":717151560,"node_id":"MDU6TGFiZWw3MTcxNTE1NjA=","url":"https://api.github.com/repos/terraform-providers/terraform-provider-azurerm/labels/service/vmss","name":"service/vmss","color":"00e6b8","default":false}],"state":"open","locked":false,"assignee":{"login":"tombuildsstuff","id":666005,"node_id":"MDQ6VXNlcjY2NjAwNQ==","avatar_url":"https://avatars1.githubusercontent.com/u/666005?v=4","gravatar_id":"","url":"https://api.github.com/users/tombuildsstuff","html_url":"https://github.com/tombuildsstuff","followers_url":"https://api.github.com/users/tombuildsstuff/followers","following_url":"https://api.github.com/users/tombuildsstuff/following{/other_user}","gists_url":"https://api.github.com/users/tombuildsstuff/gists{/gist_id}","starred_url":"https://api.github.com/users/tombuildsstuff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tombuildsstuff/subscriptions","organizations_url":"https://api.github.com/users/tombuildsstuff/orgs","repos_url":"https://api.github.com/users/tombuildsstuff/repos","events_url":"https://api.github.com/users/tombuildsstuff/events{/privacy}","received_events_url":"https://api.github.com/users/tombuildsstuff/received_events","type":"User","site_admin":false},"assignees":[{"login":"tombuildsstuff","id":666005,"node_id":"MDQ6VXNlcjY2NjAwNQ==","avatar_url":"https://avatars1.githubusercontent.com/u/666005?v=4","gravatar_id":"","url":"https://api.github.com/users/tombuildsstuff","html_url":"https://github.com/tombuildsstuff","followers_url":"https://api.github.com/users/tombuildsstuff/followers","following_url":"https://api.github.com/users/tombuildsstuff/following{/other_user}","gists_url":"https://api.github.com/users/tombuildsstuff/gists{/gist_id}","starred_url":"https://api.github.com/users/tombuildsstuff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tombuildsstuff/subscriptions","organizations_url":"https://api.github.com/users/tombuildsstuff/orgs","repos_url":"https://api.github.com/users/tombuildsstuff/repos","events_url":"https://api.github.com/users/tombuildsstuff/events{/privacy}","received_events_url":"https://api.github.com/users/tombuildsstuff/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/terraform-providers/terraform-provider-azurerm/milestones/18","html_url":"https://github.com/terraform-providers/terraform-provider-azurerm/milestone/18","labels_url":"https://api.github.com/repos/terraform-providers/terraform-provider-azurerm/milestones/18/labels","id":3425988,"node_id":"MDk6TWlsZXN0b25lMzQyNTk4OA==","number":18,"title":"1.8.0","description":"","creator":{"login":"katbyte","id":1638467,"node_id":"MDQ6VXNlcjE2Mzg0Njc=","avatar_url":"https://avatars2.githubusercontent.com/u/1638467?v=4","gravatar_id":"","url":"https://api.github.com/users/katbyte","html_url":"https://github.com/katbyte","followers_url":"https://api.github.com/users/katbyte/followers","following_url":"https://api.github.com/users/katbyte/following{/other_user}","gists_url":"https://api.github.com/users/katbyte/gists{/gist_id}","starred_url":"https://api.github.com/users/katbyte/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/katbyte/subscriptions","organizations_url":"https://api.github.com/users/katbyte/orgs","repos_url":"https://api.github.com/users/katbyte/repos","events_url":"https://api.github.com/users/katbyte/events{/privacy}","received_events_url":"https://api.github.com/users/katbyte/received_events","type":"User","site_admin":false},"open_issues":11,"closed_issues":4,"state":"open","created_at":"2018-06-14T18:12:42Z","updated_at":"2018-06-19T13:51:42Z","due_on":null,"closed_at":null},"comments":4,"created_at":"2018-03-29T17:23:57Z","updated_at":"2018-06-19T13:52:04Z","closed_at":null,"author_association":"NONE","body":"### Terraform Version\r\nterraform v0.11.5\r\nazure provider v1.3\r\n\r\n### Affected Resource(s)\r\nazurerm_virtual_machine_scale_set\r\n\r\n### Terraform Configuration Files\r\nNot including the whole config for security, I can add more if it would be helpful.  Basically just trying to update an existing scale set with a new source vhd file.\r\n```hcl\r\nresource \"azurerm_storage_blob\" \"test_source\" {\r\n    name = \"az-test-source-version-2.vhd\"\r\n    resource_group_name = \"resource-group-sanitized\"\r\n    storage_account_name = \"account-sanitized\"\r\n    storage_container_name = \"container-sanitized\"\r\n    source_uri = \"${var.azure_test_sourceimage_sas_url}\"\r\n}\r\n\r\nresource \"azurerm_virtual_machine_scale_set\" \"test_vmss\" {\r\n    name = \"az-test\"\r\n    location = \"${var.azure_location}\"\r\n    overprovision = false\r\n    resource_group_name = \"${var.azure_test_resource_group}\"\r\n    upgrade_policy_mode = \"Manual\"\r\n\r\n    sku {\r\n        name = \"${var.azure_test_vm_size}\"\r\n        tier = \"Standard\"\r\n        capacity = \"${var.azure_test_vmss_capacity}\"\r\n    }\r\n\r\n    os_profile {\r\n        computer_name_prefix = \"az-test-\"\r\n        admin_username = \"username\"\r\n        admin_password = \"password\"\r\n    }\r\n\r\n    os_profile_linux_config {\r\n        disable_password_authentication = false\r\n    }\r\n\r\n    network_profile {\r\n        name = \"az-test-nic\"\r\n        network_security_group_id = \"${var.azure_test_vmss_nsg_id}\"\r\n        primary = true\r\n\r\n        ip_configuration {\r\n            name = \"az-test-ipcf\"\r\n            subnet_id = \"${var.azure_test_subnet_id}\"\r\n        }\r\n    }\r\n\r\n    storage_profile_os_disk {\r\n        name = \"az-test-osp\"\r\n        caching = \"ReadWrite\"\r\n        create_option = \"FromImage\"\r\n        os_type = \"Linux\"\r\n        image = \"${azurerm_storage_blob.test_source.url}\"\r\n    }\r\n}\r\n```\r\n\r\n### Debug Output\r\nhttps://gist.github.com/bpoland/961eb57a108b9a6b271d202df8d85911\r\n\r\n### Panic Output\r\nn/a\r\n\r\n### Expected Behavior\r\nTerraform should have updated the scale set with the new image\r\n\r\n### Actual Behavior\r\nGot the \"diffs didn't match during apply\" error shown in the gist\r\n\r\n### Steps to Reproduce\r\n1. `terraform apply` to create a VMSS\r\n2. modify the source VHD\r\n3. `terraform apply` again to update the VMSS with the new source VHD\r\n4. get the above error\r\n\r\n### Important Factoids\r\n\r\n\r\n### References\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/terraform-providers/terraform-provider-azurerm/issues/comments/398406430","html_url":"https://github.com/terraform-providers/terraform-provider-azurerm/issues/1043#issuecomment-398406430","issue_url":"https://api.github.com/repos/terraform-providers/terraform-provider-azurerm/issues/1043","id":398406430,"node_id":"MDEyOklzc3VlQ29tbWVudDM5ODQwNjQzMA==","user":{"login":"tombuildsstuff","id":666005,"node_id":"MDQ6VXNlcjY2NjAwNQ==","avatar_url":"https://avatars1.githubusercontent.com/u/666005?v=4","gravatar_id":"","url":"https://api.github.com/users/tombuildsstuff","html_url":"https://github.com/tombuildsstuff","followers_url":"https://api.github.com/users/tombuildsstuff/followers","following_url":"https://api.github.com/users/tombuildsstuff/following{/other_user}","gists_url":"https://api.github.com/users/tombuildsstuff/gists{/gist_id}","starred_url":"https://api.github.com/users/tombuildsstuff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tombuildsstuff/subscriptions","organizations_url":"https://api.github.com/users/tombuildsstuff/orgs","repos_url":"https://api.github.com/users/tombuildsstuff/repos","events_url":"https://api.github.com/users/tombuildsstuff/events{/privacy}","received_events_url":"https://api.github.com/users/tombuildsstuff/received_events","type":"User","site_admin":false},"created_at":"2018-06-19T13:52:04Z","updated_at":"2018-06-19T13:52:04Z","author_association":"CONTRIBUTOR","body":"👋 \r\n\r\nRelevant context from the debug link:\r\n\r\n```\r\n    Mismatch reason: attribute mismatch: storage_profile_os_disk.2192347964.vhd_containers.#\r\n    Diff One (usually from plan): *terraform.InstanceDiff{mu:sync.Mutex{state:0, sema:0x0}, Attributes:map[string]*terraform.ResourceAttrDiff{\"storage_profile_os_disk.2192347964.os_type\":*terraform.ResourceAttrDiff{Old:\"Linux\", New:\"\", NewComputed:false, NewRemoved:true, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, \"storage_profile_os_disk.~2192347964.caching\":*terraform.ResourceAttrDiff{Old:\"\", New:\"ReadWrite\", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, \"storage_profile_os_disk.2192347964.create_option\":*terraform.ResourceAttrDiff{Old:\"FromImage\", New:\"\", NewComputed:false, NewRemoved:true, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, \"storage_profile_os_disk.2192347964.vhd_containers.#\":*terraform.ResourceAttrDiff{Old:\"0\", New:\"0\", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, \"storage_profile_os_disk.~2192347964.image\":*terraform.ResourceAttrDiff{Old:\"\", New:\"${azurerm_storage_blob.test_source.url}\", NewComputed:true, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, \"storage_profile_os_disk.2192347964.image\":*terraform.ResourceAttrDiff{Old:\"https://account-sanitized.blob.core.windows.net/vhds/az-test-source-version-1.vhd\", New:\"\", NewComputed:false, NewRemoved:true, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, \"storage_profile_os_disk.~2192347964.create_option\":*terraform.ResourceAttrDiff{Old:\"\", New:\"FromImage\", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, \"storage_profile_os_disk.~2192347964.managed_disk_type\":*terraform.ResourceAttrDiff{Old:\"\", New:\"\", NewComputed:true, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, \"storage_profile_os_disk.~2192347964.os_type\":*terraform.ResourceAttrDiff{Old:\"\", New:\"Linux\", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, \"storage_profile_os_disk.~2192347964.name\":*terraform.ResourceAttrDiff{Old:\"\", New:\"az-test-osp\", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, \"storage_profile_os_disk.2192347964.name\":*terraform.ResourceAttrDiff{Old:\"az-test-osp\", New:\"\", NewComputed:false, NewRemoved:true, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, \"storage_profile_os_disk.~2192347964.vhd_containers.#\":*terraform.ResourceAttrDiff{Old:\"0\", New:\"0\", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}}, Destroy:false, DestroyDeposed:false, DestroyTainted:false, Meta:map[string]interface {}(nil)}\r\n    Diff Two (usually from apply): *terraform.InstanceDiff{mu:sync.Mutex{state:0, sema:0x0}, Attributes:map[string]*terraform.ResourceAttrDiff(nil), Destroy:false, DestroyDeposed:false, DestroyTainted:false, Meta:map[string]interface {}(nil)}\r\n```\r\n\r\nSo the error here is that the `vhd_containers` field isn't being set in all circumstances (only when it's not nil) - as such I've opened PR #1411 which includes a fix for this.\r\n\r\nThanks!"}}
{"actor":{"display_login":"tombuildsstuff"}}