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

google_storage_project_service_account does not have attribute 'email_address' #1954

Closed
timReynolds opened this issue Aug 28, 2018 · 4 comments
Assignees

Comments

@timReynolds
Copy link

Terraform Version

Terraform v0.11.8

  • provider.google v1.16.2

Affected Resource(s)

Please list the resources as a list, for example:

  • google_storage_project_service_account

If this issue appears to affect multiple resources, it may be an issue with Terraform's core, so please mention this.

Terraform Configuration Files

resource "google_pubsub_topic" "gcs-pubsub-topic" {
  name    = "gcs-uploads"
  project = "${module.project.project_id}"
}

data "google_storage_project_service_account" "gcs_account" {
  project = "${module.project.project_id}"
}

resource "google_pubsub_topic_iam_binding" "binding" {
  topic   = "${google_pubsub_topic.gcs-pubsub-topic.name}"
  project = "${module.project.project_id}"
  role    = "roles/pubsub.publisher"
  members = ["serviceAccount:${data.google_storage_project_service_account.gcs_account.email_address}"]
}

Debug Output

Error: Error running plan: 1 error(s) occurred:

* google_pubsub_topic_iam_binding.binding: 1 error(s) occurred:

* google_pubsub_topic_iam_binding.binding: Resource 'data.google_storage_project_service_account.gcs_account' does not have attribute 'email_address' for variable 'data.google_storage_project_service_account.gcs_account.email_address'

Expected Behavior

Service account should be located and permission bound.

Actual Behavior

Error

Steps to Reproduce

  1. terraform plan

Please let me know if I can provide any additional information to help identify the problem.

@vishen
Copy link
Contributor

vishen commented Aug 29, 2018

This looks to be fixed by this PR - #1913. Presumably this will be fixed in the next release.

@paddycarver
Copy link
Contributor

Yup! This should be addressed in the next release.

@rileykarson
Copy link
Collaborator

Hey @timReynolds! Sorry for not seeing this until now!

We released version 1.17 of the Google Provider on August 22nd, so the field you were trying to use was released... just only on a newer version of the provider.

Unfortunately, the docs at terraform.io only reflect the most recent release of the provider. My best recommendation for you here is to update to 1.17.1. We follow semantic versioning, so without a major version change all of our changes should be backwards compatible!

If you have a really really good reason to stay on 1.16.2, you can use id instead of email_address but please add a TODO to get off of it once you do upgrade - id is an internal undocumented field that can be changed at any time that we... accidentally used to have documented here.

I'm going to close out this issue but if this doesn't work after upgrading or you have any other thoughts, feel free to reopen the issue!

@ghost
Copy link

ghost commented Nov 16, 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 16, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants