gruntwork-io / terraform-google-sql

Terraform modules for deploying Google Cloud SQL (e.g. MySQL, PostgreSQL) in GCP
https://gruntwork.io
Apache License 2.0
92 stars 103 forks source link

output service_account_email_address #44

Closed jsirianni closed 4 years ago

jsirianni commented 4 years ago

I need to give the cloud sql service account access to a GCS bucket, like this:

resource "google_storage_bucket_iam_binding" "bucket" {
 role   = "roles/storage.objectCreator"
 bucket = google_storage_bucket.bucket.name

 members = [
  "serviceAccount:${module.mydatabase.service_account_email_address}"
 ]
}

I did not add tests, as not all outputs appear to be tested. I can add test cases if required. The existing test suite passes.

Currently I am using my fork with success.

yorinasub17 commented 4 years ago

The test failed for a different reason unrelated to this PR, so will go ahead and merge and release this. Thanks!