Updated : I use Fn::Transform "AWS::Include" to solve it.
#JobDefinition
TaskProperties:
Containers:
- Name: TestContainer01
Fn::Transform: # this is the "Secrets, parse only it value did not work
Name: "AWS::Include"
Parameters:
Location: "s3://xxx/secretfile.yaml"
#secretfile.yaml -> i got error if i do not parse entire Secrets object
Secrets
- Name: APP_MODE_ENV
ValueFrom: "arn:aws:secretsmanager:ap-northeast-1:123456789:secret:dev/test-us7Vjm:APP_MODE_ENV::"
- Name: APP_API_DATABASE_HOST
ValueFrom: "arn:aws:secretsmanager:ap-northeast-1:123456789:secret:dev/test-us7Vjm:APP_API_DATABASE_HOST::"
...
I got below error, so i needed to parse entire "Secrets" object.
Transform AWS::Include failed with: The specified S3 object's content should be valid Yaml/JSON