convection icon indicating copy to clipboard operation
convection copied to clipboard

Resource redefination should not be allowed

Open athompson-r7 opened this issue 9 years ago • 2 comments

For example the following should throw an error or some kind.

rds_subnet_group 'VPCDBSubnetGroup' do
  description 'RDS Subnet Group for the Razor VPC'
  subnet stack.get('vpc', 'RDSSubnets')
end

rds_subnet_group 'VPCDBSubnetGroup' do
  description 'RDS Subnet Group for the Razor VPC'
  subnet stack.get('vpc', 'RDSSubnets')
end

athompson-r7 avatar Aug 13 '15 18:08 athompson-r7

I started looking into this in 2a9d399 and 57786fe. I realised that we call the resource methods twice. Once when loading the stack and once when rendering the template (calling #to_json. Check out the two commits for some more context.

erran-r7 avatar Sep 23 '16 15:09 erran-r7

@jmanero-r7 may have some context as to why it is done this way.

athompson-r7 avatar Sep 23 '16 15:09 athompson-r7