Open Thorium opened 3 years ago
let deployment = arm {
location Location.UKSouth
add_resource myVm
output "vmIP" (myVm.PublicIpId |> Option.map(fun ip -> ip.ArmExpression))
}
Now, only thing more to add, what if there are a list of VMs...
I've got exactly the same issue, trying to work out how to configure different instances (staging/acc/prod) from the same set of builders
I didn't find documentation about this: What is the best practice to work with conditional values in Farmer custom builders?
For example, the VM IP ARM (PublicIpId) is an Option type:
The code fails if PublicIpId is None. When the deployments and resources are compex, I wouldn't want to create multiple copies of the same builders.
I'd like to do something like:
Or could I use composition and still take the advantage of the builder? Currently I've only find a solution to jump out of the builder and start to build manually the state, losing the convenience of builder with proper type-conversions in overloaded methods: