You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 14, 2020. It is now read-only.
As part of our tf testing infrastructure we initiate a terraform destroy to ensure any residual resources from previous runs are gone. This does not seem to work properly with the postgresql module. This may be related to the fact the provider section for our module obtains the info/credentials via ssm as a data source.
Terraform Version
terraform -v
Terraform v0.12.20
provider.aws v2.60.0
provider.postgresql v1.5.0
provider.random v2.2.1
Affected Resource(s)
postgresql_*
If this issue appears to affect multiple resources, it may be an issue with Terraform's core, so please mention this.
Terraform Configuration Files
provider"postgresql" {
host=data.aws_ssm_parameter.db_host.valueport=5432username=data.aws_ssm_parameter.db_admin_user.valuepassword=data.aws_ssm_parameter.db_admin_pass.valuesuperuser=false
}
provider"aws" {
region="us-east-1"
}
data"aws_ssm_parameter""db_host" {
name="/writer_endpoint"
}
data"aws_ssm_parameter""db_admin_user" {
name="/admin_user"
}
data"aws_ssm_parameter""db_admin_pass" {
name="/admin_pass"
}
resource"random_password""db_pass" {
length=12special=trueoverride_special="!#$%&*()-_=+[]{}<>:?"
}
resource"postgresql_role""customer_admin" {
name=var.customer_db_adminlogin=truepassword=random_password.db_pass.resultskip_reassign_owned=true
}
resource"postgresql_database""db" {
name="${var.subdomain}-db"owner=postgresql_role.customer_admin.namelc_collate="en_US.UTF-8"lc_ctype="en_US.UTF-8"
}
variable"subdomain" {
description="The subdomain of the customer."type=stringdefault="testinstance"
}
variable"customer_db_admin" {
description="The role created in the postgresdb which allows a customer access to their dbs."type=stringdefault="testinstance_admin"
}
This is a known bug, we'll work on it but it needs important modifications.
Meanwhile, a workaround is to set the expected_version setting in the provider block to your server version. Thanks to that it will not try to detect the version and will not fail.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Use case
As part of our tf testing infrastructure we initiate a terraform destroy to ensure any residual resources from previous runs are gone. This does not seem to work properly with the postgresql module. This may be related to the fact the provider section for our module obtains the info/credentials via ssm as a data source.
Terraform Version
terraform -v
Terraform v0.12.20
Affected Resource(s)
If this issue appears to affect multiple resources, it may be an issue with Terraform's core, so please mention this.
Terraform Configuration Files
Debug Output
Please provider a link to a GitHub Gist containing the complete debug output: https://www.terraform.io/docs/internals/debugging.html. Please do NOT paste the debug output in the issue; just paste a link to the Gist.
https://gist.github.com/ryan-dyer-sp/0b3e46d27c0dd88ab8bcfc7d1801114e
Panic Output
If Terraform produced a panic, please provide a link to a GitHub Gist containing the output of the
crash.log
.Expected Behavior
What should have happened?
terraform destroy should work successfully when there is nothing to destroy, not throw an error.
Actual Behavior
What actually happened?
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
terraform plan
terraform destroy
The text was updated successfully, but these errors were encountered: