https://pulumi.com logo
#aws
Title
m

modern-evening-83482

07/19/2022, 3:16 PM
Hello Everyone, After importing a aws resource(subnet) into pulumi I would like to modify the properties. This leads to replacement. Is this a pulumi thing or an aws thing? I would like to change few properties on the resource...
Copy code
pulumi up
Previewing update (network.staging):
     Type                     Name                                           Plan        Info
     pulumi:pulumi:Stack      pulumi-staging-infrastructure-network.staging              
 +   ├─ pulumi:providers:aws  provider                                       create      
 +-  ├─ aws:ec2:Vpc           vpc-staging                                    replace     [diff: +enableDnsSupport,instanceTenancy~__defaults,protect,provider]
 +-  └─ aws:ec2:Subnet        public_subnet_stvk                             replace     [diff: +assignIpv6AddressOnCreation,enableDns64,enableResourceNameDnsARecordOnLaunch,ena
 
Resources:
    + 1 to create
    +-2 to replace
    3 changes. 1 unchanged
b

billowy-army-68599

07/19/2022, 3:44 PM
it depends what you’re replacing. Usually a replacement is because the AWS API is immutable
in this case yes, the properties are immutable
m

modern-evening-83482

07/19/2022, 4:17 PM
So it will delete and recreate...
b

billowy-army-68599

07/19/2022, 4:31 PM
Yes unfortunately. Can you make that change in the API without a delete and recreate?
m

modern-evening-83482

07/19/2022, 5:59 PM
Not sure maybe can try from the console...But I doubt that aws will let me...Will update you with what i find..thank you..
b

billowy-army-68599

07/19/2022, 6:15 PM
I ask because, if you can do it from the console but not Pulumi, that’s a bug if you can’t do it from the console that confirms it’ll delete/replace is expected behavior
m

modern-evening-83482

07/21/2022, 5:34 PM
thanks, that was it./
4 Views