Closed Bharath509 closed 8 months ago
Yeah, This is a primary use case that needs to be provided, deeply disappointed if there is no way to achieve this scenario
You can do this, using the below format. Fn::Sub
lets us specify the GetAtt
like ${MskCluster.Arn}
, where MskCluster
is the Logical ID of the resource. For more information on this, see here.
Resources:
CommandRunner:
Type: AWSUtility::CloudFormation::CommandRunner
Properties:
Command:
Fn::Sub: |
echo ${MskCluster.Arn} > /command-output.txt
LogGroup: my-cloudwatch-log-group
Role: MyEC2InstanceProfile
I'm creating msk using cloud formation template, SInce msk resource in cloud formation only gives msk arn as output, I ran an was command to get the bootstrap broker URL, But when running the command I'm not able to refer output from the msk resource (!GetAtt MskCluster.Arn)
Please help me fix this