terraform - Terraform remote-exec 永远创建
问题描述
我有一个 terraform main.tf
,它有一个remote-exec
配置程序来创建文件,但它需要很长时间并给出以下错误
错误:超时 - 最后一个错误:SSH 身份验证失败(root@34.94.107.128:22):ssh:握手失败:ssh:无法验证,尝试的方法 [none],没有支持的方法
它永远不会停止。
这就是我想要做的:
resource "null_resource" "web3" {
triggers = {
key = "${uuid()}"
}
provisioner "remote-exec" {
inline = [
"touch /etc/machan_kohomada_remote_execution"
]
connection {
type = "ssh"
host = google_compute_instance.first-two-servers[0].network_interface.0.access_config.0.nat_ip
}
}
}
我想也许我remote-exec
以错误的方式使用该功能?我需要做的是:
我需要/etc/remote_execution
在每个谷歌计算服务器中创建一个文件
解决方案
推荐阅读
- r - 如何遍历关键字向量列表并将它们模糊匹配到不同的文件(R)
- unit-testing - frameowrk7-vue 单元测试
- apache-spark - java.lang.AbstractMethodError, org.apache.spark.internal.Logging$class.initializeLogIfNecessary
- performance - Uint8Array 在 Chrome 上太慢了
- google-analytics-api - 报告数据未显示在嵌入式 API 中
- python - 转换字符串的某些部分
- java - 循环一个数学公式,直到两个值相等
- node.js - 使用 facebook webhook 发出 HTTP 请求
- html - CSS 图像不显示(Google AppScript)
- android - 为什么添加 abiFilters 会使应用程序正常工作?