Skip to content

Commit

Permalink
Add ability to import google_sql_database (#12)
Browse files Browse the repository at this point in the history
* Add ability to import `google_sql_database`

* Update from code review

* Ensure split id length and report error otherwise
  • Loading branch information
gh-mlfowler authored and rileykarson committed Jun 22, 2017
1 parent cf3ef55 commit 18ada1c
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion docs/r/sql_database.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ resource "google_sql_database_instance" "master" {
}
resource "google_sql_database" "users" {
name = "users"
name = "users-db"
instance = "${google_sql_database_instance.master.name}"
}
```
Expand All @@ -48,3 +48,11 @@ In addition to the arguments listed above, the following computed attributes are
exported:

* `self_link` - The URI of the created resource.

## Import

SQL databases can be imported using the `instance` and `name`, e.g.

```
$ terraform import google_sql_database.database master-instance:users-db
```

0 comments on commit 18ada1c

Please sign in to comment.