This message was deleted.
# general
s
This message was deleted.
m
to be clear, let’s say I have a file named `test.yaml`; it defines resources
foo
and
bar
, and I want to apply it to clusterA and clusterB. even if I do:
Copy code
new k8s.yaml.ConfigFile(
  "clusterA-res",
  { file: "test.yaml" },
  { provider: clusterAProvider }
);
new k8s.yaml.ConfigFile(
  "clusterB-res",
  { file: "test.yaml" },
  { provider: clusterBProvider }
);
pulumi still wants to create two resources named
foo
and two named
bar
, so it fails. Of course, I could create copies of
test.yaml
and rename everything, but that’s obviously undesirable. Using a transformation like this didn’t work either:
Copy code
new k8s.yaml.ConfigFile(
  "clusterA-res",
  { file: "test.yaml" },
  {
    provider: clusterAProvider,
    transformations: [(obj: any) => {
      obj.name = `clusterA-${obj.name}`;
      return obj;
    }],
  }
);
pulumi seems to ignore the renaming