ecs-watchbot icon indicating copy to clipboard operation
ecs-watchbot copied to clipboard

Cluster parameter does not respect prefixes

Open michaelskahn opened this issue 4 years ago • 3 comments

I'm using the prefix option to deploy multiple watchbot services using a single CFN stack. This works fine for most parameters, but trying to set different values for the cluster results in an error:

Error: Outputs name used more than once: ClusterArn

The ClusterArn appears to be treated differently than the other options in that it isn't prefixed, so defining multiple watchbot services in a single template fails unless the cluster is always the same. Is having multiple clusters within a single stack something that watchbot can support?

michaelskahn avatar Jul 07 '20 21:07 michaelskahn

That should be prefixed. Think you could put together a PR?

rclark avatar Jul 07 '20 23:07 rclark

Sure. I can (I think) preserve existing behavior by setting an overall ClusterArn if and only if all clusters are the same. That avoids a breaking change for downstream consumers that may be relying on the current ClusterArn output value while setting prefixes.

michaelskahn avatar Jul 08 '20 15:07 michaelskahn

Hm, I think that the lack of prefixed output here is a straight-up bug. Yes, it'd be a breaking change, but I think it is better to break the bugged behavior and make a new major version release.

rclark avatar Jul 08 '20 15:07 rclark