This message was deleted.
# aws
s
This message was deleted.
b
if you check the diff, it expects them to be in a specific order
m
Oh. That explains it. Thanks 👍🏻
I have tried with
sort.Strings(clientList)
now, and the same thing happens with the diff. As expected “http” is first on the sorted list, but the state is the opposite.
Copy code
~ clientIdLists: [
          ~ [0]: "<http://sts.amazonaws.com|sts.amazonaws.com>" => "<https://github.com/re>"
          ~ [1]: "<https://github.com/re>" => "<http://sts.amazonaws.com|sts.amazonaws.com>"
        ]
Also manually assigning to indexes does not appear to work, unless I sort it manually by the order Pulumi returns it from the state the second time I run the stack.
Are there any general recommendations regarding this I have missed?
I just manually ordered them for now, since Sort did the opposite of the output from state. It’ll work for now.
Copy code
ClientIdLists: pulumi.StringArray{
			pulumi.String(c.ClientIdLists[1]),
			pulumi.String(c.ClientIdLists[0]),
		},