Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes always detected on google_sql_user resource with host populated when instance is postgres #623

Closed
gionn opened this issue Oct 23, 2017 · 4 comments
Labels

Comments

@gionn
Copy link

gionn commented Oct 23, 2017

Host attribute in google_sql_user is marked as required but it looks like is ignored when using postgres.
Workaround is to set host = "".

Terraform Version

Terraform v0.10.6

Affected Resource(s)

  • google_sql_user

Terraform Configuration Files

resource "google_sql_database_instance" "master" {
  name = "master-instance"
  region = "${var.region}"
  database_version = "POSTGRES_9_6"

  settings {
    tier = "db-f1-micro"
  }
}

resource "google_sql_database" "cmw" {
  name      = "cmw"
  instance  = "${google_sql_database_instance.master.name}"
}

resource "google_sql_user" "users" {
  name     = "cmw"
  instance = "${google_sql_database_instance.master.name}"
  host     = "whatever"
  password = "omitted"
}

Debug Output

-/+ module.gce-platform.google_sql_user.users (new resource required)
      id:       "master-instance/cmw" => <computed> (forces new resource)
      host:     "" => "localhost" (forces new resource)
      instance: "master-instance" => "master-instance"
      name:     "cmw" => "cmw"
      password: <sensitive> => <sensitive> (attribute changed)

Expected Behavior

No changes detected

Actual Behavior

Always trigger resource creation

Steps to Reproduce

  1. terraform apply
@aeneasr
Copy link

aeneasr commented Nov 5, 2017

I can confirm this issue

@Mykolaichenko
Copy link

Mykolaichenko commented Nov 16, 2017

+1 also broken for me, workaround working

@danawillow danawillow added the bug label Jan 26, 2018
@danawillow
Copy link
Contributor

host is now optional as per #1066. Closing this issue, but if you're still having issues please feel free to open a new one!

@ghost
Copy link

ghost commented Nov 19, 2018

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!

@ghost ghost locked and limited conversation to collaborators Nov 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

5 participants