:boom: is it normal for updating/removing the prov...
# general
💥 is it normal for updating/removing the provider option to cause a wipe of all resources from the cloud? the resources were previously created using
provider: runtimeProvider
but then that option was removed in favour of configuring the default provider with the same settings as the runtime-created provider... then when I next ran
, all resources were replaced which effectively wiped them because when you (1) create with same ID as new resource, then (2) delete old resource which has same ID, you're effectively deleting it
this could also have something to do with kubernetes, because the create-replacement + delete-replaced loop happened on a Namespace, which I think may have resulted in all resource types inside that namespace getting deleted
If you change the URN of the provider, it'll re-create all the resources. I don't think this is a great behaviour but..
use an alias
Will that work when it’s the provider that changed? Ie. going from a provider defined at runtime, to using the default provider (same provider settings)
I only see name, type, parent, stack and project but no way to spec the old provider URN
you alias the provider
The default provider can be aliased? It would need to be done in the yaml though since there is no provider created in the runtime program when using the default
I’m going the other way from your example, ie. From - runtime defined in code To - using default provider with same settings moved to the stacks yaml file
I can see how your example works for someone going from default to runtime provider, but I’m going the opposite direction Specifically because I kept having issues where I would forget to add the provider option when creating new resources
The reason I was creating the provider in code previously was because it needed a stack references to configure properly (kubernetes and Kafka) But I created a shell script that copies the outputs from the infra stack into the yaml file of the app stack, so that I can have the default provider configured properly and not have to keep setting the explicit provider at every resource constructor
ah, I understand