Role.roles
default conflicts with RoleGrant
resources
#131
Labels
area/providers
impact/reliability
Something that feels unreliable or flaky
kind/bug
Some behavior is incorrect or out of spec
Hello!
Issue details
In our Pulumi code, we had something like the following:
The problem is that postgresql.Role has an optional
roles
property, and the default behavior has a bad interaction with GrantRole:rds_replication
grant.)Role
, which we suspect assumesroles=[]
. This causes an update where the grant is revoked. Now the grant does to exist and our replication starts failing.... and so the cycle begins anew. We see regular cycles where replication stops working, comes back, breaks again, comes back, and so on.
This was somewhat acknowledged by the owners of the underlying Terraform provider here:
We've fixed the issue in our code by using
roles
instead of GrantRole, but this seems like a footgun.Steps to reproduce
See the steps described above.
Expected:
I would expect the postgresql.Role resource to ignore grants when the optional
roles
property is not set, rather than assuming a default ofroles=[]
.Actual:
For Pulumi staff, an update showing the delta is here:
https://app.pulumi.com/materialize/mzcloud/production/updates/681
You can see the removal of the
rds_replication
grant in the Diff Log.The text was updated successfully, but these errors were encountered: