variables.tf 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  1. # ===============
  2. # Input Variables
  3. # ===============
  4. variable "cloud_id" {
  5. description = "YC cloud-id"
  6. type = string
  7. }
  8. variable "folder_id" {
  9. description = "YC folder-id"
  10. type = string
  11. default = "b1g075j6vem2radjttgi"
  12. }
  13. variable "org_id" {
  14. description = "YC Organization ID"
  15. type = string
  16. }
  17. variable "vpc_net_name" {
  18. description = "VPC Network Name"
  19. type = string
  20. default = "default"
  21. }
  22. variable "vm_name" {
  23. description = "VM Name"
  24. type = string
  25. default = "keycloak"
  26. }
  27. variable "vm_pub_ip_name" {
  28. description = "Public static ip reservation name"
  29. type = string
  30. default = "kc"
  31. }
  32. variable "vm_subnet" {
  33. description = "Keycloak VM subnet name"
  34. type = string
  35. default = "default-ru-central1-a"
  36. }
  37. variable "kc_fqdn" {
  38. description = "Keycloak VM FQDN / DNS Name"
  39. type = string
  40. default = "kc.dsad.link"
  41. }
  42. variable "dns_zone_name" {
  43. description = "DNS zone name - not equal domain name! "
  44. type = string
  45. default = "gdfgf-link"
  46. }
  47. variable "kc_realm" {
  48. description = "Keycloak Realm name"
  49. type = string
  50. default = "labs"
  51. }
  52. variable "kc_ver" {
  53. description = "Keycloak version"
  54. type = string
  55. default = "18.0.0"
  56. }
  57. variable "kc_port" {
  58. description = "Keycloak HTTPS port listener"
  59. type = string
  60. default = "8443"
  61. }
  62. variable "kc_adm_user" {
  63. description = "Keycloak admin user name"
  64. type = string
  65. default = "admin"
  66. }
  67. variable "kc_adm_pass" {
  68. description = "Keycloak admin user password"
  69. type = string
  70. default = "Fru#n38Ga-Duw"
  71. }
  72. variable "kc_cert_path" {
  73. description = "SSL certificates path location at Keycloak VM"
  74. type = string
  75. default = "/usr/local/etc/certs"
  76. }
  77. variable "pg_db_name" {
  78. description = "PostgeSQL cluster and database name"
  79. type = string
  80. default = "keycloak"
  81. }
  82. variable "pg_db_user" {
  83. description = "PostgeSQL database user name"
  84. type = string
  85. default = "dbuser"
  86. }
  87. variable "pg_db_pass" {
  88. description = "PostgeSQL database user's password"
  89. type = string
  90. default = "My82Sup@paS98"
  91. }
  92. variable "le_cert_name" {
  93. description = "Let's Encrypt certificate name for YC Certificate Manager"
  94. type = string
  95. default = "kc-lab"
  96. }
  97. variable "le_cert_descr" {
  98. description = "Let's Encrypt certificate description for YC Certificate Manager"
  99. type = string
  100. default = "LE Certificate for Keycloak"
  101. }
  102. variable "le_cert_pub_key" {
  103. description = "Let's Encrypt certificate public key chain filename"
  104. type = string
  105. default = "cert-pub-chain.pem"
  106. }
  107. variable "le_cert_priv_key" {
  108. description = "Let's Encrypt certificate private key filename"
  109. type = string
  110. default = "cert-priv-key.pem"
  111. }
  112. variable "kc_user_file" {
  113. description = "Keycloak users file name"
  114. type = string
  115. default = "kc-users.lst"
  116. }
  117. variable "kc_user_count" {
  118. description = "Number of user accounts which will be created at Keycloak"
  119. type = string
  120. default = "3"
  121. }
  122. variable "kc_user_prefix" {
  123. description = "Prefix for the user names Keycloak accounts"
  124. type = string
  125. default = "user"
  126. }
  127. # ============
  128. # Data Sources
  129. # ============
  130. # data "yandex_vpc_network" "vpc_net" {
  131. # name = var.vpc_net_name
  132. # }
  133. # data "yandex_vpc_subnet" "vm_subnet" {
  134. # name = var.vm_subnet
  135. # }
  136. data "yandex_compute_image" "vm_image" {
  137. family = "ubuntu-2004-lts"
  138. }
  139. data "yandex_dns_zone" "dns_zone" {
  140. name = var.dns_zone_name
  141. folder_id = var.folder_id
  142. }