Closed cohalz closed 4 years ago
All parts using Fn::GetAtt will be empty resources by cdk 0.25.3.
here is a short code.
Resources: MyQueue: Type: "@aws-cdk/aws-sqs.Queue" Properties: fifo: true MyLogGroup: Type: AWS::Logs::LogGroup Properties: LogGroupName: Fn::GetAtt: MyQueue.Arn
$ npx cdk -a "npx decdk hello.yml" synth Resources: MyQueueE6CA6235: Type: AWS::SQS::Queue Properties: FifoQueue: true Metadata: aws:cdk:path: hello/MyQueue/Resource MyLogGroup: Type: AWS::Logs::LogGroup Properties: {} CDKMetadata: Type: AWS::CDK::Metadata Properties: Modules: aws-cdk=0.25.2,@aws-cdk/aws-cloudwatch=0.25.3,@aws-cdk/aws-iam=0.25.3,@aws-cdk/aws-kms=0.25.3,@aws-cdk/aws-s3-notifications=0.25.3,@aws-cdk/aws-sqs=0.25.3,@aws-cdk/cdk=0.25.3,@aws-cdk/cx-api=0.25.3,jsii-runtime=node.js/v10.15.2
In addition, Cloudformation of ECS created by CDK will also become an empty resource as well.
~/s/decdktest ❯❯❯ npx cdk -a "npx decdk my-sample-ecs.yml" synth >! my-sample-ecs-cdk.yml The stack my-sample-ecs already includes a CDKMetadata resource ~/s/decdktest ❯❯❯ diff my-sample-ecs.yml my-sample-ecs-cdk.yml 9,12d8 < SourceSecurityGroupId: < Fn::GetAtt: < - AlbSecurityGroup580F65A6 < - GroupId 128,131d123 < ExecutionRoleArn: < Fn::GetAtt: < - TaskDefExecutionRoleB4775C97 < - Arn 137,140d128 < TaskRoleArn: < Fn::GetAtt: < - TaskDefTaskRole1EDB4A67 < - Arn 192,195d179 < Resource: < Fn::GetAtt: < - LogGroupF5B46931 < - Arn 232,235c216 < SecurityGroups: < - Fn::GetAtt: < - AlbSecurityGroup580F65A6 < - GroupId --- > SecurityGroups: [] 260,263d240 < GroupId: < Fn::GetAtt: < - AlbSecurityGroup580F65A6 < - GroupId 311,314c288,289 < - - Fn::GetAtt: < - Alb16C2F182 < - DNSName < - /ui \ No newline at end of file --- > - - /ui >
At least, I confirmed that these functions can pass correctly.
@eladb What about this? Is it in progress?
It's a bug, but we haven't had a chance to look at this.
Stale
All parts using Fn::GetAtt will be empty resources by cdk 0.25.3.
here is a short code.
In addition, Cloudformation of ECS created by CDK will also become an empty resource as well.