Skip to content

Commit

Permalink
make ipv4_enabled default to true (#3330) (#6041)
Browse files Browse the repository at this point in the history
Signed-off-by: Modular Magician <[email protected]>
  • Loading branch information
modular-magician authored Apr 3, 2020
1 parent 7e7ebe2 commit ae6d21e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
3 changes: 3 additions & 0 deletions .changelog/3330.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
* sql: fixed error that occurred on `google_sql_database_instance` when `settings.ip_configuration` was set but `ipv4_enabled` was not set to true and `private_network` was not configured, by defaulting `ipv4_enabled` to true.
```
7 changes: 3 additions & 4 deletions google/resource_sql_database_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -228,10 +228,9 @@ func resourceSqlDatabaseInstance() *schema.Resource {
AtLeastOneOf: ipConfigurationKeys,
},
"ipv4_enabled": {
Type: schema.TypeBool,
Optional: true,
// Defaults differ between first and second gen instances
Computed: true,
Type: schema.TypeBool,
Optional: true,
Default: true,
AtLeastOneOf: ipConfigurationKeys,
},
"require_ssl": {
Expand Down
1 change: 0 additions & 1 deletion google/resource_sql_database_instance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -848,7 +848,6 @@ resource "google_sql_database_instance" "instance" {
tier = "db-f1-micro"
ip_configuration {
ipv4_enabled = "true"
authorized_networks {
value = "108.12.12.12"
name = "misc"
Expand Down

0 comments on commit ae6d21e

Please sign in to comment.