aws / aws/aws-cdk

aws-elasticache: Tags automatically added in region where tags are not supported for CfnUserGroup

Open
#25,409 7 comments 0 reactions 0 assignees View on GitHub
@aws-cdk/aws-elasticache bug effort/small p2
Dominant language
TypeScript
Stars
12.9k
Forks
4.6k
Avg merge
2d 3h
Merged PRs (30d)
83

Description

### Describe the bug

Between aws-cdk-lib in version 2.54.0 and 2.77.0 the tagging of the Resource AWS::ElastiCache::UserGroup was introduced. However since the update of the aws-cdk-lib our deployments (of the Elasticache UserGroups) fail with:

```
Properties validation failed for resource abcdgroup2CA6EC0B with message: #: extraneous key [Tags] is not permitted
```

This is what the CFN changes after the update of the aws-cdk-lib look like:

```
testcacheapplicationgroup822A7DA9:
Type: AWS::ElastiCache::UserGroup
Properties:
Engine: redis
UserGroupId: testapp-testenv-testsystem-cdk-11728616
UserIds:
- default28cd8437
- testuser11b4cdcd
+ Tags:
+ - Key: TagOne
+ Value: valueone
+ - Key: TagTwo
+ Value: valuetwo
```

### Expected Behavior

The CDK deployment would also work after the update of the aws-cdk-library from 2.54 to 2.77

### Current Behavior

The CDK/CFN-Deployment fails with the error shown in the description.

### Reproduction Steps

* create a `aws_cdk.aws_elasticache.CfnUserGroup`
* tag this construct or the whole stack with `aws_cdk.Tags.of(sope).add(...)`

### Possible Solution

Our current workaround is to exclude the resource from EVERY tag aspect in the whole CDK code:

```python
aws_cdk.Tags.of(self).add("Environment", "dev", exclude_resource_types=["AWS::ElastiCache::UserGroup"])
```

### Additional Information/Context

_No response_

### CDK CLI Version

2.77.0

### Framework Version

_No response_

### Node.js Version

v18.15.0

### OS

LInux / Mac

### Language

Python

### Language Version

_No response_

### Other information

_No response_

Contributor guide

Open the contributing guide

Research direction

Start with aws_cdk.aws_elasticache.CfnUserGroup and the aws_cdk.Tags aspect used in the reproduction. Check how tags are added to the synthesized AWS::ElastiCache::UserGroup and verify that deployments no longer include unsupported Tags properties for this resource.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, python, 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.