pplu / cfn-perl

An object model for CloudFormation documents
Other
0 stars 5 forks source link

Package name colission for AWS::S3::Bucket ReplicationTimeValue #67

Closed torrentalle closed 3 years ago

torrentalle commented 3 years ago

In CloudFormation release 17.0.0 a new Resource property called ReplicationTimeValue has been introduced. Since there's other property called ReplicationTime this breaks the logic of resource creation

package Cfn::Resource::Properties::[% subtype.cfn_type %]Value {
  use Moose;
  use MooseX::StrictConstructor;
  extends 'Cfn::Value::TypedValue';
  [% FOR property_name = subtype.properties.keys.sort; property = subtype.properties.${ property_name } %]
  has [% property.name %] => (isa => '[% property.cfn_type %]', is => 'rw', coerce => 1[% IF (property.required) %], required => 1[% END %], traits => [ 'CfnMutability' ], mutability => '[% property.mutability_role %]');
  [%- END %]
}

See travis build https://travis-ci.com/github/torrentalle/cfn-perl/jobs/387143923

pplu commented 3 years ago

I see you've solved it here: https://github.com/pplu/cfn-perl/pull/66/commits/76971b141cb691add16df620f0ee42d22e448684

Looks like a good fix, although you might want to think about having them be:

Cfn::Resource::Properties::Object::[% subtype.cfn_type %]

What do you think?

torrentalle commented 3 years ago

Seems good name. I changed in commit 1362624

pplu commented 3 years ago

This fix has gone into production since it was opened. JFYI: I've just published 0.13 with todays specs.