You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

77 lines
1.5 KiB

  1. variable "region" {
  2. description = "The region"
  3. type = string
  4. }
  5. variable "az" {
  6. description = "The availability zone"
  7. type = string
  8. }
  9. variable "private_ip_bn" {
  10. description = "Private IP of bastion server"
  11. type = string
  12. }
  13. variable "private_network_cidr" {
  14. description = "The subnet of private network"
  15. type = string
  16. validation {
  17. condition = can(cidrnetmask(var.private_network_cidr))
  18. error_message = "Must be a valid IPv4 CIDR block address."
  19. }
  20. }
  21. variable "instances_cp" {
  22. type = map(object({
  23. private_ip = string
  24. }))
  25. }
  26. variable "instances_wk" {
  27. type = map(object({
  28. private_ip = string
  29. }))
  30. }
  31. variable "instance_key_name" {
  32. description = "The key name of the Key Pair to use for the instance"
  33. type = string
  34. }
  35. variable "instance_type_bn" {
  36. description = "The instance type of bastion server"
  37. type = string
  38. }
  39. variable "instance_type_wk" {
  40. description = "The instance type of worker"
  41. type = string
  42. }
  43. variable "instance_type_cp" {
  44. description = "The instance type of control plane"
  45. type = string
  46. }
  47. variable "image_name" {
  48. description = "The name of image"
  49. type = string
  50. }
  51. variable "working_instance_ip" {
  52. description = "The IP address to connect to bastion server."
  53. type = string
  54. }
  55. variable "accounting_type" {
  56. type = string
  57. default = "2"
  58. validation {
  59. condition = anytrue([
  60. var.accounting_type == "1", // Monthly
  61. var.accounting_type == "2", // Pay per use
  62. ])
  63. error_message = "Must be a 1 or 2."
  64. }
  65. }