aws-cloudformation / aws-cloudformation/cloudformation-coverage-roadmap

AWS::Events::Rule - GetAtt for Rule Name

Open
#1,949 0 comments 1 reaction 0 assignees View on GitHub
enhancement
Dominant language
No language data
Stars
1.1k
Forks
62
PR merge metrics
No merged PRs in 30d

Description

### Name of the resource

AWS::Events::Rule

### Resource name

_No response_

### Description

For `AWS::Events::Rule`, CloudFormation [supports](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-rule.html#aws-resource-events-rule-return-values) `!Ref` to return the Rule ID and `!GetAtt` to return the Rule `Arn`.

There are cases where the Rule's name is required. For example, CloudWatch metrics for `AWS::Events::Rule` use the rule name as a dimension. The name can be extracted from the Rule's ID, which takes format `|`. Given Rule `MyEventBridgeRuleResource`, we get the name like as follows:

```yaml
!Select [1, !Split ['|', !Ref MyEventBridgeRuleResource]]
```

Whilst the above is a sufficient workaround for now, may `GetAtt` be extended to support name retrieval in addition to ARN?

```yaml
!GetAtt MyEventBridgeRuleResource.Name
```

Contributor guide

Open the contributing guide

Research direction

Start with the issue's AWS::Events::Rule resource and the linked CloudFormation return-values documentation. Investigate where CloudFormation resource attributes are defined and how GetAtt support is assessed; the work is done when Name retrieval is supported or the requested coverage decision is recorded.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws
Domain
cloud
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.