https://pulumi.com logo
#general
Title
# general
f

fast-dinner-32080

04/10/2020, 9:36 PM
Hey guys, I am creating namespaces using the Rancher2 provider but rancher adds labels to these after creation and I am trying to ignore them. Is there an example of how to do this in .net? I am getting
Copy code
rancher2:index/namespace:Namespace: (update)
  [id=ua-dev]
  [urn=urn:pulumi:stg-k8s-c01::k8s-cluster-projects::rancher2:index/namespace:Namespace::ns]
  [provider=urn:pulumi:stg-k8s-c01::k8s-cluster-projects::pulumi:providers:rancher2::default_1_5_0::5ee76677-bc06-416a-a367-1be4dd7fa198]
~ labels: {
    - <http://cattle.io/creator|cattle.io/creator>        : "norman"
    - <http://field.cattle.io/projectId|field.cattle.io/projectId>: "id"
  }
and I have tried all these but doesn't seem to work. I am probably providing the string incorrect but I am having a hard time finding an example.
Copy code
new CustomResourceOptions
{
    IgnoreChanges =
    {
        {"labels.\"<http://cattle.io/creator|cattle.io/creator>\""}
    }
}

new CustomResourceOptions
{
    IgnoreChanges =
    {
        {"<http://labels.cattle.io/creator|labels.cattle.io/creator>"}
    }
}

new CustomResourceOptions
{
    IgnoreChanges =
    {
        {"labels[<http://cattle.io/creator|cattle.io/creator>]"}
    }
}

new CustomResourceOptions
{
    IgnoreChanges =
    {
        {"labels[\"<http://cattle.io/creator|cattle.io/creator>\"]"}
    }
}