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

Removed data #3306

Closed
wants to merge 1 commit into from
Closed

Removed data #3306

wants to merge 1 commit into from

Conversation

mrsiejas
Copy link

Could not create "google_service_account_key" until removed "data" from the variable.

Could not create "google_service_account_key" until removed "data" from the variable.
@Chupaka
Copy link
Contributor

Chupaka commented Mar 25, 2019

Any details on your configuration? Because it looks wrong :)

@mrsiejas
Copy link
Author

mrsiejas commented Mar 25, 2019

In general I found using Data Sources in tutorial somewhat confusing. I understand it is possible, but not required. Is using Data Sources a standard practice in Terraform docs?

Here's a snippet worked for me

  account_id   = "cloudsql"
  display_name = "cloudsql-sa"
  project      = "${var.project}"
}

resource "google_project_iam_binding" "project" {
  project = "${var.project}"
  role    = "roles/cloudsql.client"

  members = [
    "serviceAccount:${google_service_account.cloudsql_sa.account_id}@${var.project}.iam.gserviceaccount.com",
  ]
}

resource "google_service_account_key" "cloudsql_credentials_key" {
  service_account_id = "${google_service_account.cloudsql_sa.name}"
}

@Chupaka
Copy link
Contributor

Chupaka commented Apr 1, 2019

So, you're trying to edit an example for datasource so that it doesn't use the datasource?.. You're looking at wrong place, https://www.terraform.io/docs/providers/google/d/datasource_google_service_account.html (datasource) and https://www.terraform.io/docs/providers/google/r/google_service_account.html (resource) are different things.

@mrsiejas mrsiejas closed this Apr 1, 2019
@ghost
Copy link

ghost commented May 1, 2019

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

Successfully merging this pull request may close these issues.

2 participants