What I get, I some cases you need extra validation, like in the AccountTag, but most of the places you will have the exactly same thing:
open class Tag {
Key: String|Mapping
Value: String|Mapping
}
Having multiple classes to do the same thing makes it impossible to use something like "default tags" for the resources, what would be very useful to create tags for the environment or similar repetitive tags.
Currently, if you try to do it, you get the error:
The problem is that tags are modeled and implemented differently per resource, so I'm not sure if we can effectively abstract them out to a higher level definition.
Currently, each resource that accepts tags uses its own typing:
https://github.com/aws-cloudformation/cloudformation-pkl/blob/main/package/aws/organizations/account.pkl
https://github.com/aws-cloudformation/cloudformation-pkl/blob/main/package/aws/certificatemanager/certificate.pkl
https://github.com/aws-cloudformation/cloudformation-pkl/blob/main/package/aws/apigatewayv2/api.pkl
https://github.com/aws-cloudformation/cloudformation-pkl/blob/main/package/aws/s3/bucket.pkl
What I get, I some cases you need extra validation, like in the AccountTag, but most of the places you will have the exactly same thing:
Having multiple classes to do the same thing makes it impossible to use something like "default tags" for the resources, what would be very useful to create tags for the environment or similar repetitive tags.
Currently, if you try to do it, you get the error: