Skip to content

Commit 45ac50c

Browse files
committed
docs: add Input Transformer configuration example for ECR
Add complete input_paths and input_template configuration to help users set up EventBridge transformers without having to dig through Terraform examples. Signed-off-by: Tanjim H. <[email protected]>
1 parent 7a37d94 commit 45ac50c

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

docs/configuration/webhook.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,44 @@ For more information about the CloudEvents specification, see the [CloudEvents v
119119
3. **Create an API Destination** pointing to your webhook endpoint
120120
4. **Set up IAM permissions** for EventBridge to invoke the API destination
121121

122+
#### Input Transformer Configuration
123+
124+
When setting up the EventBridge target, configure the Input Transformer with:
125+
126+
**input_paths:**
127+
```json
128+
{
129+
"id": "$.id",
130+
"time": "$.time",
131+
"account": "$.account",
132+
"region": "$.region",
133+
"repo": "$.detail.repository-name",
134+
"digest": "$.detail.image-digest",
135+
"tag": "$.detail.image-tag"
136+
}
137+
```
138+
139+
**input_template:**
140+
```json
141+
{
142+
"specversion": "1.0",
143+
"id": "<id>",
144+
"type": "com.amazon.ecr.image.push",
145+
"source": "urn:aws:ecr:<region>:<account>:repository/<repo>",
146+
"subject": "<repo>:<tag>",
147+
"time": "<time>",
148+
"datacontenttype": "application/json",
149+
"data": {
150+
"repositoryName": "<repo>",
151+
"imageDigest": "<digest>",
152+
"imageTag": "<tag>",
153+
"registryId": "<account>"
154+
}
155+
}
156+
```
157+
158+
> **Note:** Use exact field names in the `data` object (camelCase: `repositoryName`, `imageTag`, `imageDigest`). The registry URL is automatically extracted from the `source` field.
159+
122160
#### Example Terraform Configuration
123161

124162
See `config/examples/cloudevents/terraform/` for a complete Terraform module that sets up:

0 commit comments

Comments
 (0)