Need suggestion.
I am trying to run the below code. First adf is imported which has the vsts configuration.
For second adf, i dont need the vsts configuration. I have tried using dymanic block, but getting error as below.
on main.tf line 16, in resource "azurerm_data_factory" "adf":
2020-12-24T08:13:44.3101544Z 16: dynamic [4m"action"
[0m {
2020-12-24T08:13:44.3101802Z [0m
2020-12-24T08:13:44.3102076Z Blocks of type "action" are not expected here.
Main.tf
resource "azurerm_data_factory" "adf"{
for_each = var.purposes
name=lower("${var.component}-${var.project}-${var.regionname}-${var.azureregion}-${var.environment}-${each.value.purpose}")
location = data.azurerm_resource_group.rg.location
resource_group_name = data.azurerm_resource_group.rg.name
identity{
type="SystemAssigned"
}
dynamic "action" {
for_each = var.vsts_config ? [1] : []
content {
vsts_configuration {
account_name = var.accountname
branch_name = var.branchname
project_name = var.projectname
repository_name = var.repository
tenant_id = "__tenantId__"
root_folder = var.rootfolder
}
}
}
}
input.tfvars
purposes = {
a = {
purpose = "load",
}
b = {
purpose = "live",
}
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…