{"action":"created","issue":{"url":"https://api.github.com/repos/vmware/terraform-provider-vra7/issues/78","repository_url":"https://api.github.com/repos/vmware/terraform-provider-vra7","labels_url":"https://api.github.com/repos/vmware/terraform-provider-vra7/issues/78/labels{/name}","comments_url":"https://api.github.com/repos/vmware/terraform-provider-vra7/issues/78/comments","events_url":"https://api.github.com/repos/vmware/terraform-provider-vra7/issues/78/events","html_url":"https://github.com/vmware/terraform-provider-vra7/issues/78","id":358395939,"node_id":"MDU6SXNzdWUzNTgzOTU5Mzk=","number":78,"title":"Unable to set datacenter_location","user":{"login":"fostero","id":17526238,"node_id":"MDQ6VXNlcjE3NTI2MjM4","avatar_url":"https://avatars3.githubusercontent.com/u/17526238?v=4","gravatar_id":"","url":"https://api.github.com/users/fostero","html_url":"https://github.com/fostero","followers_url":"https://api.github.com/users/fostero/followers","following_url":"https://api.github.com/users/fostero/following{/other_user}","gists_url":"https://api.github.com/users/fostero/gists{/gist_id}","starred_url":"https://api.github.com/users/fostero/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fostero/subscriptions","organizations_url":"https://api.github.com/users/fostero/orgs","repos_url":"https://api.github.com/users/fostero/repos","events_url":"https://api.github.com/users/fostero/events{/privacy}","received_events_url":"https://api.github.com/users/fostero/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-09-09T17:34:46Z","updated_at":"2018-09-11T11:17:11Z","closed_at":null,"author_association":"NONE","body":"Terraform 0.11.8\r\n\r\nVery similar to https://github.com/vmware/terraform-provider-vra7/issues/51 (closed)\r\n\r\nI'm trying to set the datacenter_location property in the resource_configuration section.\r\n\r\nresource_configuration = {\r\n   Linux.cpu = 2\r\n   Linux.memory = 2048\r\n   Linux.datacenter_location = \"DC1\"\r\n}\r\n\r\nIf I try to define the property as a string, I get the following error:\r\n\r\nvra7_resource.this: Resource Machine Request Failed: vRealize API: [{Code:10101 Message:Invalid argument.SystemMessage:Expected EntityReferenceDatum, not java.lang.String for Field: datacenter_location}]\r\n\r\nWe have an existing Python script that we use to create VMs by calling the vra rest API.  The script passes the datacenter_location field as a dictionary, not a string.  The dictionary contains two key/value pairs:\r\n\r\nclassId :  \"Default\"\r\nid: \"DC1\"\r\n\r\nIs there a way to represent this data structure within the resource_configuration?  I've tried various combinarions:\r\n\r\n1)\r\n\r\nLinux.datacenter_location.classId = \"Default\"\r\nLinux.datacenter_location.id = \"DC1\"\r\n\r\n(Request is submitted but does not set the datacenter location)\r\n\r\n2) \r\n\r\nLinux.datacenter_location {\r\n  classId = \"Default\"\r\n  id = \"DC1\"\r\n}\r\n\r\n(Results in syntax error)\r\n\r\n3) \r\n\r\nLinux.datacenter_location {\r\n  classId : \"Default\",\r\n  id : \"DC1\"\r\n}\r\n\r\n(Results in syntax error)\r\n\r\nThanks"},"comment":{"url":"https://api.github.com/repos/vmware/terraform-provider-vra7/issues/comments/420238097","html_url":"https://github.com/vmware/terraform-provider-vra7/issues/78#issuecomment-420238097","issue_url":"https://api.github.com/repos/vmware/terraform-provider-vra7/issues/78","id":420238097,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMDIzODA5Nw==","user":{"login":"hobovirtual","id":20516722,"node_id":"MDQ6VXNlcjIwNTE2NzIy","avatar_url":"https://avatars2.githubusercontent.com/u/20516722?v=4","gravatar_id":"","url":"https://api.github.com/users/hobovirtual","html_url":"https://github.com/hobovirtual","followers_url":"https://api.github.com/users/hobovirtual/followers","following_url":"https://api.github.com/users/hobovirtual/following{/other_user}","gists_url":"https://api.github.com/users/hobovirtual/gists{/gist_id}","starred_url":"https://api.github.com/users/hobovirtual/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hobovirtual/subscriptions","organizations_url":"https://api.github.com/users/hobovirtual/orgs","repos_url":"https://api.github.com/users/hobovirtual/repos","events_url":"https://api.github.com/users/hobovirtual/events{/privacy}","received_events_url":"https://api.github.com/users/hobovirtual/received_events","type":"User","site_admin":false},"created_at":"2018-09-11T11:17:11Z","updated_at":"2018-09-11T11:17:11Z","author_association":"NONE","body":"Hi @fostero \r\n\r\nNever tested on 7.1, only from 7.2+\r\n\r\nBut looking into [7.1 documentation](https://docs.vmware.com/en/vRealize-Automation/7.1/com.vmware.vrealize.automation.doc/GUID-D6FA0C92-FB4F-44AF-AEE0-2D54E16286C5.html) looks like the Vrm.Datacenter.Location property is not listed. \r\n\r\nIf you set the property manually on the blueprint, does it work?\r\n\r\nOn a side note and as an FYI, 7.1 is EOGS this upcoming December."}}
{"actor":{"display_login":"hobovirtual"}}