我遇到下面提到的错误,但是我不知道,引号没有关闭。据我所知,看起来很好
错误消息:
At 55:2: literal not terminated
代码如下:
resource "azurerm_network_interface" "tf-ni-erx-sqlcl2" {
count = "${var.count_sqlcl2_vm}"
name = "${var.sql_base_hostname}${format("%02d",count.index+(var.count_sqlcl1_vm)-nic01"
location = "${data.azurerm_resource_group.tf-rg-erx-external.location}"
resource_group_name = "${data.azurerm_resource_group.tf-rg-erx-external.name}"
ip_configuration {
name = "${var.sql_base_hostname}${format("%02d",count.index+1)}-iip01"
subnet_id = "${data.azurerm_subnet.tf-sn-erx-sql.id}"
private_ip_address_allocation = "${var.env=="msdn"?"dynamic":"static"}"
private_ip_address = "10.112.3.${count.index+15}"
public_ip_address_id = "${var.sql_base_hostname}${format("%02d",count.index+1)}-pip01"
}
}
terraform validate还指出了类似55:2的错误,但仅此而已,如何获取有关该错误的更多信息?
看起来有些双引号问题吗?但无法弄清哪一个已全部关闭。
答案 0 :(得分:1)
对于您提供的代码,您需要将 Dim rCell As Range
Dim iHours As Integer
Dim iMins As Integer
Dim lrow As Long
Dim rn As Range
lrow = Sot.Range("d" & Rows.Count).End(xlUp).Row
Sot.Activate
Set rCell = Sot.Range(Cells(5, 4), Cells(lrow, 5))
For Each rn In rCell
If IsNumeric(rn.Value) And Len(rn.Value) > 0 Then
iHours = rn.Value \ 100
iMins = rn.Value Mod 100
rn.Value = (iHours + iMins / 60) / 24
rn.NumberFormat = "h:mm:ss"
End If
Next
For i = 5 To eRowplan
Time_from = Sotplan.Range("D" & i).Value
Time_To = Sotplan.Range("E" & i).Value
Time_from = TimeSerial(Hour(Time_from), Minute(Time_from),
Second(Time_from))
Time_To = TimeSerial(Hour(Time_To), Minute(Time_To), Second(Time_To))
If B_Time > "24:00" Then B_Time = "23:59"
B_Time = TimeSerial(Hour(B_Time), Minute(B_Time), Second(B_Time))
中的名称更改为如下格式:
azurerm_network_interface
还有一点,如果设置属性name = "${var.sql_base_hostname}${format("%02d%s",count.index,var.count_sqlcl1_vm)}-nic01"
,建议您对所有网络接口使用静态分配方法。