小编nun*_*nop的帖子

Terraform,在污点上出现“模块根目录没有资源”错误

获得一个The module root has no resources上污点错误。我试图污染几个null_resources。这是代码块null_resource.provision_first

resource "null_resource" "provision_first" {

    connection {

        user = "root"
        type = "ssh"
        private_key = "${file("./.ssh/prv_key")}"
        host = "${element(digitalocean_droplet.droplet.*.ipv4_address, count.index)}"
        timeout = "2m"
   }

   provisioner "remote-exec" {
       inline = [

           # install salt-minion
           "wget -O - http://bootstrap.saltstack.org | sudo sh"
       ]
    }

    provisioner "file" {

         # copy minion file
        source = "../salt/prod/minion"
        destination = "/etc/salt/minion"
    }

   provisioner "file" {

       # copy top.sls and init.sls files
       source = "../salt/roots"
       destination …
Run Code Online (Sandbox Code Playgroud)

terraform

3
推荐指数
1
解决办法
3280
查看次数

标签 统计

terraform ×1