Resource: aws_codecommit_approval_rule_template

Provides a CodeCommit Approval Rule Template Resource.

Example Usage

resource "aws_codecommit_approval_rule_template" "example" {
  name        = "MyExampleApprovalRuleTemplate"
  description = "This is an example approval rule template"

  content = jsonencode({
    Version               = "2018-11-08"
    DestinationReferences = ["refs/heads/master"]
    Statements = [{
      Type                    = "Approvers"
      NumberOfApprovalsNeeded = 2
      ApprovalPoolMembers     = ["arn:aws:sts::123456789012:assumed-role/CodeCommitReview/*"]
    }]
  })
}

Argument Reference

This resource supports the following arguments:

Attribute Reference

This resource exports the following attributes in addition to the arguments above:

Import

In Terraform v1.5.0 and later, use an import block to import CodeCommit approval rule templates using the name. For example:

import {
  to = aws_codecommit_approval_rule_template.imported
  id = "ExistingApprovalRuleTemplateName"
}

Using terraform import, import CodeCommit approval rule templates using the name. For example:

% terraform import aws_codecommit_approval_rule_template.imported ExistingApprovalRuleTemplateName