AWSTemplateFormatVersion: '2010-09-09'
Resources:
MyEC2:
Type: "AWS::EC2::Instance"
Properties:
ImageId: ami-1111111
InstanceType: t2.medium
SubnetId: subnet-1231231
KeyName: something
SecurityGroupIds:
- sg-123123
IamInstanceProfile: some-profile
UserData:
Fn::Base64: !Sub |
#!/bin/bash
# Set hostname
/usr/bin/cfn-init -v --stack ${AWS::StackName} --resource MyEC2 --configsets All --region ${AWS::Region}
# Signal the status from cfn-init
/usr/bin/cfn-signal -e $? --stack ${AWS::StackName} --resource MyEC2 --region ${AWS::Region}
Metadata:
AWS::CloudFormation::Init:
configSets:
All:
- DoSomething
DoSomething:
commands:
a_Start:
command: echo 'buba'
After running:
[1] % perun validate test.yml
INFO: Configuration file from the following location will be used: /Users/mpolcik16/.config/perun/main.yaml
INFO: Creating new session. Profile: aol Region: us-east-1
ERROR: invalid YAML template: yaml: line 21: could not find expected ':'
ERROR: Template test.yml is invalid!
This template is valid, so expected behaviour is to pass validation.
Template example:
[1] % perun validate test.yml INFO: Configuration file from the following location will be used: /Users/mpolcik16/.config/perun/main.yaml INFO: Creating new session. Profile: aol Region: us-east-1 ERROR: invalid YAML template: yaml: line 21: could not find expected ':' ERROR: Template test.yml is invalid!