Skip to content

Support MustCreate management policy to trigger failure when a resource already exists #872

@bobh66

Description

@bobh66

What problem are you facing?

There are scenarios where it is possible to have two Crossplane composites attempting to create the same resource. This can be intentional or it can be an error condition. There is currently no way to force an error when a composite creates an MR that already exists and the new MR MUST NOT overwrite the content of the existing resource.

How could Crossplane help solve your problem?

Define a MustCreate management policy to indicate that the MR must create the desired resource, and if the resource already exists it should not modify it but should instead return an error condition.

This can be implemented in the Managed Resource reconciler by checking for the existence of any create annotations. If the external resource exists but there are no create annotations on the MR, an error should be raised and no further processing of the MR should be performed.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

Status

In Review

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions