Skip to content
This repository was archived by the owner on Oct 19, 2023. It is now read-only.
This repository was archived by the owner on Oct 19, 2023. It is now read-only.

Convection detects re-ordered scalar resources as a diff #215

Description

@tomhart-r7

Description

When doing a convection diff, convection may re-order resources, resulting in a configuration that is correct, but a diff that contains extra noise. This means the developer must carefully read a diff to be satisfied that it is correct. Eventually this will cause someone to miss an error.

Expected behavior

When I add a new resource, I see only Create statements, and not a list of idempotent Update statements.

Observed behavior

When I add a new resource, I see a Create statements buried in a list of idempotent Update statements.

Steps to Reproduce

  1. Create a stack s3buckets whose template contains a single s3_bucket resource.
  2. Converge the s3buckets stack.
  3. Add two s3_bucket_policy resources linked to the bucket to the s3buckets stack.
  4. Converge the s3buckets again (notice only Create events being emitted).
  5. Add a new s3_bucket_policy between the other two in your convection template.
  6. Notice that there are updates to the second stack and a new create.

The expected behavior would be that only the new policy get printed as create but since the policy elements are scalar and the order changes we interpret it as a diff.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions