-
Notifications
You must be signed in to change notification settings - Fork 0
/
variables.tf
68 lines (61 loc) · 1.92 KB
/
variables.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
variable "organization_name" {
description = "Specifies the name of the organization (namespace) the repository belongs"
type = string
nullable = false
}
variable "region" {
description = "Specifies the region in which to create the resource, if omitted, the provider-level region will be used"
type = string
default = null
}
variable "repositories" {
description = <<DES
Specifies the repository name and parameters"
* `description` - specifies the description of the repository;
* `is_public` - specifies whether the repository is public;
* `category` - the value can be app_server, linux, framework_app, database, lang, other, windows, arm.
DES
type = map(object({
description = optional(string, null)
is_public = optional(bool, false)
category = optional(string, "other")
}))
default = {}
}
variable "permissions" {
description = <<DES
Specifies the repository name and parameters"
* `user_id` - IAM User ID;
* `user_name` - IAM User name;
* `permission` -the values can be `Manage`, `Write` and `Read`.
DES
type = set(object({
user_id = string
user_name = optional(string, null)
permission = optional(string, "Read")
}))
default = []
}
variable "retention_policy" {
description = "Is retention policy enabled?"
type = bool
default = false
}
variable "retention_policy_type" {
description = "Specifies the retention policy type"
type = string
default = "tag_rule"
validation {
condition = contains(["tag_rule", "date_rule"], var.retention_policy_type)
error_message = "Value options: date_rule, tag_rule."
}
}
variable "retention_policy_number" {
description = <<DES
Specifies the number of retention:
* If type is set to 'date_rule', it represents the number of retention days;
* If type is set to 'tag_rule', it represents the retention number.
DES
type = number
default = 50
}