Automation and setup for sites I own.
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 
 
 

33 rindas
794 B

  1. provider "linode" {
  2. token = var.linode_token
  3. }
  4. resource "linode_instance" "functionalidiot_net" {
  5. image = "linode/alpine3.11"
  6. label = "functionalidiot.net"
  7. group = "terraform"
  8. region = "us-central"
  9. type = "g6-nanode-1"
  10. authorized_keys = [var.ssh_pub_key]
  11. root_pass = var.root_password
  12. }
  13. output "ipv4" {
  14. value = "${linode_instance.functionalidiot_net.ip_address}"
  15. }
  16. resource "null_resource" "post-setup" {
  17. depends_on = [ linode_instance.functionalidiot_net ]
  18. connection {
  19. host = linode_instance.functionalidiot_net.ip_address
  20. user = "root"
  21. password = var.root_password
  22. private_key = file("~/.ssh/id_rsa")
  23. }
  24. provisioner "remote-exec" {
  25. inline = [<<FIN
  26. uname -a
  27. FIN
  28. ]
  29. }
  30. }