【发布时间】:2020-04-24 19:31:16
【问题描述】:
所以我现在正在做一个项目,但我遇到了一个问题。在我工作的公司中,我们使用两个不同的资源组,一个用于演示,一个用于生产。在此之前,我们过去常常从演示帐户手动复制每个新的 Logic App 并更改参数,以便它使用正确的参数进行生产。到目前为止,我们有大约 80 个逻辑应用程序,我们将它们分组。目标是让它变得更容易,并且需要尽可能少的手动工作。
我们正在使用它们来同步 SQL 表、CRM 数据和许多其他东西。所以我有许多使用不同参数的逻辑应用程序。例如,一个可以从日历同步到 SQL 服务器,另一个同步两个 SQL 表,但每个表必须由不同的用户访问。我想要做的是根据同步有 6-7 个参数文件。但是,当部署发现我有模板未使用的参数值时,部署会失败并出现以下错误,这使得必须为几乎所有新的逻辑应用创建新的参数文件:
Code=InvalidTemplate; Message=Deployment template validation failed: 'The template parameters 'sql_server......' in the parameters file are not valid; they are not present in the original template and can therefore not be provided at deployment time. The only supported parameters for this template are 'logicAppName, logicAppLocation........ sql-8_username, sql-8_password, sql-8_sqlConnectionString'. Please see https://aka.ms/arm-deploy/#parameter-file for usage details.'.
有没有办法让这些参数成为可选参数,以便每个模板都使用它需要的参数?我四处搜索,但发现的主要内容没有多大帮助 => https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/template-best-practices#parameters
非常感谢你们提供的任何帮助!
【问题讨论】:
标签: azure powershell azure-logic-apps azure-powershell