-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathvariables.tf
103 lines (87 loc) · 2.79 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
#################
# Configuration #
#################
variable "repo_name" {
description = "Name of the repository to be created"
type = string
}
variable "github_repositories" {
description = "GitHub repositories in which to create github actions secrets"
default = []
type = list(string)
validation {
## Ensure that the GitHub repository names cannot contain a url
condition = alltrue([for repo in var.github_repositories : can(regex("^[^/]+$", repo))])
error_message = "GitHub repository name cannot contain a url, please only enter the repository name"
}
}
variable "github_environments" {
description = "GitHub environment in which to create github actions secrets"
type = list(string)
default = []
}
# Lifecycle policy
variable "lifecycle_policy" {
description = "A lifecycle policy consists of one or more rules that determine which images in a repository should be expired."
type = string
default = null
}
variable "canned_lifecycle_policy" {
description = "A canned lifecycle policy to remove tagged or untagged images"
type = map(any)
default = null
}
########
# OIDC #
########
variable "oidc_providers" {
description = "OIDC providers for this ECR repository, valid values are \"github\" or \"circleci\""
type = list(string)
default = []
}
variable "github_actions_prefix" {
description = "String prefix for GitHub Actions variable and secrets key"
type = string
default = ""
}
variable "deletion_protection" {
description = "(Optional) Whether the ECR should have deletion protection enabled for non-empty registry. Set this to false if you intend to delete your ECR resource or namespace. NOTE: PR owner has responsibility to ensure that no other environments are sharing this ECR. Defaults to true."
type = bool
default = true
}
########
# Tags #
########
variable "business_unit" {
description = "Area of the MOJ responsible for the service"
type = string
}
variable "application" {
description = "Application name"
type = string
}
variable "is_production" {
description = "Whether this is used for production or not"
type = string
}
variable "team_name" {
description = "Team name"
type = string
}
variable "namespace" {
description = "Namespace name"
type = string
}
variable "environment_name" {
description = "Environment name"
type = string
validation {
## Ensure that the environment name isnt empty
condition = length(var.environment_name) > 0
error_message = "environment_name cannot be empty"
}
}
variable "infrastructure_support" {
description = "The team responsible for managing the infrastructure. Should be of the form <team-name> (<team-email>)"
type = string
}