This repository was archived by the owner on Nov 14, 2020. It is now read-only.
Description Hi there,
Terraform Version
Terraform v0.12.29
+ provider.postgresql v1.7.1
Affected Resource(s)
Terraform Configuration Files
resource "postgresql_database" "this" {
name = var. name
owner = var. main_username
}
resource "postgresql_grant" "database_to_public" {
object_type = " database"
database = postgresql_database. this . name
role = " public"
privileges = [" TEMPORARY" ]
}
provider "postgresql" {
host = var. hostname
username = var. main_username
password = var. main_password
database = var. main_database
sslmode = " require"
superuser = false
}
variable "hostname" {
type = string
}
variable "main_username" {
default = " postgres"
type = string
}
variable "main_password" {
type = string
}
variable "main_database" {
default = " postgres"
type = string
}
variable "name" {
default = " name-1"
}
Actual Behavior
Commenting out postgresql_grant.database_to_public or destroying that with target should revoke permissions.
Expected Behavior
Refresh before the apply or destroy removes the resource from state and no revoke is performed (0 added, 0 changed, 0 destroyed).
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
terraform apply
terraform destroy --target postgresql_grant.database_to_public.
Alternatively comment out postgresql_grant.database_to_public resource and run terraform apply.
Reactions are currently unavailable
Hi there,
Terraform Version
Affected Resource(s)
Terraform Configuration Files
Actual Behavior
Commenting out
postgresql_grant.database_to_publicor destroying that with target should revoke permissions.Expected Behavior
Refresh before the apply or destroy removes the resource from state and no revoke is performed (
0 added, 0 changed, 0 destroyed).Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
terraform applyterraform destroy --target postgresql_grant.database_to_public.postgresql_grant.database_to_publicresource and runterraform apply.