Unresolved resource dependencies [DefaultSchedule] in the Resources block of the template

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP



Unresolved resource dependencies [DefaultSchedule] in the Resources block of the template



I am working with the cloudformation script to create AWS Data Pipeline. I have created the script according to the documentation but I am facing 1 error i.e.



Template validation error: Template format error: Unresolved resource
dependencies [DefaultSchedule] in the Resources block of the template



Here is the resources part of my script:


Resources:
DataPipelineForS3Backup:
Type: AWS::DataPipeline::Pipeline
Properties:
Name:
Ref: S3BackupDataPipeline
Description:
Ref: S3BackupDataPipeline
Activate: 'true'
ParameterObjects:
- Id: myAwsCliCommand
Attributes:
- Key: description
StringValue: Dp command to run
- Key: type
StringValue: String
ParameterValues:
- Id: myAwsCliCommand
StringValue:
Ref: AwsCliCommand
PipelineObjects:
- Id: DefaultSchedule
Name: Every 1 day
Fields:
- Key: type
StringValue: Schedule
- Key: period
StringValue: 1 Day
- Key: startDateTime
StringValue: 2018-08-08T19:00:00
- Id: Default
Name: Default
Fields:
- Key: failureAndRerunMode
StringValue: CASCADE
- Key: type
StringValue: Default
- Key: resourceRole
StringValue:
Ref: S3BackupResourceRole
- Key: pipelineLogUri
StringValue:
Ref: S3BackupDpLogUri
- Key: role
StringValue:
Ref: S3BackupDpRole
- Key: scheduleType
StringValue: cron
- Key: schedule
StringValue:
Ref: DefaultSchedule



Can anyone tell me what's going on with the script? Thanks




1 Answer
1



First, writing your script in YAML you should be very carefull to the indentation to avoid errors. It should be like :


Resources:
DataPipelineForS3Backup:
Type: AWS::DataPipeline::Pipeline
Properties:
Name:
...



Also, as I understand you are trying to get the reference of one of the PipelineObjects. To do so, unstead of Ref: DefaultSchedule you should use RefValue: DefaultSchedule


Ref: DefaultSchedule


RefValue: DefaultSchedule



Please see the example in documentation : https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-datapipeline-pipeline.html#w2ab2c21c10d332c13






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

Firebase Auth - with Email and Password - Check user already registered

Dynamically update html content plain JS

How to determine optimal route across keyboard