Hi! I am having trouble with this. Any help greatl...
# golang
e
Hi! I am having trouble with this. Any help greatly appreciated!
Copy code
ScalingPlan, err := desktopvirtualization.NewScalingPlan(ctx, "scaling-plan", &desktopvirtualization.ScalingPlanArgs{
	HostPoolReferences: []desktopvirtualization.ScalingHostPoolReferenceArgs{
		{
			HostPoolArmPath:    HostPool.ID(),
			ScalingPlanEnabled: pulumi.Bool(true),
		},
	},
	ResourceGroupName: ResourceGroup.Name,
	TimeZone:          pulumi.String("Eastern Standard Time"),
},
	pulumi.DependsOn([]pulumi.Resource{HostPool, ResourceGroup}),
	pulumi.Parent(HostPool),
)
if err != nil {
	return err
}
Screenshot 2024-02-22 at 10.47.16 PM.png
I figured this out by manually creating a resource and then importing it to get the correct code which is slightly different than what is documented in the example here.
Copy code
HostPoolReferences: desktopvirtualization.ScalingHostPoolReferenceArray{
	&desktopvirtualization.ScalingHostPoolReferenceArgs{
		HostPoolArmPath:    HostPool.ID(),
		ScalingPlanEnabled: pulumi.Bool(true),
	},
},