question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Fluent Compute] Create resource in multiple step

See original GitHub issue

I am trying to create virtual machines using the fluent api but there are conditions that will affect the creation.

For example, in some cases i might want to enable boot diagnostics and some others i don’t.

How can i do this in stages for ex:

var vm = azure.VirtualMachines
    .Define(vm.Name)
    .WithRegion(vm.ArmResource.Inner.Location)
    .WithExistingResourceGroup(tmpRg)
    .WithExistingPrimaryNetworkInterface(primaryNic)
    .WithSpecializedOSDisk(osDisk, (OperatingSystemTypes)osType);

if(bootdiag)
    vm = vm.WithBootDiagnostics();

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
jsquirecommented, Mar 1, 2021

Thank you for your feedback. Tagging and routing to the team member best able to assist.

0reactions
toutougabicommented, Mar 3, 2021

I answered my answer, i was able to use the iwithcreate and the managed version in multiple steps with success, i think what confused me is that the changes are not stored in the main variable but in private properties.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Resources Bulk Edit - FluentPro
Step 2 - Select resources​​ Select Resources that need to be edited and click Next: Please note: that it is possible to select...
Read more >
How to Create a WordPress Multi-step Form to connect ...
Create a professional and engaging WordPress multi-step form using WP Fluent Forms. Know the importance of using a multi-step form on your website....
Read more >
How to Setup and Create a Fluid Domain for Fluent - YouTube
Thanks to DN and GrabCAD for the helmet! Special thanks to HT for suggesting this video!) EXTERNAL Flow (via SolidWorks) 00:30 - Create...
Read more >
Create a multi-service resource for Azure AI services
After your resource is successfully deployed, select Next Steps > Go to resource. Get resource keys screen. From the quickstart pane that opens, ......
Read more >
Run multiple simulations automatically - FLUENT
Couple of ways you can get this done: Parametric setup with workbench. You will have to set up and solve your primary case...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found