- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在使用 Terraform 创建 LogicApps。逻辑应用程序将执行 Webhook,我想发布文本。
我想使用 If 语句自定义 Terraform 代码的文本字段。我希望文本的某些部分仅在产品环境中显示。但是,我的 terraform 代码将整个 if 语句传递给 LogicApps,并且在 LogicApps 执行时出现有效负载错误。
resource "azurerm_logic_app_action_http" "example" {
name = "webhook"
logic_app_id = azurerm_logic_app_workflow.example.id
method = "GET"
uri = "http://example.com/some-webhook"
method = "POST"
headers = { "Content-Type" = "application/json" }
body = <<-BODY
{
"blocks": [
{
"text": {
"text": "[${var.environment_name}] == "prod" ? *This is prod alert* : *---*",
"type": "mrkdwn"
}
}
最佳答案
您可以在 BODY
中使用条件,如下所示:
body = <<-BODY
{
"blocks": [
{
"text": {
"text": "Alert: ${var.environment_name == "prod" ? "*This is prod alert*" : "*---*"}",
"type": "mrkdwn"
}
}
BODY
关于azure - 如何在 Terraform for LogicApps 中创建 if 语句,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69568501/
我正在使用自定义连接器并尝试填充动态架构响应 使用x-ms-dynamic-schema 这就是我的招摇: responses: '200': description: Res
创建了http请求触发器并列出了blob操作,然后为每个创建的获取blob内容并创建了blob操作 在输入存储帐户名称后创建 blob 时,仍然需要获取存储帐户名称作为错误消息,在此之后我想删除 bl
我正在使用自定义连接器并尝试填充动态架构响应 使用x-ms-dynamic-schema 这就是我的招摇: responses: '200': description: Res
创建了http请求触发器并列出了blob操作,然后为每个创建的获取blob内容并创建了blob操作 在输入存储帐户名称后创建 blob 时,仍然需要获取存储帐户名称作为错误消息,在此之后我想删除 bl
我已在 LogicApp 中设置了“身份”,在容器注册表中添加了必要的 AcrPull 访问权限,但无法让逻辑应用访问 Azure 中的私有(private)容器注册表(出现错误; "error":
我在 Visual Studio 2017 中创建了一个新的 Azure 资源组,并选择了逻辑应用。项目中有Deploy-AzureResourceGroup.ps1。 我想根据 LogicApp.j
我已在 LogicApp 中设置了“身份”,在容器注册表中添加了必要的 AcrPull 访问权限,但无法让逻辑应用访问 Azure 中的私有(private)容器注册表(出现错误; "error":
在logicapp的配置 Blade 中搜索Key Vault引用应用程序 Error@ Key Vault 引用无法解决 为了解决此错误,我正在logicapp中搜索配置 Blade ,但没有找到
目前我正在使用逻辑应用程序,我想使用变量将给定 DateTimeFormat 的小时数设置为 00:00:00。之后我尝试添加一个 int 变量作为小时,但这不起作用。有什么想法吗? formatDa
已解析的消息{“日期”:“2022-02-04”,“客户ID”:123,“客户信息”: {“id”:123,“姓氏”:“史密斯”,“名字”:“大卫”,“电子邮件”:“测试[email protecte
是否可以创建一个逻辑应用来监视特定虚拟机并发送有关断电/通电或 CPU 使用率百分比的电子邮件通知? 我已经阅读了事件网格,但它似乎更适合资源创建/删除通知,而不是特定的虚拟机信号。 我也知道可以在虚
我正在使用 Terraform 创建 LogicApps。逻辑应用程序将执行 Webhook,我想发布文本。 我想使用 If 语句自定义 Terraform 代码的文本字段。我希望文本的某些部分仅在产
完全重新表述问题,因为第一次尝试尚不清楚。 在我的逻辑应用程序中,我正在从 blob 读取 .json,其中包含: { "alpha": { "url": "https://l
完全重新表述问题,因为第一次尝试尚不清楚。 在我的逻辑应用程序中,我正在从 blob 读取 .json,其中包含: { "alpha": { "url": "https://l
可以使用默认的 LogicApp 连接器或 HTTP POST 方法从 LogicApp 调用 Azure Function。 我们正在使用 LogicApp 提供的默认连接器。 FunctionAp
我正在尝试配置一个已设置与 CosmosDB 连接的 LogicApp。 CosmosDB 资源已配置,但连接失败。 错误: {"status": "Failed","error": {"code":
我是新的 Azure 函数,我的任务之一是从 Sql 数据库读取数据,并使用 Azure 函数将该数据作为 csv 文件上传到 azure Blob 存储中,然后使用logicapps 检索它。我无法
我可以使用 C# SDK 检索逻辑应用程序连接器的元数据吗?我正在使用:Microsoft.Azure.Management.Logic.LogicManagementClient.Workflows
我有一个连接到 Azure 中的 SQL Server 数据库的 Azure 逻辑应用。该表有一个 uniqueidentifier 列作为主键。在逻辑应用中,删除或更新需要 rowid 才能执行更新
我正在尝试使用“向 DevOps 发送 HTTP 请求”操作自动批准来自逻辑应用的拉取请求。出现以下身份验证错误。 尝试了以下选项,但没有任何效果。 创建了具有完全访问权限的新 PAT 并传递到 he
我是一名优秀的程序员,十分优秀!