many-psychiatrist-74327
05/19/2021, 7:41 PMk8s.yaml.ConfigFile
.
In simplified terms, I have two yaml files: foo.yaml
and bar.yaml
, each of which defines multiple resources. The resources in bar.yml
depend on those in foo.yaml
. Thus, my pulumi (typescript) code looks something like:
const foo = new k8s.yaml.ConfigFile("foo", { file: "foo.yaml" });
const bar = new k8s.yaml.ConfigFile("bar", { file: "bar.yaml" }, { dependsOn: foo });
however, when pulumi runs the update, it starts creating the resources under bar
first.. and of course they fail. it actually starts retrying them 5 times, and sometimes they’ll eventually succeed because the resources in foo
got created in the meantime, but the behavior is non-deterministic and fails very often.
Do you know why pulumi isn’t waiting on foo
resources to be created before creating the resources in bar
?k8s.yaml.ConfigFile
is a CollectionComponentResource
.. is that not an acceptable “Resource” to pass as a value for dependsOn
?dependsOn: foo.resources
dependsOn: foo.resources.apply((m) => Object.values(m))
seems overly complex for a seemingly common use-case, but let’s seecolossal-australia-65039
05/19/2021, 8:14 PMmany-psychiatrist-74327
05/19/2021, 8:18 PMdependsOn: chart
or dependsOn: chart.resources.apply((m) => Object.values(m))
?.resources.apply(…)
approach and it seems to have workedcolossal-australia-65039
05/19/2021, 8:20 PMchart
variablegorgeous-egg-16927
05/19/2021, 10:10 PM