From 95b1c4eecf26fa3c473a930a5e3c0c982f788900 Mon Sep 17 00:00:00 2001 From: Vincent Roseberry Date: Thu, 7 Sep 2017 10:38:26 -0700 Subject: [PATCH] Import for compute_address supports multiple id formats. (#378) This allows to import address from region and project different than the default project. --- docs/r/compute_address.html.markdown | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/docs/r/compute_address.html.markdown b/docs/r/compute_address.html.markdown index 77126fcc7ac..54984f717d0 100644 --- a/docs/r/compute_address.html.markdown +++ b/docs/r/compute_address.html.markdown @@ -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 +``` \ No newline at end of file