我是 Terraform 和 OCI 的新手。因此,我现在尝试通过云外壳在我的 OCI 中的 linux 主机上进行 ssh,但该主机位于私有子网中。所以我正在尝试以下命令,但出现超时错误。
你能告诉我我哪里弄错了吗
resource "null_resource" "remote-exec" {
provisioner "remote-exec" {
connection {
agent =false
timeout = "5m"
host ="xx.xx.xx.x" --- This is in a private subnet(private ip address to connect to linux env)
user = var.host_user_name
private_key =file("${path.module}/sshkey.pem")
}
inline = [
"sleep 10",
"sudo su - oracle",
"source EBSapps.env run",
"cd /u01/",
"touch ytest.txt",
]
}
}