loud-lifeguard-46150
05/05/2020, 4:07 AMdef get_cloud_init(param1, param2, param3):
with open('cloud-init.sh') as f:
return f.read().format(param1=param1, param2=param2, param3=param3)
def swarm_scaleset(role, count=1, instance_type=None):
return az.compute.ScaleSet(
...
os_profile={
...
'custom_data': pulumi.Output.all(param1, param2, param3).apply(
lambda args: get_cloud_init(*args)
)
...
},
...
)
managers = swarm_scaleset('manager', 3, 'Standard_B1ms')
workers = swarm_scaleset('worker', 10, 'Standard_B1ms')
I'm testing it at the moment and it seems to work ok, I'll test it on a fresh install soon (which was the problem before)No matter how you like to participate in developer communities, Pulumi wants to meet you there. If you want to meet other Pulumi users to share use-cases and best practices, contribute code or documentation, see us at an event, or just tell a story about something cool you did with Pulumi, you are part of our community.
Powered by