question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Tags not applied to `AWS::Events::Rule`

See original GitHub issue

Tag not applied to AWS::Events::Rule Ressource.

Reproduction Steps

With following Stack:

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:

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. image

Environment

Using CDK 1.15.0


This is 🐛 Bug Report

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:41
  • Comments:25 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
craigsandscommented, Apr 7, 2022

+1

2reactions
argenstijncommented, Feb 7, 2022

any update?

Read more comments on GitHub >

github_iconTop Results From Across the Web

AWS::Events::Rule Tag - AWS CloudFormation
A key-value pair associated with an ECS Target of an EventBridge rule. The tag will be propagated to ECS by EventBridge when starting...
Read more >
amazon web services - Tag events rule AWS - Cloudformation
Cloudformation doesn't support tags for event rules ...
Read more >
AWS::Events::Rule Tag - Amazon CloudFormation
AWS ::Events::Rule Tag ... A key-value pair associated with an ECS Target of an EventBridge rule. The tag will be propagated to ECS...
Read more >
Apply tags to identify and group events | Deep Security
Tags do not alter the data in the events themselves, nor do they allow users to delete events. They are simply extra attributes...
Read more >
SAM Template How to add tags to a Serverless Function ...
Good question. According to this link from the Cloudformation documentation, the AWS::Events:Rule construct that creates the event, only supports tags when ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found