variables.tf
1 /* IMAGE ----------------------------------------*/ 2 3 variable "image_name" { 4 description = "Name of AMI image to use." 5 type = string 6 default = "ubuntu/images/hvm-ssd/ubuntu-jammy-22.04-amd64-server-*" 7 } 8 9 variable "image_owner" { 10 description = "ID of the owner of AMI image." 11 type = string 12 default = "099720109477" 13 } 14 15 variable "ssh_user" { 16 description = "User used for SSH access." 17 type = string 18 default = "ubuntu" 19 } 20 21 /* HOSTING --------------------------------------*/ 22 23 variable "zone" { 24 description = "Name of availability zone to deploy to." 25 type = string 26 default = "us-east-1a" 27 } 28 29 variable "subdomain" { 30 description = "Subdomain for hosts entries." 31 type = string 32 } 33 34 variable "domain" { 35 description = "Public DNS Domain address" 36 type = string 37 } 38 39 variable "open_ports" { 40 description = "Which ports should be opened on the firewal." 41 type = list(number) 42 } 43 44 variable "keypair_name" { 45 description = "Name of SSH key pair in AWS." 46 type = string 47 } 48 49 /* NETWORK --------------------------------------*/ 50 51 variable "vpc_id" { 52 description = "ID of VPC for the instance." 53 type = string 54 } 55 56 variable "subnet_id" { 57 description = "ID of the subnet to use for the instance." 58 type = string 59 } 60 61 variable "sec_group" { 62 description = "ID of the VPC security group for the instance." 63 type = string 64 } 65 66 /* DNS ------------------------------------------*/ 67 68 variable "route53_zone_id" { 69 description = "ID of the zone in AWS Route53." 70 type = string 71 } 72 73 /* SCALING --------------------------------------*/ 74 75 variable "host_count" { 76 description = "Number of instances to create." 77 type = number 78 } 79 80 variable "instance_type" { 81 description = "Name of instance type to use" 82 type = string 83 default = "t2.micro" 84 } 85 86 /* SPECIFIC -------------------------------------*/ 87 88 variable "groups" { 89 description = "Name of Ansible group" 90 type = list(string) 91 } 92 93 variable "env" { 94 description = "Name of environment to create" 95 type = string 96 } 97 98 variable "stage" { 99 description = "Name of stage, like prod, dev, or staging." 100 type = string 101 }