Resource: awsCodecommitTrigger
Provides a CodeCommit Trigger Resource.
\~> NOTE: Terraform currently can create only one trigger per repository, even if multiple aws_codecommit_trigger resources are defined. Moreover, creating triggers with Terraform will delete all other triggers in the repository (also manually-created triggers).
Example Usage
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
const awsCodecommitRepositoryTest =
new aws.codecommitRepository.CodecommitRepository(this, "test", {
repositoryName: "test",
});
const awsCodecommitTriggerTest = new aws.codecommitTrigger.CodecommitTrigger(
this,
"test_1",
{
repositoryName: awsCodecommitRepositoryTest.repositoryName,
trigger: [
{
destinationArn: "${aws_sns_topic.test.arn}",
events: ["all"],
name: "all",
},
],
}
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
awsCodecommitTriggerTest.overrideLogicalId("test");
Argument Reference
The following arguments are supported:
repositoryName
- (Required) The name for the repository. This needs to be less than 100 characters.name
- (Required) The name of the trigger.destinationArn
- (Required) The ARN of the resource that is the target for a trigger. For example, the ARN of a topic in Amazon Simple Notification Service (SNS).customData
- (Optional) Any custom data associated with the trigger that will be included in the information sent to the target of the trigger.branches
- (Optional) The branches that will be included in the trigger configuration. If no branches are specified, the trigger will apply to all branches.events
- (Required) The repository events that will cause the trigger to run actions in another service, such as sending a notification through Amazon Simple Notification Service (SNS). If no events are specified, the trigger will run for all repository events. Event types include:all
,updateReference
,createReference
,deleteReference
.
Attributes Reference
In addition to all arguments above, the following attributes are exported:
configurationId
- System-generated unique identifier.