Skip to content

(aws-dms): Tags.of(CfnReplicationConfig construct).add({...}) does not work #28862

Closed
@gossandr

Description

@gossandr

Describe the bug

When attempting to add Tags to the CfnReplicationConfig construct, no tags are actually added.

Furthermore, removing the Tags.of() and re-deploying the stack results in an error (presumably from the DMS API?).

Tags.of() does work for other constructs in aws-dms. For example, for the CfnEndpoint construct Tags.of() works as expected.

Expected Behavior

I would expect the tags to be added to the resource.

I would expect after removing Tags.of from the resource construct that I would not get any deployment errors.

Current Behavior

after adding Tags.of() and deploying, no tags are deployed on the replication config resource.

after then removing the Tags.of() and re-deploying, the deploy fails with this error, perhaps related to the dms API itself.

Resource handler returned message: "No modifications requested for replication
config with arn, 'arn:aws:dms:eu-west-1:259363291751:replication-config:RTQ7JQX
ZPNBOBJFNHAVMWAJXLWS35IWZOID6VAI' (Service: DatabaseMigration, Status Code: 400
, Request ID: 2248b0dc-8583-4b56-8f20-5381c630c8f0)" (RequestToken: c316768f-94
3b-0a97-d2ed-550977a3729d, HandlerErrorCode: GeneralServiceException)

Reproduction Steps

export class DmsReplication extends Construct {

  constructor(scope: Construct, id: string, props: DmsReplicationProps) {
    super(scope, id);

    const replication = new CfnReplicationConfig(this, 'rc01', {

      replicationType: 'full-load',


      sourceEndpointArn: 'arn:of:source:endpoint',
      targetEndpointArn: 'arn:of:target:endpoint',

    });
    
    
    Tags.of(replication).add('test', 'value');
  }

Possible Solution

I suspect that this is related to the relative new-ness of the serverless replication support in cloudformation. But I have honestly no idea. 😅

Additional Information/Context

No response

CDK CLI Version

2.123.0 (build a594112)

Framework Version

No response

Node.js Version

v18.2.0

OS

macos Ventura 13.6.3 (22G436)

Language

TypeScript

Language Version

TypeScript 5.2.2

Other information

No response

Metadata

Metadata

Assignees

Labels

@aws-cdk/aws-dmsRelated to AWS Database Migration Service (AWS DMS)bugThis issue is a bug.effort/mediumMedium work item – several days of effortp1

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions