(aws-fis): MapProperties generate empty CFN output
See original GitHub issueI’m trying to generate a CfnExperimentTemplate
with an CfnExperimentTemplate.ExperimentTemplateActionProperty
and a CfnExperimentTemplate.ExperimentTemplateTargetProperty
. I define it as follows:
const action: fis.CfnExperimentTemplate.ExperimentTemplateActionProperty = {
actionId: 'aws:ec2:stop-instances',
parameters: { startInstancesAfterDuration: 'PT1M' },
targets: { Instances: 'myInstance'}
}
const target: fis.CfnExperimentTemplate.ExperimentTemplateTargetProperty = {
resourceType: 'aws:ec2:instance',
resourceTags: { env: 'DEV' },
selectionMode: 'COUNT(1)'
}
const template = new fis.CfnExperimentTemplate(this,'fis-template', {
description: 'My first Template',
roleArn: role.roleArn,
stopConditions: [
{ source: 'none' }
],
tags: {},
actions: {
'TerminateInstances' : action
},
targets: {
'myInstance': target
}
});
when doing a cdk synth
this results in the following
Type: AWS::FIS::ExperimentTemplate
Properties:
description: My first Template
roleArn:
Fn::GetAtt:
- fisrole33E76559
- Arn
stopConditions:
- source: none
tags: {}
targets:
myInstance:
resourceTags: {}
resourceType: aws:ec2:instance
selectionMode: COUNT(1)
actions:
TerminateInstances:
actionId: aws:ec2:stop-instances
parameters: {}
targets: {}
note the empty resourceTags
in the targets
as well as several other properties being empty (e.g. actions.TerminateInstance.targets
)
What did you expect to happen?
The properties I define in CDK should all show up in CFN.
Environment
- CDK CLI Version : 1.100.0
- Framework Version: 1.100.0
- Node.js Version: 14.16.1
- OS : macOs Big Sur
- Language (Version): TypeScript
This is 🐛 Bug Report
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:15 (13 by maintainers)
Top Results From Across the Web
Outputs - AWS CloudFormation
Return one or more values by defining outputs in the Outputs section of an AWS CloudFormation template.
Read more >Property Handler cannot be empty - The following resource(s ...
Am trying to create lamda function using cloudformation. While creating stack am getting error like below. I have pasted my template below.
Read more >With cfn-lint - Serverless Rules
If the template fulfills the requirements for all rules, cfn-lint will return an empty output. Otherwise, cfn-lint will output recommendations.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
wrote a quick JSON schema for the structure of CloudFormation Resource Specifications and caught all the
PropertyTypes
missing eitherProperties
orDocumentation
:(click to expand)
the property types with only documentation links and no property information are all CloudFormation Registry resource types and the rest all aren’t CloudFormation Registry resource types
the CloudFormation Registry resource schema conversion issue should be prioritized since types are migrating to that framework
JSON schema:
Apologies @peterwoodworth , you were right.