Summary
Add the ability to define service-specific tags for CloudWatch Log Groups created via x-logging, bringing it into alignment with other x-* features like x-alarms and x-dynamo.
Current Limitation
Currently, when defining x-logging for a service, there is no way to add service-specific tags to the CloudWatch Log Group. Global tags from x-tags are applied, but additional service-level tags cannot be specified, unlike other x-* resources (x-alarms, x-dynamo, etc.) which support Properties.Tags.
Discussed Solutions
Option 1: Shorthand Syntax (Simpler)
Add direct tag support at the x-logging level:
services:
my-app:
x-logging:
RetentionInDays: 30
Tags:
- Key: Environment
Value: production
- Key: Sensitivity
Value: high
Option 2: Full LogGroup Support (More Flexible)
Support full CloudFormation properties and lookup capabilities:
services:
my-app:
x-logging:
LogGroup:
Properties:
RetentionInDays: 30
Tags:
- Key: Environment
Value: production
# OR
Lookup:
Tags:
- Key: Name
Value: existing-log-group
Personal preference
Implement option 2:
- When
LogGroup is defined, expect full CFN Properties or Lookup syntax
Expected Behaviour
- Service-specific tags should be merged with global
x-tags
- Tags from
x-logging should supplement (not replace) global tags
- Behaviour should be consistent with other
x-* features
Benefits
- Consistency: Aligns
x-logging with the established pattern used by newer x-* features
- Flexibility: Enables advanced Log Group configurations (KMS encryption, confidentiality policies, etc.)
- Resource Reuse: Lookup functionality would allow reusing existing Log Groups with tag-based discovery
- Governance: Enables service-specific tagging for cost allocation, compliance, and security classification
Related Issue
Convert from bug report #820
Summary
Add the ability to define service-specific tags for CloudWatch Log Groups created via
x-logging, bringing it into alignment with otherx-*features likex-alarmsandx-dynamo.Current Limitation
Currently, when defining
x-loggingfor a service, there is no way to add service-specific tags to the CloudWatch Log Group. Global tags fromx-tagsare applied, but additional service-level tags cannot be specified, unlike otherx-*resources (x-alarms,x-dynamo, etc.) which supportProperties.Tags.Discussed Solutions
Option 1: Shorthand Syntax (Simpler)
Add direct tag support at the
x-logginglevel:Option 2: Full LogGroup Support (More Flexible)
Support full CloudFormation properties and lookup capabilities:
Personal preference
Implement option 2:
LogGroupis defined, expect full CFN Properties or Lookup syntaxExpected Behaviour
x-tagsx-loggingshould supplement (not replace) global tagsx-*featuresBenefits
x-loggingwith the established pattern used by newerx-*featuresRelated Issue
Convert from bug report #820