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

Importing google_logging_project_sink resource fails to set 'project' attribute #1018

Closed
ewbankkit opened this issue Jan 28, 2018 · 1 comment · Fixed by #1019
Closed

Importing google_logging_project_sink resource fails to set 'project' attribute #1018

ewbankkit opened this issue Jan 28, 2018 · 1 comment · Fixed by #1019

Comments

@ewbankkit
Copy link
Contributor

Importing a google_logging_project_sink resource via terraform import fails to set the project attribute causing the next terraform plan to show that the resource needs to be recreated if project is explicitly set in code.

resource "google_logging_project_sink" "infra_storage_sink" {
  name                   = "xyz"
  destination            = "storage.googleapis.com/bucket-xxxxxx"
  project                = "project-xxxxxx"
  unique_writer_identity = true
}

terraform import google_logging_project_sink.infra_storage_sink projects/project-xxxxxx/sinks/xyz succeeds.

terraform plan:

-/+ google_logging_project_sink.infra_storage_sink (new resource required)
      id:                     "projects/project-xxxxxx/sinks/xyz" => <computed> (forces new resource)
      destination:            "storage.googleapis.com/bucket-xxxxxx" => "storage.googleapis.com/bucket-xxxxxx"
      name:                   "xyz" => "xyz"
      project:                "" => "project-xxxxxx" (forces new resource)
      unique_writer_identity: "true" => "true"
      writer_identity:        "serviceAccount:[email protected]" => <computed>
@ewbankkit ewbankkit changed the title Importing google_logging_project_sink resource fails to set 'project' Importing google_logging_project_sink resource fails to set 'project' attribute Jan 28, 2018
@ghost
Copy link

ghost commented Mar 29, 2020

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 Mar 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant