Replies: 1 comment 1 reply
-
|
did. you ever get this figured out? Having very similar issues.. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone,
I'm trying to refactor a resource, just moving one table from one stack to another one and I have the feeling that the detection is way too rigid.
Here is the diff between the template on CloudFormation (source) and the synth'd stack (target)
{ + "TrackingTable170A6688": { - "TrackingStatefulTrackingTable4714DF64": { "Type": "AWS::DynamoDB::Table", "Properties": { "AttributeDefinitions": [ { "AttributeName": "user_sub", "AttributeType": "S" }, { "AttributeName": "client", "AttributeType": "S" } ], "BillingMode": "PAY_PER_REQUEST", "DeletionProtectionEnabled": false, "GlobalSecondaryIndexes": [ { "IndexName": "byClient", "KeySchema": [ { "AttributeName": "client", "KeyType": "HASH" } ], "Projection": { "ProjectionType": "ALL" } } ], "KeySchema": [ { "AttributeName": "user_sub", "KeyType": "HASH" } ], "Tags": [ - { - "Key": "feature", - "Value": "tracking" - }, - { - "Key": "Name", - "Value": "tracking" - }, { "Key": "product", "Value": "database" }, + { + "Key": "service", + "Value": "users" + }, { "Key": "stage", "Value": "dev" } ] }, "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete", "Metadata": { + "aws:cdk:path": "Dev/Users/TrackingTable/Resource", - "aws:cdk:path": "Dev/Stateful/TrackingStateful/TrackingTable/Resource", "cdk_nag": { "rules_to_suppress": [ { "reason": "CDK managed", "id": "AwsSolutions-IAM4", "applies_to": [ "Policy::arn:<AWS::Partition>:iam::aws:policy/CloudWatchAgentServerPolicy", "Policy::arn:<AWS::Partition>:iam::aws:policy/CloudWatchLambdaInsightsExecutionRolePolicy", "Policy::arn:<AWS::Partition>:iam::aws:policy/service-role/AmazonAPIGatewayPushToCloudWatchLogs", "Policy::arn:<AWS::Partition>:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", "Policy::arn:<AWS::Partition>:iam::aws:policy/service-role/AWSLambdaVPCAccessExecutionRole", "Policy::arn:<AWS::Partition>:iam::aws:policy/service-role/AWSAppSyncPushToCloudWatchLogs" ] }, { "reason": "CDK managed", "id": "AwsSolutions-IAM5" } ] } } } }The command
cdk --profile main-dev refactor "Dev/Stateful" "Dev/Users" --unstable=refactor --dry-rungives me the following output:There is something that I fundamentally don't understand here. I've also tried with
--override-fileto no avail.If tags and metadata are taken into account for the matching algo, I have the feeling it should not, especially when tags can be applied at the stack level down the whole hierarchy, it feels counter productive.
Any idea of what I'm doing wrong?
Thanks everyone!
Beta Was this translation helpful? Give feedback.
All reactions