great-sunset-355
05/07/2024, 11:29 AMinputs.__defaults
in the state via code?
cc @red-match-15116 probably requires deep pulumi knowledge.
For the context, I am trying to find the simplest (read without stack surgery) way to migrate lots of projects out of awsx
So far I have a nice flow on how to refactor the code without losing resources.enough-garden-22763
05/07/2024, 1:08 PMgreat-sunset-355
05/07/2024, 1:12 PMgreat-sunset-355
05/07/2024, 1:23 PM__defaults
are really the only thing preventing me from using initialize
method to do rather heavy state transformation.
Here's what I am working on:
original code in the constructor
(awsx creates component resource and urn)
const sg = awsx.ec2.SecurityGroup(...)
new code migrated away from awsx
without aliases.
protected initialize(args: pulumi.Inputs)
const sg = awsx.ec2.SecurityGroup(...) // transformation with retain on delete=true
const sgIdPromise = new Promise((resolve) => sg.id.apply(resolve))
const classicSg = new aws.ec2.SecurityGroup(
"resourceName"
{
name: sg.securityGroup.name
},
{
import: await sgIdPromise
}
enough-garden-22763
05/07/2024, 1:25 PMgreat-sunset-355
05/07/2024, 1:33 PMPulumi Package Schema
- is this accessible from the code somewhere?enough-garden-22763
05/07/2024, 1:48 PMenough-garden-22763
05/07/2024, 1:48 PMgreat-sunset-355
05/07/2024, 2:01 PMred-match-15116
05/07/2024, 7:43 PMred-match-15116
05/07/2024, 7:44 PMgreat-sunset-355
05/08/2024, 5:08 AM