Closed rclark closed 7 years ago
Thanks for looking this over! Going to start a PR.
👋 @rclark
Could I get your stamp of approval/disapproval whenever you get the chance? https://github.com/mapbox/magic-cfn-resources/pull/3 https://github.com/mapbox/magic-cfn-resources/blob/logicalname/lib/build.js#L323-L326
https://github.com/mapbox/magic-cfn-resources/blob/dabccbb2068118687bb1310143dc139152e3da29/lib/build.js#L349
This gets rejected by CloudFormation:
Name
is not valid in this part of a resource. I think that theLogical Name
that gets provided by the caller needs to be used as the Resource Key for each of the resources that.build()
is going to provide.For example, the SpotFleet resource is gonna give you a
AWS::IAM::Role
AWS::Lambda::Function
Custom::SpotFleetFunction
Imagine I want to build a stack with 2 spot fleets. In my final template I can't have a
Resources
block that looks like this:They have to have two different "logical names":
Having the caller provide a
LogicalName
option is the right step to take in order to make this happen -- you just need to apply to the keys for each resource that.build()
is creating.cc @kellyoung