-
Notifications
You must be signed in to change notification settings - Fork 35
Conversation
Signed-off-by: Andreas Peters <[email protected]>
Does this work for multi-machine blueprints? Or is it assuming a catalog request just spins up a single VM? |
get out machine name
U know, in vRA7 are no single-mashine blueprints anymore. And my change is working very well with components (aka multi-mashine blueprints). As example, it looks like that:
|
I tried this code and the output was different for both the machines. Actual output
Expected output
This condition should be handled by the code. |
Ah ok thats a good issue. I could not test it with windows. Is ist possible that u show me the resourceView output as json? |
@virajindasrao I mean the response of this curl:
|
Hi @cars thats great. Thanks for your resourceViewRequest! I think that helps me a lot to see how the output looks like on differen configuration ways. :-) I can fix it therefore u will see all names. |
Signed-off-by: Andreas Peters <[email protected]>
the change is untestet. I'm at home without the test system. so, give me time until tomorrow please. :-) |
iterate though the resource view map to show the name
Signed-off-by: Andreas Peters <[email protected]>
Signed-off-by: Andreas Peters <[email protected]>
Signed-off-by: Andreas Peters <[email protected]>
Signed-off-by: Andreas Peters <[email protected]>
Merge some changes
@andreaspeters, you must sign every commit in this pull request acknowledging our Developer Certificate of Origin before your changes are merged. This can be done by adding
|
Revert "Merge some changes"
@andreaspeters, you must sign every commit in this pull request acknowledging our Developer Certificate of Origin before your changes are merged. This can be done by adding
|
@andreaspeters, you must sign every commit in this pull request acknowledging our Developer Certificate of Origin before your changes are merged. This can be done by adding
|
@andreaspeters, you must sign every commit in this pull request acknowledging our Developer Certificate of Origin before your changes are merged. This can be done by adding
|
What is the expected output here? |
@virajindasrao The expected output is the name of the server. But I still missing a resourceView as json file from you to see whats the difference between a linux and a windows server. :-) I can not test windows servers here. Sorry! |
@andreaspeters Would it make sense to broaden the scope of this change to include returning ANY vRA custom property to be used by Terraform as an output? That feature could be pretty valuable... Also, it seems like most of the work for that could already be done if this portion for the hostname is already implemented? |
@Marcvd316 Thats a very good idea. I will have a look how to realize it so easy and flexible as possible. |
@virajindasrao So, we try it with a windows server and it's working too. Mean, the hostname is like expected. To see what's different to your one, I still need your ResourceView Request. What I can tell u is, the name "dev-" is a vmware internal default name they set, if the user didn't choose one. |
Signed-off-by: Nuno Ferro <[email protected]>
Fetch VM IP Address
@andreaspeters, you must sign every commit in this pull request acknowledging our Developer Certificate of Origin before your changes are merged. This can be done by adding
|
@andreaspeters go through this blueprint. I tried this blueprint and got wrong output |
Hi @virajindasrao thanks for the output, I will have a look. :-) |
Hi @virajindasrao, sorry for my late response. So, what u give me is not a blueprint, it's just a response output to the blueprint. Is it possible that you will export your blueprint therefore we can import it to check whats wrong. Only to be clear, at the moment we got in no case your failure. But this request stuck only because of your issue. So I really want find outs whats the problem. :-) |
@virajindasrao I am not sure what discrepancy you are seeing in the output. Could you please summarize. It is hard to tell with the entire history of this conversation, try as I may. Here is one thing to note though. In a multi-machine (or single-machine for that matter) blueprint, each machine gets a name that is generated based on a machine prefix. That machine prefix is likely set at the business group level, though I see that you have overridden it on the blueprint. Th value is 'dev-' in this case, and hence the machines come out with that name. The number part of the name is a unique value that the system generates to avoid conflicts. This same name is used as the VM name in vCenter. Hence, I don't see a problem with the 'dev-' names that show up here. So could you please explain what discrepancy you see in a multi-machine case? |
@Marcvd316 On the question of broadening the scope of this change, I would recommend doing that as a separate pull request. Custom properties can involve a lot of testing against settings in the blueprint and in other scopes in VRA. |
@virajindasrao I did look at the particular comment you point to. I am not sure why you are expecting that prefix for the names of Windows machines. The prefix, like I said in my previous comment, is picked based on the machine-prefix setting in vRA, which in this case seems to be 'dev-'. So Can you please elaborate what the expectation mismatch is here? Thx PS: Sorry for the delayed response, I had an emergency personal trip that got in the way of following up on this thread. |
Hi @raghavav |
Guys would it be possible to return all the properties of a machine as output so that they can be used later in the terraform process |
Returning all properties as 'computed' properties should not be a problem. Returning them as first class schema properties is a problem. vRA does not support arbitrary updates to a machine resource for most properties. It only allows a very prescriptive set of day-2 operations. For example, it does allow scaling up/down, and it allows reconfiguring cpu, memory and storage limits. |
The bigger issue that I see in this ticket is the question of what is a resource for the vra-terraform-plugin. When using a catalog item as it is being used in this plugin, the resulting resource should be a 'Deployment'. There should be one sub-object within that Deployment resource for each machine. Each of those machine sub-objects can have all of the properties such as name, ip-address, other computed properties such as custom properties etc. The schema and the resulting state should reflect this hierarchy. Can someone post the current .tf file and the corresponding output of 'terraform show'? I see that the conversations above are referencing different .tf files and responses. I would like to analyze this based on the latest example we are using, please. Thanks a lot. |
I apologise I am currently running the Master version of this from the vmware repo and terraform show returns nothing at all |
I grabbed the complete action.go and resource.go from Viraj's pull request, re-ran dep, recompiled, re-installed, re-ran Thanks. |
Signed-off-by: Andreas Peters [email protected]