fixed provisioning with file

terraform
Daniel Mikula 2023-05-22 14:19:11 +02:00
parent d7159bc678
commit e27a78867e
1 changed files with 9 additions and 2 deletions

11
ec2.tf
View File

@ -14,14 +14,21 @@ resource "aws_instance" "k3s_box" {
# user_data = "${file("./setup_scripts/script.sh")}"
connection {
type = "ssh"
user = "ec2-user"
private_key = file("${local_file.k3s_box_private_key.filename}")
host = self.public_ip
}
provisioner "file" {
source = "./setup_scripts/install_crontab.sh"
destination = "/home/ec2-user"
destination = "/home/ec2-user/install_crontab.sh"
}
provisioner "file" {
source = "./setup_scripts/duckdns.sh"
destination = "/home/ec2-user"
destination = "/home/ec2-user/duckdns.sh"
}
provisioner "remote-exec" {