- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我有一个具有命名值资源的模块,另一个具有 api 和操作资源的模块。然后我有一个二头肌文件(main.bicep),它将调用这两个文件。缩短版本(只是为了更容易解释):
namedValue 模块:
param apimServiceName string
param namedvalues_prefix string
param aud string
resource apimService 'Microsoft.ApiManagement/service@2022-09-01-preview' existing = {
name:apimServiceName
}
//named values:
resource la_triggerurl 'Microsoft.ApiManagement/service/namedValues@2022-08-01' = {
parent: apimService
name: '${namedvalues_prefix}-url'
properties: {
displayName: '${namedvalues_prefix}-url'
secret: true
value: workflow_triggerUrl
}
}
//...
API模块:
param apimServiceName string
param apiName string
resource apimService 'Microsoft.ApiManagement/service@2022-09-01-preview' existing = {
name:apimServiceName
}
resource apiOperationSend 'Microsoft.ApiManagement/service/apis/operations@2022-09-01-preview' = {
parent: api
name: 'send'
properties: {
displayName: 'Send'
method: 'POST'
urlTemplate: '/send'
templateParameters: []
responses: []
}
}
resource apiPolicySend 'Microsoft.ApiManagement/service/apis/operations/policies@2022-09-01-preview' = {
parent: apiOperationSend
name: 'policy'
properties: {
value: loadTextContent('../Policies/policy.xml')
}
}
//main.bicep:
param aud string
var apimServiceName = 'apim'
var apimRg = 'apim-rg'
module namedValues 'Modules/namedvalues.bicep' = {
name: 'namedValue'
scope:resourceGroup(apimRg)
params: {
apimServiceName: apimServiceName
namedvalues_prefix: 'somePrefix'
aud:aud
}
}
// The api and its resources need to be deployed after the deployment of the named values
module apiModule 'Modules/apiAndOperations.bicep' = {
name:'apiDeployment'
scope:resourceGroup(apimRg)
params:{
apiName:'personnelfromoracleint'
apimServiceName:apimServiceName
}
}
问题是我需要在 api 模块之前部署命名值模块,因为这些命名值用于policy.xml 文件内的策略。
因此,在调用 apiModule 时,我尝试在 main.bicep 中添加 parent:namedValues
字段,但 VS code 给出了此错误:
The property "parent" is not allowed on objects of type "module". Permissible properties include "dependsOn"
当我尝试使用 dependsOn:namedValues
时,它给了我这个错误:
The property "dependsOn" expected a value of type "(module[] | (resource | module) | resource[])[]" but the provided value is of type "module"
对于如何解决这个问题有什么建议吗?
最佳答案
您可以使用资源中的 dependsOn
block 来添加显式依赖项,但是如果您以正确的方式引用依赖资源,bicep 也可以通过为您构建依赖关系图来工作。这种隐式方法更好,并且需要更少的代码行。
例如。
将 output apimName string = apimService.name
添加到您的 api 模块。然后在您的namedValues声明中使用apiModule.outputs.apimName
引用它。
module namedValues 'Modules/namedvalues.bicep' = {
name: 'namedValue'
scope:resourceGroup(apimRg)
params: {
apimServiceName: apiModule.outputs.apimName
namedvalues_prefix: 'somePrefix'
aud:aud
}
}
named values
module apiModule 'Modules/apiAndOperations.bicep' = {
name:'apiDeployment'
scope:resourceGroup(apimRg)
params:{
apiName:'personnelfromoracleint'
apimServiceName:apimServiceName
}
}
关于 azure 二头肌 : deploy modules in specific order,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/76619435/
我正在 sitepoint 上阅读一篇文章 - http://www.sitepoint.com/how-to-create-mysql-events/关于mysql事件的主题,当你可以安排时我遇到了
我想为用户预订一个特定的时间(开始时间和结束时间),其他人不能在同一时间预订。例如:John预约了一个月5号7点到8点的时间,我想没有其他人可以在同一时间和日期预订。我想查一下时段,因为如果像John
I want to book a specific time for the user (start hour and end hour ) and no one else can book a
我已经克隆了 linux 内核 git 仓库: git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 我
我正在尝试获取下面突出显示的文本“frei ab 01.05.2017”。然而问题是,“section_content iw_right”类在该网站上出现了 19 次。我会执行 find_all 并仅
我尝试找到这个问题,但所有其他问题都与我的问题无关。 我的问题:我有类似 0xFreeFoodU 的东西,我必须获得特定的位置,然后翻转它们或将它们设为 1 或 0。 例如,位置 2、6、10、14、
我正在尝试创建一个登录功能,该功能允许我指定要从中选择数据的表以及要选择的字段。我已设法将表值传递给函数,并从所需的表中选择数据,但我的表有不同的字段。如何在查询中指定它是一个表选择: user_id
我是 Rails 的新手,在获取布局(用作唯一的静态登录页面)来加载我想与之关联的特定样式表时遇到了问题。例如:www.landing.com 加载landing.scss.erb . 作为背景,所有
我不明白为什么这两个示例的行为不同。 HTML 和 CSS 的目的只是简单地水平对齐 div,并让最后一个 div(向右)占据剩余空间(容器的剩余宽度)。 为正确的元素使用特定的 id: #left
我是 postfix 的新手。如何使用限制类或其他方法将特定用户的特定域列入黑名单。 假设我的机器有两个用户 - user1 和 user2。 我想将abc.com 到user1@mydomain 的
当记事本是 .txt 文件的默认程序时,我如何告诉 Windows 在写字板中打开 C:\test\test.txt? 最佳答案 接受的答案对我不起作用。我不确定这是因为我试图运行的程序,还是因为路径
对于下面的代码示例,我需要检查一个 tr ,type="a"并且有一个带有文本“3”作为 child 的 td ,是否存在: 1 1
var s = '-10px -10px'; var n = '33px'; 我需要一个产生这个结果的正则表达式:'-10px 33px' 类似于:s.replace(???, n) 最佳答案 如果您
一个项目 table: items 有许多分类法 table: taxonomies 使用连接表 item_taxonomies (item_id, taxonomy_id)。 使用分类组搜索项目。
h:panelGrid 表有 2 列。 这是必需的,第一列为整个表格宽度的 30%,第二列为整个表格宽度的 70%。 这种情况有一些配置吗?看起来 columnClasses 属性应用于所有列, 并且
特定阶段仅在特定计算机上卡在队列中 显示队列中的位置:1,但无法连接到代理,即使没有其他作业正在运行且队列为空 所有其他阶段都工作正常 故障阶段在不同的机器上工作正常 代理已在线并已启用 我们所有的代
我正在使用 CakePHP 3.3.10。我需要将 JavaScript 文件添加到特定 View 。 // default.ctp // I need to remove this script
首先,我发现提出问题很困难,欢迎反馈。 我必须制作一个机器学习代理来玩点和盒子。 我还处于早期阶段,但提出了一个问题:如果我让我的机器学习代理(具有特定的实现)与它自身的副本进行对抗来学习和改进它的游
我是开发 iOS 应用程序的新手,英语不是我的母语,所以请原谅我的任何错误和丑陋的代码。 我尝试创建的应用程序应该只在特定的一天显示一张特定的图像(如果日期更改,则更改图像)。因此我实现了一个检查日期
我写了一些函数,并编译成一个dll模块。在我的头文件中如下: #ifndef GET_DATAFEED_FORKDB_H #define GET_DATAFEED_FORKDB_H #include
我是一名优秀的程序员,十分优秀!