Hey folks! I'm using a docker.Container component ...
# general
a
Hey folks! I'm using a docker.Container component and I use labels to trigger restarts in some cases. One thing I noticed is that if I change an existing label, pulumi does see that as a change and triggers container recreation. If I delete an existing labels, the preview function shows no changes. Is this expected behavior? My pulumi version is
v3.205.0
. I'm using pulumi in typescript
n
Do you have an example of your configuration? I tried this on a simple example and deleting a label is causing a resource replacement for me
a
my whole container has a bit too much details which I can't share, but I can try with a simple example and get back to you. The labels I have which are visible in the cloud resources page as well is
Copy code
labels
 [ 
     { 
         "label": "restartTrigger", 
         "value": "1" 
     } 
 ]
When I change the restartTrigger 1 -> 2 and do pulumi preview, it is recongnized as a change. But if I just completely delete the label's field from code and do pulumi preview, it says no changes. Can you send me code snippet you used and didn't reproduce it?
n
oh I see. I tried just removing one of the label entries. I can reproduce it if I remove the entire labels field
👍 1
It looks like this is a core limitation with Terraform providers (which we inherit). These types of blocks cannot be removed. You can create an issue with the [upstream terraform provider](https://github.com/kreuzwerker/terraform-provider-docker), they might be able to modify this field to allow for this. Alternatively as a workaround you can set the label and value to empty strings