Fix Config rule tags and restructure Slack alerts#106
Merged
Conversation
- Config rule: check for `service` tag instead of `project` (matches default_tags) - Slack alerts: service name in header instead of generic "Resource" - Slack alerts: resource shown first in fields, action moved lower - Slack alerts: "triggered by" removed from source line, actor moved to footer - Slack alerts: resource tags (team, service, commit, etc.) shown in footer - Compliance alert text: updated to reference correct tags
Terraform Plan🚧 Changes detected — Plan: 5 to add, 3 to change, 0 to destroy. Plan outputLLM ReviewRisk: 🟢 LOW Plan adds cost analytics infrastructure (BCM Data Exports, Glue Crawler) and updates Lambda functions and Config rules with no destructive changes.
|
Alexanderamiri
added a commit
that referenced
this pull request
May 9, 2026
## Summary
**Config rule fix:**
- Changed `tag1Key` from `project` to `service` — `default_tags` sets
`service`, not `project`. This was causing false-positive untagged
resource alerts on every platform resource.
**Slack alert restructuring:**
- Service name now in the header (e.g. `:package: S3 Created (CI/CD)`
instead of `:package: Resource Created (CI/CD)`)
- Resource shown first in the fields grid, action moved lower
- "triggered by {actor}" removed from source line — actor now in footer
- Footer enriched with resource tags (team, service, commit, repo,
environment) when available from CloudTrail
- Compliance alert text updated to reference `service, team, managed-by`
**Before:**
```
:package: Resource Created (CI/CD)
Source: javaBin/platform / 23f03cd / run (triggered by Alexanderamiri)
Action: CreateBucket | Resource: javabin-cur-553637109631 | Created by: javabin-ci-infra | Region: eu-central-1 | Service: S3
AWS Account 553637109631 | eu-central-1 | 2026-03-26T21:51:29Z
```
**After:**
```
:package: S3 Created (CI/CD)
Source: javaBin/platform / 23f03cd / run
Resource: javabin-cur-553637109631 | Est. Cost: $0.022/GB/mo | Action: CreateBucket | Region: eu-central-1
AWS Account 553637109631 | eu-central-1 | 2026-03-26T21:51:29Z
By: javabin-ci-infra (CI/CD)
team=platform | service=platform | repo=javaBin/platform
```
## Test plan
- [ ] `terraform validate` passes
- [ ] Deploy via CI, check that new resource alerts have service in
header
- [ ] Verify no more false-positive untagged resource alerts for
platform resources
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Config rule fix:
tag1Keyfromprojecttoservice—default_tagssetsservice, notproject. This was causing false-positive untagged resource alerts on every platform resource.Slack alert restructuring:
:package: S3 Created (CI/CD)instead of:package: Resource Created (CI/CD))service, team, managed-byBefore:
After:
Test plan
terraform validatepasses