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

Use CLOUD_IAM_SERVICE_ACCOUNT for MySQL variation #151

Open
NimJay opened this issue Sep 16, 2024 · 0 comments
Open

Use CLOUD_IAM_SERVICE_ACCOUNT for MySQL variation #151

NimJay opened this issue Sep 16, 2024 · 0 comments
Labels
priority: p3 Desirable enhancement or fix. May not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@NimJay
Copy link
Contributor

NimJay commented Sep 16, 2024

Background:

  • There are two variations of this Three-tier web app:
    • PostgreSQL
    • MySQL
  • The CLOUD_IAM_SERVICE_ACCOUNT for each variation looks different:
resource "google_sql_user" "main" {
...
  name            = var.database_type == "postgresql" ? "${google_service_account.runsa.account_id}@${var.project_id}.iam" : "foo"
  type            = var.database_type == "postgresql" ? "CLOUD_IAM_SERVICE_ACCOUNT" : null
  password        = var.database_type == "mysql" ? "bar" : null
  • This discussion thread states that type = "CLOUD_IAM_SERVICE_ACCOUNT" didn't work for MySQL right out of the box.
  • This CLOUD_IAM_SERVICE_ACCOUNT option allows us to use Cloud Run's service account to access the database in CloudSQL.

Feature request:

  • Use CLOUD_IAM_SERVICE_ACCOUNT for the MySQL variation too. According to the docs, CLOUD_IAM_SERVICE_ACCOUNT is supported for both PostgreSQL an MySQL.
@NimJay NimJay added priority: p3 Desirable enhancement or fix. May not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. labels Sep 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p3 Desirable enhancement or fix. May not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

1 participant