aws-cloudformation / aws-cloudformation-resource-providers-cloudformation

The CloudFormation Resource Provider Package For AWS CloudFormation
https://aws.amazon.com/cloudformation/
Apache License 2.0
48 stars 35 forks source link

ResourceDefaultVersion - added Primary ID TypeArn and made delete han… #19

Closed ugudip closed 3 years ago

ugudip commented 3 years ago
  1. Added Primary ID for ResourceDefaultVersion - TypeArn
  2. Resolved few bugs - version conflicts and exceptions
  3. Made unit test changes, jacoco coverage >80%

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

benkehoe commented 3 years ago

Isn't it useful for resources to have a standardized "Arn" property, so as a user, I don't have to figure out what inevitably-inconsistent naming convention every particular resource provider decided to adopt for their Arn property? (I feel the name about "Name" as a property).

ugudip commented 3 years ago

I made the following changes:

  1. Made "Arn" as the Physical Id for ResourceDefaultVersion which represents the overall type(ex: arn:aws:cloudformation:us-west-2:336098619110:type/resource/Organization-Service-Resource11) and added it as a readOnly property
  2. Changed the current "Arn" to "TypeVersionArn" which represents the Arn of the ResourceVersion. The user should now give "TypeVersionArn" instead of "Arn" in the template to refer ResourceVersion's Arn as a property for ResourceDefaultVersion.
  3. Kept the ResourceVersion's "Arn" as is because it represents the physical Id of the ResourceVersion and makes sense to keep it Arn.
  4. Changed the Unit tests and code formatting.
  5. Added a check to get the latest versionID in perdictArn() - bug fix