It would be great to have a possibility of including a security layer, such as the approval_rule_template, during the creation of AFT repositories, and performing the association. Something similar to this example:
resource "aws_codecommit_approval_rule_template" "templateDefault" {
name = "Approval Default"
description = "This is an approval default for this environment"
It would be great to have a possibility of including a security layer, such as the approval_rule_template, during the creation of AFT repositories, and performing the association. Something similar to this example:
resource "aws_codecommit_approval_rule_template" "templateDefault" { name = "Approval Default" description = "This is an approval default for this environment"
content = jsonencode({ Version = "2018-11-08" DestinationReferences = ["refs/heads/main"] Statements = [{ Type = "Approvers" NumberOfApprovalsNeeded = 1 ApprovalPoolMembers = ["GROUP_ARN"] }] }) }
resource "aws_codecommit_approval_rule_template_association" "associationOne" { for_each = {
"repositorio1" = "aft-NAMEREPO1" "repositorio2" = "aft-NAMEREPO2" "repositorio3" = "aft-NAMEREPO3" "repositorio4" = "aft-NAMEREPO4" "repositorio5" = "aft-NAMEREPO5" }
approval_rule_template_name = aws_codecommit_approval_rule_template.templateDefault.id repository_name = each.value }