Module to manage AWS Backup with Terraform.
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.

183 lines
4.8KB

  1. #####
  2. # Module
  3. #####
  4. variable "enabled" {
  5. description = "Whether or not to enable this entire module or not."
  6. default = true
  7. }
  8. variable "tags" {
  9. description = "Tags to be shared among all resources of this module."
  10. default = {}
  11. }
  12. ####
  13. # Vault
  14. ####
  15. variable "vault_create" {
  16. description = "Whether or not to create a vault for AWS Backup."
  17. default = true
  18. }
  19. variable "vault_name" {
  20. description = "Name of the backup vault to use."
  21. default = "default"
  22. }
  23. variable "vault_kms_key_arn" {
  24. description = "ARN of the KMS key to use for the vault for AWS Backup. Do not specify if you want to let the module create it own key."
  25. default = null
  26. type = string
  27. }
  28. variable "vault_kms_key_create" {
  29. description = "Whether or not to create a KMS key for the vault for AWS Backup."
  30. default = true
  31. }
  32. variable "vault_kms_key_name" {
  33. description = "Name of the KMS key to use for the vault for AWS Backup."
  34. default = ""
  35. }
  36. variable "vault_kms_key_alias_name" {
  37. description = "Alias for the KMS key of the Backup vault. Will be merged with tags."
  38. default = ""
  39. }
  40. variable "vault_tags" {
  41. description = "Tags for the Backup vault. Will be merged with tags."
  42. default = {}
  43. }
  44. variable "vault_kms_tags" {
  45. description = "Tags for the KMS key of the Backup vault. Will be merged with tags."
  46. default = {}
  47. }
  48. ####
  49. # Plan
  50. ####
  51. variable "plan_create" {
  52. description = "Whether or not to create a plan."
  53. default = true
  54. }
  55. variable "plan_name" {
  56. description = "Name of the plan."
  57. default = "backup-plan"
  58. }
  59. variable "plan_rule_name" {
  60. description = "Name of the rule for the plan."
  61. default = "backup-rule"
  62. }
  63. variable "plan_rule_schedule" {
  64. description = "A CRON expression specifying when to initiates a backup job for the plan."
  65. default = ""
  66. }
  67. variable "plan_rule_start_window" {
  68. description = "The amount of time in minutes before beginning a backup for the plan."
  69. default = ""
  70. }
  71. variable "plan_rule_completion_window" {
  72. description = "The amount of time AWS Backup attempts a backup before canceling the job and returning an error for the plan."
  73. default = ""
  74. }
  75. variable "plan_rule_recovery_point_tags" {
  76. description = "Metadata that you can assign to help organize the resources that you create for the plan."
  77. default = {}
  78. }
  79. variable "plan_rule_lifecycle_cold_storage_after" {
  80. description = "Specifies the number of days after creation that a recovery point is moved to cold storage."
  81. default = ""
  82. }
  83. variable "plan_rule_lifecycle_delete_after" {
  84. description = "Specifies the number of days after creation that a recovery point is deleted. Must be 90 days greater than cold_storage_after."
  85. default = ""
  86. }
  87. variable "plan_tags" {
  88. description = "Tags for the Backup plan. Will be merged with tags."
  89. default = {}
  90. }
  91. ####
  92. # Selection
  93. ####
  94. variable "selection_role_create" {
  95. description = "Whether or not to create a role for selection."
  96. default = true
  97. }
  98. variable "selection_iam_role_name" {
  99. description = "Name of the IAM role that AWS Backup uses to authenticate when restoring and backing up the target resource."
  100. default = "BackupRole"
  101. }
  102. variable "selection_role_arn" {
  103. description = "ARN of the IAM role that AWS Backup uses to authenticate when restoring and backing up the target resource. Must be specified if selection_role_create is false."
  104. default = ""
  105. }
  106. variable "selection_create" {
  107. description = "Whether or not to create a selection."
  108. default = true
  109. }
  110. variable "selection_by_tags" {
  111. description = "Whether or not to create a selection by tags."
  112. default = false
  113. }
  114. variable "selection_by_ressources" {
  115. description = "Whether or not to create a selection by resources."
  116. default = false
  117. }
  118. variable "selection_tag_name" {
  119. description = "Name of the selection by tags."
  120. default = "selection-by-tag"
  121. }
  122. variable "selection_tag_type" {
  123. description = "An operation, such as 'StringEquals', that is applied to a key-value pair used to filter resources in a selection."
  124. default = "STRINGEQUALS"
  125. }
  126. variable "selection_tag_key" {
  127. description = "The key in a key-value pair of the selection by tags."
  128. default = "Backup"
  129. }
  130. variable "selection_tag_value" {
  131. description = "The value in a key-value pair of the selection by tags."
  132. default = "1"
  133. }
  134. variable "selection_plan_id" {
  135. description = "The backup plan ID to be associated with the selection of resources. Must be specified if plan_create is false."
  136. default = ""
  137. }
  138. variable "selection_resource_name" {
  139. description = "Name of the selection by resource."
  140. default = "selection-by-resource"
  141. }
  142. variable "selection_resources" {
  143. description = "An array of strings that either contain Amazon Resource Names (ARNs) or match patterns of resources to assign to a backup plan."
  144. default = []
  145. }