terraform azurerm_data_factory_pipeline 将类型分配给变量
在 terraform 文档中,我找到了以下示例:
resource "azurerm_data_factory_pipeline" "test" {
name = .....
resource_group_name = ...
data_factory_id = ...
variables = {
"bob" = "item1"
}
但我需要创建一个布尔变量,在门户 Azure 中我有类型字段。 我怎样才能像这样设置变量:
"variables": {
"END": {
"type": "Boolean",
"defaultValue": false
}
}
in terraform documentation i found the follow example:
resource "azurerm_data_factory_pipeline" "test" {
name = .....
resource_group_name = ...
data_factory_id = ...
variables = {
"bob" = "item1"
}
but I need to create a boolean variable, in the portal Azure I have the type field.
how can I set the variable like this:
"variables": {
"END": {
"type": "Boolean",
"defaultValue": false
}
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
根据您的问题,如果您询问如何在 Terraform 中创建布尔类型的变量,则可以这样做:
您可以在资源定义中引用该变量:
或者您可以在不定义 Terraform 变量的情况下设置它,如下所示:
Based on your question, if you are asking how to create a variable of type boolean in Terraform, that is done like this:
You can reference that variable then in the resource definition:
Or alternatively you can set it without defining the Terraform variable like this: