Automation and setup for sites I own.
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 

31 行
574 B

  1. # entry point for terraform configuration
  2. variable "ssh_pub_key" {
  3. type = string
  4. }
  5. variable "root_password" {
  6. type = string
  7. }
  8. resource "linode_instance" "prod" {
  9. image = "linode/alpine3.11"
  10. label = "vps"
  11. group = "terraform"
  12. region = "us-central"
  13. type = "g6-nanode-1"
  14. authorized_keys = [var.ssh_pub_key]
  15. root_pass = var.root_password
  16. }
  17. output "ipv4" {
  18. value = linode_instance.prod.ip_address
  19. }
  20. locals {
  21. ipv6 = split("/", linode_instance.prod.ipv6)[0]
  22. }
  23. output "ipv6" {
  24. value = local.ipv6
  25. }