Do you want BuboFlash to help you learning these things? Or do you want to add or correct something? Click here to log in or create user.



Question
In terraform, you can run some startup configurations on a created resource using the nested (i.e. nested inside resource block) [...] block (although better option is creating proper AMIs via Packer).
Answer

provisioner

e.g.:

resource "aws_instance" "web" {
  # ...

  provisioner "file" {
    source      = "script.sh"
    destination = "/tmp/script.sh"
  }

  provisioner "remote-exec" {
    inline = [
      "chmod +x /tmp/script.sh",
      "/tmp/script.sh",
    ]
  }
}


Question
In terraform, you can run some startup configurations on a created resource using the nested (i.e. nested inside resource block) [...] block (although better option is creating proper AMIs via Packer).
Answer
?

Question
In terraform, you can run some startup configurations on a created resource using the nested (i.e. nested inside resource block) [...] block (although better option is creating proper AMIs via Packer).
Answer

provisioner

e.g.:

resource "aws_instance" "web" {
  # ...

  provisioner "file" {
    source      = "script.sh"
    destination = "/tmp/script.sh"
  }

  provisioner "remote-exec" {
    inline = [
      "chmod +x /tmp/script.sh",
      "/tmp/script.sh",
    ]
  }
}


Summary

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

Details

No repetitions


Discussion

Do you want to join discussion? Click here to log in or create user.