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 cloud sql private ip (incorporating previous PR feedback) #145

Merged
merged 11 commits into from
Nov 21, 2018

Conversation

craigdbarber
Copy link
Contributor

This PR picks up on the work done by @yhuang incorporating the feedback given by @danawillow.

@ghost ghost added the size/m label Nov 20, 2018
@craigdbarber
Copy link
Contributor Author

For context, a link to the previous PR: #46

Copy link
Contributor

@danawillow danawillow 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, some very small comments

reserved_peering_ranges = ["${google_compute_global_address.foobar.name}"]
}

# TODO figure out a way to specify the dependency to the connection resource
Copy link
Contributor

Choose a reason for hiding this comment

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

do you still need this TODO?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed.

@@ -714,6 +738,42 @@ resource "google_sql_database_instance" "instance-failover" {
`, instanceName, failoverName)
}

func testAccSqlDatabaseInstance_with_private_network(databaseName, networkName, addressRangeName string) string {
return fmt.Sprintf(`
resource "google_compute_network" "foobar" {
Copy link
Contributor

Choose a reason for hiding this comment

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

FYI I think the test will run faster if you do auto_create_subnetworks = false (unless you need them for the test, in which case carry on)

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.

@@ -594,6 +594,30 @@ func TestAccSqlDatabaseInstance_basic_with_user_labels(t *testing.T) {
})
}

func TestAccSqlDatabaseInstance_with_private_network(t *testing.T) {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: could it be called TestAccSqlDatabaseInstance_withPrivateNetwork?

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.

@craigdbarber
Copy link
Contributor Author

Thanks for taking a look :)

Copy link
Contributor

@danawillow danawillow left a comment

Choose a reason for hiding this comment

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

oh wait, can you also add documentation for the new fields?

@craigdbarber
Copy link
Contributor Author

Documentation added.

modular-magician pushed a commit to modular-magician/terraform-provider-google-beta that referenced this pull request Nov 21, 2018
@craigdbarber
Copy link
Contributor Author

Closing this out. Thanks again for the help.

@danawillow danawillow reopened this Nov 21, 2018
@danawillow danawillow merged commit 4e7b2bd into hashicorp:2.0.0 Nov 21, 2018
nat-henderson pushed a commit that referenced this pull request Dec 11, 2018
Support cloud sql private ip (incorporating previous PR feedback)
nat-henderson pushed a commit that referenced this pull request Dec 12, 2018
Support cloud sql private ip (incorporating previous PR feedback)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants