-
Notifications
You must be signed in to change notification settings - Fork 258
Open
Description
Terraform Version
Terraform v1.4.6
on darwin_amd64
+ provider registry.terraform.io/cyrilgdn/postgresql v1.19.0
Affected Resource(s)
- postgresql_grant
Terraform Configuration Files
resource "postgresql_grant" "access" {
provider = postgresql.mydb
database = var.database
object_type = "table"
schema = var.schema
privileges = ["SELECT", "INSERT", "UPDATE", "DELETE"]
role = var.role
}
And role
is in the form [email protected]
for google service accounts
Expected Behavior
Grants are already applied, it shouldn't try to recreate them.
Actual Behavior
Almost all the time, but not quite always, it wants to replace the grants:
-/+ resource "postgresql_grant" "access" {
~ id = "[email protected]_something_something_table" -> (known after apply)
~ privileges = [ # forces replacement
+ "DELETE",
+ "INSERT",
+ "SELECT",
+ "UPDATE",
]
# (5 unchanged attributes hidden)
}
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
terraform plan
Important Factoids
Cloud SQL on Google with IAM auth.
When I try to inspect the state I get an error, even with the latest version of Terraform:
% terraform state show "postgresql_grant.access"
unsupported attribute "columns"
# postgresql_grant.access:
resource "postgresql_grant" "access" {
References
RobinFrcd, philip-harvey, jbdelpech, MaikuMori, aprettyloner and 36 morecalidaedev
Metadata
Metadata
Assignees
Labels
No labels