This message was deleted.
# python
s
This message was deleted.
b
Hi Slobodan! Since Pulumi directly interfaces with the Azure API's, often the Azure documentation itself is of great help, also with regards to this resource: If we go to https://learn.microsoft.com/en-us/azure/templates/microsoft.machinelearningservices/workspaces/computes?pivots=deployment-language-bicep#comp[…]ects You see that the ComputeInstance object requires a subnet ID in the following way: subnet: { id: 'string' } This is also shown if you look at the ComputeInstancePropertiesArgs object:
Copy code
class ComputeInstancePropertiesArgs:
    def __init__(__self__, *,
                 application_sharing_policy: Optional[pulumi.Input[Union[str, 'ApplicationSharingPolicy']]] = None,
                 compute_instance_authorization_type: Optional[pulumi.Input[Union[str, 'ComputeInstanceAuthorizationType']]] = None,
                 custom_services: Optional[pulumi.Input[Sequence[pulumi.Input['CustomServiceArgs']]]] = None,
                 enable_node_public_ip: Optional[pulumi.Input[bool]] = None,
                 personal_compute_instance_settings: Optional[pulumi.Input['PersonalComputeInstanceSettingsArgs']] = None,
                 schedules: Optional[pulumi.Input['ComputeSchedulesArgs']] = None,
                 setup_scripts: Optional[pulumi.Input['SetupScriptsArgs']] = None,
                 ssh_settings: Optional[pulumi.Input['ComputeInstanceSshSettingsArgs']] = None,
                 subnet: Optional[pulumi.Input['ResourceIdArgs']] = None,
                 vm_size: Optional[pulumi.Input[str]] = None):
tl;dr: set the subnet as subnet=ResourceIdArgs(id=vmsubnet.id) and you're good to go
Also, the 'crappy Pulumi AI' would've given the same answer:
s
Thanks for the detailed answer.
As for the Pulumi "AI" the time spent chasing yet another fad would have been better spent on writing actual documentation so I don't have to waste my (and your) time. I am currently looking at the docs for the Azure Application Gateway with absolutely no examples and I am already dreading spending the next hour interrogating said "intelligence".
b
What questions do you have about an App Gateway? Note that there’s a gazillion examples of Bicep templates for that which are ultimately the same as Pulumi