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

Added user label support in sql_database_instance #1567

Merged
merged 2 commits into from
May 30, 2018

Conversation

ortaman
Copy link
Contributor

@ortaman ortaman commented May 30, 2018

Fixes #1372

@hashicorp hashicorp deleted a comment from ortaman May 30, 2018
Copy link
Contributor

@rosbo rosbo left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution. Just a few comments and then we should be good to merge.

Thank you.

@@ -595,6 +601,15 @@ func resourceSqlDatabaseInstanceCreate(d *schema.ResourceData, meta interface{})
settings.ReplicationType = v.(string)
}

settings.UserLabels = map[string]string{}

if v, ok := _settings["user_labels"]; ok {
Copy link
Contributor

Choose a reason for hiding this comment

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

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

@@ -1027,6 +1042,14 @@ func resourceSqlDatabaseInstanceUpdate(d *schema.ResourceData, meta interface{})
settings.ReplicationType = v.(string)
}

if v, ok := _settings["user_labels"]; ok {
Copy link
Contributor

Choose a reason for hiding this comment

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

Same, user convertStringMap

CheckDestroy: testAccSqlDatabaseInstanceDestroy,
Steps: []resource.TestStep{
resource.TestStep{
Config: fmt.Sprintf(
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you add a new step in this test to test the update path for labels?

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

Copy link
Contributor

@rosbo rosbo left a comment

Choose a reason for hiding this comment

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

Looks good. Merging! Thanks a lot for your contribution

@rosbo rosbo merged commit c6b0cfc into hashicorp:master May 30, 2018
@rosbo rosbo changed the title Added user label support in sql_database_instance (#1372) Added user label support in sql_database_instance May 30, 2018
chrisst pushed a commit to chrisst/terraform-provider-google that referenced this pull request Nov 9, 2018
@ghost
Copy link

ghost commented Nov 18, 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 18, 2018
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.

2 participants