sparse-intern-71089
10/19/2021, 8:29 AMprehistoric-activity-61023
10/19/2021, 8:43 AMpulumi stack export
.prehistoric-activity-61023
10/19/2021, 8:44 AMjq
tool.prehistoric-activity-61023
10/19/2021, 8:44 AMpulumi stack export | jq -S .
prehistoric-activity-61023
10/19/2021, 8:46 AMcat
them to jq
🙂
cat some-older-state.json | jq -S . > formatted-some-older-state.json
great-sunset-355
10/19/2021, 8:57 AMjq -S
deep sorting?prehistoric-activity-61023
10/19/2021, 8:58 AMprehistoric-activity-61023
10/19/2021, 8:59 AMprehistoric-activity-61023
10/19/2021, 9:00 AMgreat-sunset-355
10/19/2021, 9:01 AMprehistoric-activity-61023
10/19/2021, 9:02 AMjq
DOES deep sortingprehistoric-activity-61023
10/19/2021, 9:02 AMprehistoric-activity-61023
10/19/2021, 9:03 AMurn
and then compare their contentgreat-sunset-355
10/19/2021, 9:05 AMprehistoric-activity-61023
10/19/2021, 9:06 AMprehistoric-activity-61023
10/19/2021, 9:07 AMpulumi stack diff <state-file-a> <state-file-b>
.prehistoric-activity-61023
10/19/2021, 9:07 AMpulumi preview
worksgreat-sunset-355
10/19/2021, 9:08 AMprehistoric-activity-61023
10/19/2021, 9:21 AMprehistoric-activity-61023
10/19/2021, 9:22 AM.deployments.resources
and each one of them has urn
that should be uniqueprehistoric-activity-61023
10/19/2021, 9:22 AMurn
, they should be easily comparableprehistoric-activity-61023
10/19/2021, 9:23 AM❯ cat /tmp/a.json | jq '.'
{
"deployment": {
"resources": [
{
"urn": "b",
"data": 2
},
{
"urn": "a",
"data": 1
}
]
}
}
and with the sorting query:
❯ cat /tmp/a.json | jq '.deployment.resources|=sort_by(.urn)'
{
"deployment": {
"resources": [
{
"urn": "a",
"data": 1
},
{
"urn": "b",
"data": 2
}
]
}
}
prehistoric-activity-61023
10/19/2021, 9:24 AMpulumi stack export | jq '.deployment.resources|=sort_by(.urn)'
and see if that helpsgreat-sunset-355
10/19/2021, 9:29 AM