variables.tf 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. variable "name" {
  2. description = "Name of the fastly service (defaults to hostname)."
  3. type = string
  4. default = ""
  5. }
  6. variable "hostname" {
  7. description = "Hostname the service points to."
  8. type = string
  9. }
  10. variable "app_hostname" {
  11. description = "Hostname of the mastodon app that this service belongs to."
  12. type = string
  13. }
  14. variable "ssl_hostname" {
  15. description = "Hostname to use for SSL verification (if different from 'hostname')."
  16. type = string
  17. default = ""
  18. }
  19. variable "backend_name" {
  20. description = "Optional name for the backend."
  21. type = string
  22. default = ""
  23. }
  24. variable "backend_address" {
  25. description = "Address to use for connecting to the backend. Can be a hostname or an IP address."
  26. type = string
  27. }
  28. variable "backend_ssl_check" {
  29. description = "Be strict about checking SSL certs when connecting to the backend."
  30. type = bool
  31. default = true
  32. }
  33. variable "shield_region" {
  34. description = "Which Fastly shield region to use. Should correspond with the shield code."
  35. type = string
  36. }
  37. variable "force_tls_hsts" {
  38. description = "Force TLS and HTTP Strict Transport Security (HSTS) to ensure that every request is secure."
  39. type = bool
  40. default = true
  41. }
  42. variable "hsts_duration" {
  43. description = "Number of seconds for the client to remember only to use HTTPS."
  44. type = number
  45. default = 31557600
  46. }
  47. variable "product_enablement" {
  48. description = "Which additional Fastly products to enable for this service."
  49. type = object({
  50. brotli_compression = optional(bool, false)
  51. domain_inspector = optional(bool, false)
  52. image_optimizer = optional(bool, false)
  53. origin_inspector = optional(bool, false)
  54. websockets = optional(bool, false)
  55. })
  56. default = {
  57. brotli_compression = false
  58. domain_inspector = false
  59. image_optimizer = false
  60. origin_inspector = false
  61. websockets = false
  62. }
  63. }
  64. variable "datadog" {
  65. description = "Whether to send logging info to Datadog"
  66. type = bool
  67. default = false
  68. }
  69. variable "datadog_token" {
  70. description = "API key from Datadog."
  71. type = string
  72. default = ""
  73. sensitive = true
  74. }
  75. variable "datadog_service" {
  76. description = "Datadog service name to use for logs"
  77. type = string
  78. default = "fastly"
  79. }
  80. variable "datadog_region" {
  81. description = "The region that log data will be sent to."
  82. type = string
  83. default = "EU"
  84. validation {
  85. condition = contains(["US", "EU"], var.datadog_region)
  86. error_message = "Datadog region must be either US or EU."
  87. }
  88. }