如果我 azurerm_app_service
resource "azurerm_app_service" "testap" {
name = "MySuperCoolAppServer001"
location = "eastus"
resource_group_name = "notshown"
app_service_plan_id = "notshown"
site_config {
dotnet_framework_version = "v4.0"
scm_type = "LocalGit"
}
app_settings {
"SomeKey" = "SomeValue"
}
connection_string {
name = "Database"
type = "SQLServer"
value = "Server=some-server.mydomain.com;Integrated Security=SSPI"
}
}
这将创建
https://MySuperCoolAppServer001.azurewebsites.net
使用 terraform 输出变量,我正在捕获 id 和 name
output "output_tf_testap_id" {
value = "${azurerm_app_service.testap.id}"
}
output "output_tf_testap_name" {
value = "${azurerm_app_service.testap.name}"
}
有没有办法通过 terraform 获取MySuperCoolAppServer001 ( https://MySuperCoolAppServer001.azurewebsites.net ) 的IP 地址作为输出值?
我已经尝试了以下3个,但不行。
does not have attribute 'ipaddress' for variable 'azurerm_app_service.
does not have attribute 'ip_address' for variable 'azurerm_app_service.
does not have attribute 'ip' for variable 'azurerm_app_service.