-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Abstractions between CloudFormation templates and resource registry #5
Comments
So the way I think about this particular dimension is this; a Stack is a set of Resources. When we create a stack, we are really creating a set of resources. Likewise, deleting a stack is asking that the set of resources be deleted. So... As such, I don't believe So - a Resource Provider shouldn't care about CloudFormation's |
I get that. But if the Resource Provider is leaving cruft behind, as the proposed ResourceType resource provider would (and as the Lambda version publisher does), what happens then? Shouldn't there be a mechanism that can alert users to this fact, and could a forced delete-retain serve as that mechanism? |
think |
Re: deletion I agree with Ben, in the sense that Resource Providers should not leave things behind when a Delete is called. If the resource provider only manages one thing (as it probably should), this is also an implied part of the contract: from the docs:
Regarding handlers:
I agree. But that should not expose the different kind of policies to the provider, the provider should not have to care why the delete is not triggered, or why a snapshot might be triggered. So, I'd expected one handler for The UpdatePolicy is trickier, as those are far less generic. |
Some context from @rjlohan:
I get the separation between stack-level concerns and resources. And I get that the registry should model all resources, not just AWS service resources. But there are semantics in CloudFormation templates that seem useful to model in resources.
For example, I expect that when I delete a stack, the resources owned by the stack should also be deleted, unless I put a
DeletionPolicy: Retain
on them. If a resource is by design leaving things behind when the update or delete handler is called, I feel that should be surfaced to the user through the template in some way, because that's unexpected behavior. One way to do this would be for a resource to indicate it does this, and for CloudFormation to requireDeletionPolicy: Retain
for those resources.The text was updated successfully, but these errors were encountered: