many-lock-25065
01/27/2020, 3:18 PMpulumi up
. Instead, we need one pulumi up
where the import
simply reflects the existing resource, and then another one where we edit the code to change the resource. We've verified this multi-stage flow works, but it feels clunky (currently we have to manually edit the code between the first and second pulumi up). Are there any tricks we can use to combine into a single stage?
One thought was that maybe there is a variable that denotes whether or not the resource is already referenced. Then we could run pulumi twice, and use a switch statement to distinguish the two cases. Feels very hacky though.white-balloon-205
01/27/2020, 5:01 PMkubectl apply
as another workaround for this for example in the Pulumi-EKS package. This also is not ideal - but has worked reasonably well. But it’s not “simple”. See https://github.com/pulumi/pulumi-eks/blob/master/nodejs/eks/cni.ts#L151.
We have a few issues opened tracking ideas on how to support this in a more first-class way.many-lock-25065
01/27/2020, 5:13 PMwhite-balloon-205
01/27/2020, 8:19 PM