Anyway to hide unchanged resources when using --no...
# general
c
Anyway to hide unchanged resources when using --non-interactive flag ? seems like it will print all resources. I try to avoid --diff as it's too verbose as well..
l
That's not the behaviour I see. It only displays changed resources, and any ancestor resources.
Are you passing any other parameters, like --show-sames?
c
Thanks for the reply. Nope just pulumi preview --non-interactive. As shown below, there's only 1 change to accepter-provider . but all the resources are being presented.
Copy code
pulumi preview --non-interactive
Previewing update (infra.devops-tools.main):

    pulumi:pulumi:Stack main-infra.devops-tools.main running
    awsx:x:ec2:Vpc mainVpc
    devopstools:infra:persistencelayer pl
    infra:devopstools:networkinglayer networking
 ~  pulumi:providers:aws accepter-provider update [diff: +profile]
    or:common:peering nonbridge-peering
    or:networking:simplevpc mainVpc
    awsx:x:ec2:Subnet mainVpc-public-ap-southeast-1a
    awsx:x:ec2:Subnet mainVpc-private-ap-southeast-1c
    awsx:x:ec2:Subnet mainVpc-public-ap-southeast-1c
    awsx:x:ec2:Subnet mainVpc-isolated-ap-southeast-1a
I have also tried a new project that only has a s3 bucket. As shown below. the bucket is shown in non-interactive flag even though there's no change. I've tested this in windows and linux.
Copy code
PS G:\code\iac\infra\sandbox\main> pulumi preview --non-interactive       
Previewing update (infra.sandbox.main):

    pulumi:pulumi:Stack sandbox-infra.sandbox.main running
    aws:s3:Bucket testing-iac
    pulumi:pulumi:Stack sandbox-infra.sandbox.main

Resources:
    2 unchanged

warning: A new version of Pulumi is available. To upgrade from version '3.2.1' to '3.3.0', visit <https://pulumi.com/docs/reference/install/> for manual instructions and release notes.
PS G:\code\iac\infra\sandbox\main> pulumi preview
Previewing update (infra.sandbox.main):
     Type                 Name                        Plan
     pulumi:pulumi:Stack  sandbox-infra.sandbox.main

Resources:
    2 unchanged
l
Maybe an environment variable? Is there one that adds --show-sames?
c
I don't think so. It's a docker linux instance. so it should be pretty clean. I tried in a gitlab CI pipeline as well and it yields the same result.
l
I tried following the source but non-interactives is checked all over the place. It may well do that deliberately. Maybe -y is closer to what you want?
And --skip-preview is the version for up.