aws-controllers-k8s / community

AWS Controllers for Kubernetes (ACK) is a project enabling you to manage AWS services from Kubernetes
https://aws-controllers-k8s.github.io/community/
Apache License 2.0
2.42k stars 255 forks source link

Adopt already generated resource #2165

Closed nicraMarcin closed 1 month ago

nicraMarcin commented 2 months ago

Hi, We are going to switch from Terraform to AWS ACK Operators. AdoptedResource is very helpful in migration but we are luck of adopting created manifests.

When adopter creates manifest, for example bucket, operator starts managing it and we can delete AdoptedResource and use generated Bucket moving it to code removing .status for future use on other cluster and add it to stack of others resources. Sometimes we would like to delete manifest not deleting resource on AWS, for example moving manifests to another cluster. On this new cluster we would like just adopt resources from Bucket manifest which are already created. But when we deploy Bucket manifest it says that resource exist and we need to use AdoptedResource but there is another "but":

Is it any possibility to annotate manifest to be adopted when such resource exists or create new when there is no such resource?

gecube commented 2 months ago

Hi! Totally agree. But is this issue the duplicate of #1381 or no?

nicraMarcin commented 1 month ago

Hi, It could be duplicated 👍 I didn't notice that.

a-hilaly commented 1 month ago

Thank you folks, let's close this one and track this feature in https://github.com/aws-controllers-k8s/community/issues/1381 :) This is currently in the backlog of the ACK team and will be implemented before reinvent.