You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 25, 2021. It is now read-only.
The process of importing existing resources from a provider into a crossplane resource is quite tedious and a bit dangerous. The crossplane resource must match exactly all the properties to the existing resource from the provider. If the props don't exactly match; the resource will be modified to match what the crossplane resource says. If one were to accidentally omit a property then that property will be removed and/or set to its default instead of what it should be.
In the example above, if I were to forget to add the tags made by cloudformation, then the resource would get disassociated from the cloudformation stack and bad things would happen. Even worse, what if the cidrBlock was typed in wrong. . . Importing from the CLI would prevent a person from any dumb human mistakes.
The text was updated successfully, but these errors were encountered:
Thanks for raising this @kferrone. This sounds very similar to our thinking in crossplane/crossplane#1093. I think this repository is the right place for the issue, so I'm going to close the older one and mark it as a duplicate. Future readers - please note the issue I'm about to roll into this one has some good context on how this might be built.
The Issue
The process of importing existing resources from a provider into a crossplane resource is quite tedious and a bit dangerous. The crossplane resource must match exactly all the properties to the existing resource from the provider. If the props don't exactly match; the resource will be modified to match what the crossplane resource says. If one were to accidentally omit a property then that property will be removed and/or set to its default instead of what it should be.
here are the docs on importing, which in my opinion are a little lite on the specifics: Crossplane Import Existing Resources
Suggested Solution
Would be nice to have the Crossplane CLI make the imported resource yaml for me.
I imagine a command like:
kubectl crossplane import aws vpc MyCoolVPC
The command would take a few different kinds of params like name, id, or ARN.
kubectl crossplane import aws vpc vpc-123abc456def
Then the generated output would be something like:
In the example above, if I were to forget to add the tags made by cloudformation, then the resource would get disassociated from the cloudformation stack and bad things would happen. Even worse, what if the cidrBlock was typed in wrong. . . Importing from the CLI would prevent a person from any dumb human mistakes.
The text was updated successfully, but these errors were encountered: