Skip to content

Commit

Permalink
Import for compute_address supports multiple id formats. (hashicorp#378)
Browse files Browse the repository at this point in the history
This allows to import address from region and project different than the default project.
  • Loading branch information
rosbo authored Sep 7, 2017
1 parent cab9494 commit 95b1c4e
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion docs/r/compute_address.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,28 @@ exported:

## Import

Addresses can be imported using the `name`, e.g.
Addresses can be imported using the `project`, `region` and `name`, e.g.

```
$ terraform import google_compute_address.default gcp-project/us-central1/test-address
```

If `project` is omitted, the default project set for the provider is used:

```
$ terraform import google_compute_address.default us-central1/test-address
```

If `project` and `region` are omitted, the default project and region set for the provider are used.

```
$ terraform import google_compute_address.default test-address
```

Alternatively, addresses can be imported using a full or partial `self_link`.

```
$ terraform import google_compute_address.default https://www.googleapis.com/compute/v1/projects/gcp-project/regions/us-central1/addresses/test-address
$ terraform import google_compute_address.default projects/gcp-project/regions/us-central1/addresses/test-address
```

0 comments on commit 95b1c4e

Please sign in to comment.