module "simple" {
source = "tokarev-artem/codecommit/aws"
repository_name = "react"
description = "Frontend app"
tags = {
Role = "frontend"
}
}
module "multiple" {
for_each = {
frontend-react = {
description = "react app"
}
backend-typescript = {
description = "backend app"
}
}
source = "tokarev-artem/codecommit/aws"
repository_name = each.key
description = each.value.description
kms_key_id = "arn:aws:kms:eu-central-1:1234567891011:key/cb121336-dddd-4a0d-abcd-914f5d2c2e2a"
rule_template_description = "Approval rule template for pull requests"
rule_number_of_approvals_needed = 2
rule_approval_pool_members = ["arn:aws:iam::1234567891011:user/JohnSnow"]
rule_destination_refs = ["refs/heads/main", "refs/heads/dev"]
trigger_destination_arn = "arn:aws:sns:eu-central-1:1234567891011:test-topic"
trigger_custom_data = "Custom data for the trigger"
trigger_events = ["updateReference", "createReference"]
trigger_branches = ["dev", "main"]
tags = {
ownder = "horns-and-hoofs"
}
}
Name |
Description |
Type |
Default |
Required |
repository_name |
The name of the CodeCommit repository |
string |
n/a |
yes |
approval_rule_branch_name |
A branch name to apply approval rule to |
string |
"main" |
no |
default_branch |
The default branch of the repository. The branch specified here needs to exist. |
string |
"main" |
no |
description |
The description of the CodeCommit repository |
string |
"" |
no |
kms_key_id |
The ARN of the encryption key. If no key is specified, the default aws/codecommit Amazon Web Services managed key is used. |
string |
null |
no |
rule_approval_pool_members |
The list of ARNs for users or groups who can approve pull requests |
list(string) |
[] |
no |
rule_destination_refs |
List of destination references for the approval rule template |
list(string) |
[ "refs/heads/main" ] |
no |
rule_number_of_approvals_needed |
The number of approvals needed for a pull request |
number |
"1" |
no |
rule_template_description |
The description of the approval rule template |
string |
"" |
no |
tags |
A map of tags to assign to the resource |
map(string) |
{} |
no |
trigger_branches |
The branches that will be included in the trigger configuration. If no branches are specified, the trigger will apply to all branches. |
list(any) |
[] |
no |
trigger_custom_data |
Any custom data associated with the trigger |
string |
"" |
no |
trigger_destination_arn |
The ARN of the resource that is the target of the trigger |
string |
null |
no |
trigger_events |
The events that will trigger the action (e.g., all, updateReference, createReference, deleteReference) |
list(string) |
[ "all" ] |
no |
trigger_name |
The name of the trigger |
string |
null |
no |