sticky-bear-14421
06/11/2021, 9:44 AMpeeringProvider, err := aws.NewProvider(ctx, fmt.Sprintf("peeringProvider-%s", peer.Name), &aws.ProviderArgs{
AssumeRole: &aws.ProviderAssumeRoleArgs{
RoleArn: pulumi.String(fmt.Sprintf("arn:aws:iam::%s:role/%s", peer.AccountID, peer.RouteTables["peeringAccepterRole"])),
SessionName: pulumi.String("peeringAccepterSession"),
},
Region: pulumi.String(region.Name),
}, pulumi.Provider(provider), pulumi.DependsOn([]pulumi.Resource{provider, role}),
)
if err != nil {
return err
}
Even with the pulumi.DependsOn() containing my role reference, this does not align this provider with the changes on the role.
Any hints on how to fix this ordering?pulumi.Provider(provider)
. But that provider has a direct reference as I inject the Role as RoleArn: role.Arn
and thus the direct reference is there.