Tags not applied to `AWS::Events::Rule`
- Dominant language
- TypeScript
- Stars
- 12.9k
- Forks
- 4.6k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 83
Description
Tag not applied to `AWS::Events::Rule` Ressource.
### Reproduction Steps
With following Stack:
```typescript
import cdk = require('@aws-cdk/core');
import events = require("@aws-cdk/aws-events");
export class CdkIssueEventsRuleTagsStack extends cdk.Stack {
constructor(scope: cdk.Construct, id: string, props?: cdk.StackProps) {
super(scope, id, props);
const rule = new events.Rule(this, "ScheduleRule", {
schedule: events.Schedule.rate(cdk.Duration.hours(12)),
targets: []
});
cdk.Tag.add(rule, "MyTag", "ThatValue");
}
}
```
Synthesized template is:
```yaml
Resources:
ScheduleRuleDA5BD877:
Type: AWS::Events::Rule
Properties:
ScheduleExpression: rate(12 hours)
State: ENABLED
Metadata:
aws:cdk:path: CdkIssueEventsRuleTagsStack/ScheduleRule/Resource
CDKMetadata:
Type: AWS::CDK::Metadata
Properties:
Modules: aws-cdk=1.15.0,@aws-cdk/aws-events=1.15.0,@aws-cdk/core=1.15.0,@aws-cdk/cx-api=1.15.0,jsii-runtime=node.js/v12.12.0
Condition: CDKMetadataAvailable
[...]
```
In console, the Tags are available.

### Environment
Using CDK 1.15.0
---
This is :bug: Bug Report
Contributor guide
Research direction
Start with the TypeScript reproduction using events.Rule and synthesize the stack to compare the AWS::Events::Rule resource with the reported template. Trace how cdk.Tag.add is handled for that resource type; done means the synthesized resource includes the requested MyTag/ThatValue tags and the behavior is covered by an appropriate test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, typescript
- Domain
- cloud, infrastructure
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100