orange-byte-86458
06/30/2021, 11:40 PMpulumi state delete
to not support resource deletion if it has children. I’m trying to delete a k8s.yaml.ConfigFile
, which subsequently expands into ~100 k8s resources and deleting them one by one manually is just not feasible..little-cartoon-10569
06/30/2021, 11:43 PMorange-byte-86458
06/30/2021, 11:51 PMbored-oyster-3147
06/30/2021, 11:53 PMpulumi destroy --target {urn} --target-dependents
? Or is your intention to alter state and not actually destroy anything?orange-byte-86458
06/30/2021, 11:55 PMdestroy
won’t work 🙂bored-oyster-3147
06/30/2021, 11:56 PMpulumi refresh
resolve the discrepancies between state and reality?orange-byte-86458
06/30/2021, 11:56 PMk8s.yaml.ConfigFile
better-shampoo-48884
07/01/2021, 10:02 AM--target-dependents
λ pulumi destroy --target urn:pulumi:stage.infra.customer::baseline-infra::dep:components:provider$dep:components:group$dep:components:network::Net --target-dependents
Previewing destroy (stage.infra.customer):
Type Name Plan Info
pulumi:pulumi:Stack baseline-infra-stage.infra.customer
└─ dep:components:network Net 1 error
Diagnostics:
dep:components:network (Net):
error: Cannot delete parent resource 'urn:pulumi:stage.infra.customer::baseline-infra::dep:components:provider$dep:components:group$dep:components:network::Net' without also deleting child 'urn:pulumi:stage.infra.customer::baseline-infra::dep:components:provider$dep:components:group$twin:components:network$azure-native:network:VirtualNetwork::<vnet>-<region>'.
create: boolean
flag - I just flip the create to false and it will remove whatever has been created from the stack.. but this doesn't resolve Maksim's issue - there's no way to remove something from a stack, let's say if something screwed up and the stack doesn't represent reality anymore (and a refresh won't work as mentioned) and it needs to be fully re-adopted or simply no longer managed by pulumi.. i.e. a pulumi destroy won't work when you just need it removed from the state since the original resource may not exist.