-
Notifications
You must be signed in to change notification settings - Fork 1
/
variables.tf
67 lines (61 loc) · 1.59 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
variable "repository_name" {
type = string
default = "MyTestRepository"
description = "The name of the repository"
}
variable "repository_description" {
type = string
default = "This is the Sample App Repository"
description = "Repository Description"
}
variable "create_approval_rules" {
type = bool
default = false
description = "Create an approval policy for the repository"
}
variable "approval_rules" {
type = string
default = <<EOF
{
"Version": "2018-11-08",
"DestinationReferences": ["refs/heads/master"],
"Statements": [{
"Type": "Approvers",
"NumberOfApprovalsNeeded": 2,
"ApprovalPoolMembers": ["arn:aws:sts::123456789012:assumed-role/CodeCommitReview/*"]
}]
}
EOF
description = "The JSON repository approval policy"
}
variable "create_triggers" {
type = bool
default = false
description = "Create a SNS notification trigger for the repository"
}
variable "triggers" {
type = any
default = [
{
"Branches": ["master"],
"DestinationArn" : "arn:aws:sns:eu-west-1:123456789012:MyTopicMaster",
"Events" : ["all"],
"Name" : "Master Branch"
},
{
"Branches": ["develop"],
"DestinationArn" : "arn:aws:sns:eu-west-1:123456789012:MyTopicDevelop",
"Events" : ["all"],
"Name" : "Develop branch"
}
]
description = "The sns notification triggers"
}
variable "tags" {
type = map(string)
default = {
"Name" = "MyTestRepository"
"Description" = "This is the Sample App Repository"
}
description = "Tags to apply to the repository"
}