Skip to content

State snapshots have inconsistent ordering for resources differing only in module address #21552

@a13xb

Description

@a13xb

When I do terraform refresh, the state file is rewritten each time, randomly reordering all resources, even with -parallelism=1, creating large diffs between the state file and its backup.

Terraform Version

Terraform v0.12.0
+ provider.aws v1.60.0-dev20190216h00-dev

Expected Behavior

Resource order changes arbitrarily.

Actual Behavior

Resources are sorted, so the order is preserved.

Steps to Reproduce

Take any semi-complicated configuration (I have multiple resources in multiple AWS regions) and run terraform refresh.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugconfirmeda Terraform Core team member has reproduced this issuecore

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions