https://pulumi.com logo
Title
b

broad-hairdresser-1495

03/04/2021, 12:51 AM
Hi, When running
pulumi up
first time to create AWS ec2 instance with increased root disk and then run again same script with
pulumi up
, pulumi thinks there are changes needed in that instance (this happens only when deploying with increased root disk)
>pulumi up
Previewing update (aws2_rest_s)

     Type                         Name                              Plan       Info
 +   pulumi:pulumi:Stack          aws2_rest-aws2_rest_s             create     3 messages
 +   ├─ aws:ec2:NetworkInterface  aws2-eu1tst-rhtestsuppdb001-eth0  create
 +   └─ aws:ec2:Instance          aws2-eu1tst-test1                 create
>pulumi up
Previewing update (aws2_rest_s)

     Type                 Name                   Plan        Info
     pulumi:pulumi:Stack  aws2_rest-aws2_rest_s              3 messages
 +-  └─ aws:ec2:Instance  aws2-eu1tst-test1      replace     [diff: ~ebsBlockDevices]  <<<this should not be a diff
Do you want to perform this update? details
  pulumi:pulumi:Stack: (same)
    [urn=urn:pulumi:aws2_rest_s::aws2_rest::pulumi:pulumi:Stack::aws2_rest-aws2_rest_s]
    ++aws:ec2/instance:Instance: (create-replacement)
        [id=i-003ff8680bbece029]
        [urn=urn:pulumi:aws2_rest_s::aws2_rest::aws:ec2/instance:Instance::aws2-eu1tst-test1]
        [provider=urn:pulumi:aws2_rest_s::aws2_rest::pulumi:providers:aws::default_3_31_0::41672f54-4965-4cdb-81b5-cced77d0ff83]
      ~ ebsBlockDevices: [
          ~ [0]: {
                  + deleteOnTermination: true
                  + deviceName         : "/dev/sda1"
                  + volumeSize         : 60
                }
        ]
    +-aws:ec2/instance:Instance: (replace)
        [id=i-003ff8680bbece029]
        [urn=urn:pulumi:aws2_rest_s::aws2_rest::aws:ec2/instance:Instance::aws2-eu1tst-test1]
        [provider=urn:pulumi:aws2_rest_s::aws2_rest::pulumi:providers:aws::default_3_31_0::41672f54-4965-4cdb-81b5-cced77d0ff83]
      ~ ebsBlockDevices: [
          ~ [0]: {
                  + deleteOnTermination: true
                  + deviceName         : "/dev/sda1"
                  + volumeSize         : 60
                }
        ]
    --aws:ec2/instance:Instance: (delete-replaced)
        [id=i-003ff8680bbece029]
        [urn=urn:pulumi:aws2_rest_s::aws2_rest::aws:ec2/instance:Instance::aws2-eu1tst-test1]
        [provider=urn:pulumi:aws2_rest_s::aws2_rest::pulumi:providers:aws::default_3_31_0::41672f54-4965-4cdb-81b5-cced77d0ff83]
is there some workaround this issue? or is it a bug?
w

white-balloon-205

03/04/2021, 2:49 AM
That doesnt sound expected. If you have a repro for this, could you open a GitHub issue with details?
c

creamy-minister-70065

03/04/2021, 6:20 AM
Can you please send me the code that you are running for this please
b

broad-hairdresser-1495

03/04/2021, 8:23 AM
create an AWS pulumi project and run
pulumi up
2 times and you will get this on second run:
Type                 Name                   Plan        Info
     pulumi:pulumi:Stack  aws2_rest-aws2_rest_s              1 message
 +-  └─ aws:ec2:Instance  aws2-eu1tst-test1      replace     [diff: ~ebsBlockDevices]
@white-balloon-205 Created on github https://github.com/pulumi/pulumi/issues/6464
c

creamy-minister-70065

03/17/2021, 1:21 PM
const myVpc = new aws.ec2.Vpc("myVpc", {     cidrBlock: "10.0.0.0/16",     tags: {         Name: "DemoVpc",     }, }); const mySubnet = new aws.ec2.Subnet("mySubnet", {     vpcId: myVpc.id,     cidrBlock: "10.0.0.0/16",     tags: {         Name: "DemoSubnet",     }, }); const fooNetworkInterface = new aws.ec2.NetworkInterface("ExcelNetworkInterface", {     subnetId: mySubnet.id,     privateIps: ["10.0.0.100"],     tags: {         Name: "primary_network_interface",     }, }); const fooInstance = new aws.ec2.Instance("fooInstance", {     ami: "ami-008806d238cf70838",     instanceType: "t2.micro",     networkInterfaces: [{         networkInterfaceId: fooNetworkInterface.id,         deviceIndex: 0,     }],     creditSpecification: {         cpuCredits: "unlimited",     }, });