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

Support multiple users with the same name for different host for 1st gen. #1066

Merged
merged 2 commits into from
Feb 9, 2018

Conversation

rosbo
Copy link
Contributor

@rosbo rosbo commented Feb 9, 2018

Fixes #1057

  • support multiple users with the same name for different host for v1 instances.
  • make the host field optional.
  • Added an acceptance test for 2nd gen sql user
  • Merge import test into regular tests.
  • Improved documentation for sql user
    • Mention that host is not supported for 2nd gen sql instance.
  • Improved documentation for sql instance
    • The example was wrong. Tier D0 for a POSTGRES_9_6 instance is not a valid tier.
    • Added an additional example. One for 1st gen and one for 2nd gen instances.

@rosbo rosbo changed the title Fix sql user for v2 instances Support multiple users with the same name for different host for 1st gen. Feb 9, 2018
@rosbo rosbo requested a review from danawillow February 9, 2018 03:19
@rosbo
Copy link
Contributor Author

rosbo commented Feb 9, 2018

--- PASS: TestAccGoogleSqlUser_firstGen (86.56s)
--- PASS: TestAccGoogleSqlUser_secondGen (508.87s)

resource "google_sql_user" "user" {
name = "user%s"
resource "google_sql_user" "user1" {
name = "john"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm sorry to be That Person but can we use a gender-neutral name here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure. Changed for admin.

database_version = "POSTGRES_9_6"
database_version = "MYSQL_5_6"
# First-generation instance regions are not the conventional
# Google Compute Engine region. See argument reference below.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: regions

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

region = "us-central1"

settings {
# Second-generation instance tier are based on the machine
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: tiers

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@@ -52,6 +49,10 @@ The following arguments are supported:

- - -

* `host` - (Optional) The host the user can connect from. This is only supported
for first generation SQL instance. Don't set this field for second generation
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: instances

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@@ -52,6 +49,10 @@ The following arguments are supported:

- - -

* `host` - (Optional) The host the user can connect from. This is only supported
for first generation SQL instance. Don't set this field for second generation
SQL instance. Can be an IP address. Changing this forces a new resource to be created.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: instances

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@rosbo rosbo merged commit b789d7c into hashicorp:master Feb 9, 2018
@rosbo rosbo deleted the fix-sql-user branch February 9, 2018 21:43
chrisst pushed a commit to chrisst/terraform-provider-google that referenced this pull request Nov 9, 2018
…gen. (hashicorp#1066)

* Support multiple users with the same name for different host for 1st gen.

* Fix typo and rename user
modular-magician added a commit to modular-magician/terraform-provider-google that referenced this pull request Sep 27, 2019
@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 this pull request may close these issues.

Postgres user creation again and again
2 participants