[英]Can I add azure functions to a DPS using Terraform?
I'm new to both Terraform and Azure. In a timespan of 6 weeks I have to create an IoT solution.我是 Terraform 和 Azure 的新手。在 6 周的时间内,我必须创建一个 IoT 解决方案。 I've only got 3 weeks left.
我只剩下 3 周了。
I have to provision devices in an IoT hub using a DPS and if 'm not wrong, a DPS uses azure functions to do so.我必须使用 DPS 在 IoT 中心配置设备,如果没记错的话,DPS 使用 azure 函数来执行此操作。
My question is, how can I add azure functions to a dps using terraform or is this not possible and do I have it all wrong?我的问题是,如何使用 terraform 将 azure 函数添加到 dps,或者这是不可能的,我是否完全错了?
DPS does not require an Azure Function for basic functionality. DPS 不需要 Azure Function 来实现基本功能。 That's only needed if you're doing custom allocation policies .
只有在执行自定义分配策略时才需要这样做。 If all you want to do is have an IoT Hub assigned from a pool of one or more Hubs, then one of the built-in allocation policies will work, as described in the overview :
如果您只想从一个或多个集线器池中分配一个 IoT 集线器,那么内置分配策略之一将起作用,如概述中所述:
Multiple allocation policies to control how DPS assigns devices to IoT hubs in support of your scenarios: Lowest latency, evenly weighted distribution (default), and static configuration via the enrollment list.
用于控制 DPS 如何将设备分配给 IoT 中心以支持您的场景的多个分配策略:最低延迟、均匀加权分布(默认)和通过注册列表的 static 配置。 Latency is determined using the same method as Traffic Manager.
使用与流量管理器相同的方法确定延迟。
The documentation explains how to select this in the Portal , and since you mention you're using Terraform, the provider does this using the allocation_policy
setting according to the provider documentation .该文档解释了如何在门户中使用 select,并且由于您提到您正在使用 Terraform,因此提供商根据提供商文档使用
allocation_policy
设置来执行此操作。
I understand you're under a small time crunch but you might find the self-paced training at Microsoft Learn for the AZ-220 exam worth your time.我知道你时间紧迫,但你可能会发现 Microsoft Learn 的AZ-220考试自定进度培训值得你花时间。 There is a learning path about device provisioning, and the information on load balancing is covered in that (for example, at this lesson ).
有一个关于设备配置的学习路径,其中包含有关负载平衡的信息(例如,在本课中)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.