sparse-intern-71089
04/30/2021, 9:46 PMmany-psychiatrist-74327
04/30/2021, 9:55 PMfoo
and bar
, and I want to apply it to clusterA and clusterB.
even if I do:
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:
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