I have some CRDs that are implemented using a `Con...
# kubernetes
s
I have some CRDs that are implemented using a
ConfigGroup
. It’s imperative that these CRDs are not deleted so that the underlying resources preserved and continue to function. I recently renamed some directories and files in the repo, and now pulumi wants to delete each
ConfigFile
associated with the`ConfigGroup`. The preview does not show deletion of the underlying CRDs, but as I understand it the
ConfigFile
is the parent of these resources. Is this merely the deletion of the reference to the YAML file, or will the CRDs be affected?
g
I don’t know the answer to that off the top of my head, but I’d guess that they would be deleted. I think you should be able to fix it by setting aliases on those ConfigFile resources such that the name points to the old file location. This tells the engine that the files are the same, and only the name/location changed.
s
the ConfigFiles are generated via the ConfigGroup. Would the alias apply to the ConfigGroup resource itself? Or would I add the alias directly to the stack and re-import?
for each individual configfile
g
Oh, hmm. The alias would need to be applied to the ConfigFile, but you don’t have direct control of that with a ConfigGroup. I’m not actually sure what will happen without testing it. Hopefully it will detect that the actual resources haven’t changed, but I need to verify that.
Ok, I just tested it locally by moving a file to a different directory, and it didn’t change the resources themselves.
I think you should be fine to proceed, but you might want to check for yourself on a dev stack or similar
s
ok thanks!