简体   繁体   English

我可以使用 Terraform 将 azure 功能添加到 DPS 吗?

[英]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.

相关问题 如何将 Terraform 中的逻辑用于 Azure? - How can i use logic in Terraform for Azure? 如何使用 terraform 将多个机密添加到 azure 密钥保管库 - How to add multiple secrets to azure key vault using terraform 如何使用 terraform 在 AWS 权限集上添加多个内联策略? - How can I add multiple inline policy on AWS permission set using terraform? 当我使用部署 terraform 代码的 msft 托管代理添加变量组时,Azure 管道超时 - Azure pipelines timing out when I add a variable group using msft-hosted agent deploying terraform code 如何使用 Terraform 在不同项目中为 Google Cloud 中的其他项目服务帐户添加 IAM 角色 - How can I add IAM role for other project service account in Google Cloud in different project using Terraform Azure 事件中心使用 terraform - Azure event hub using terraform 我可以在 Terraform 中创建一个 Redshift 集群并向其中添加一个额外的用户吗? - Can I create a Redshift cluster in Terraform AND add an additional user to it? 我可以使用 Terraform 的 CDK 创建 AWS state 机器吗? - Can I create an AWS state machine using the CDK for Terraform? 我可以使用 Terraform 创建 GCP API 密钥吗? - Can I create GCP API keys using Terraform? 如何使用 Terraform 定义 lambda function 测试事件? - How can I define lambda function test events using Terraform?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM