From d1549bf0c9dd15f60c7c9abcd2a59d14cf46eae1 Mon Sep 17 00:00:00 2001 From: The Magician Date: Wed, 20 Mar 2019 15:21:38 -0700 Subject: [PATCH] Sort import regex's (#3283) Signed-off-by: Modular Magician --- google/resource_compute_autoscaler.go | 2 +- google/resource_compute_region_autoscaler.go | 2 +- google/resource_compute_router.go | 2 +- google/resource_compute_subnetwork.go | 2 +- website/docs/r/compute_autoscaler.html.markdown | 2 +- website/docs/r/compute_region_autoscaler.html.markdown | 2 +- website/docs/r/compute_router.html.markdown | 2 +- website/docs/r/compute_subnetwork.html.markdown | 2 +- website/docs/r/container_node_pool.html.markdown | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/google/resource_compute_autoscaler.go b/google/resource_compute_autoscaler.go index ac2ea287517..f1d3d074669 100644 --- a/google/resource_compute_autoscaler.go +++ b/google/resource_compute_autoscaler.go @@ -385,7 +385,7 @@ func resourceComputeAutoscalerDelete(d *schema.ResourceData, meta interface{}) e func resourceComputeAutoscalerImport(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { config := meta.(*Config) - if err := parseImportId([]string{"projects/(?P[^/]+)/zones/(?P[^/]+)/autoscalers/(?P[^/]+)", "(?P[^/]+)/(?P[^/]+)", "(?P[^/]+)/(?P[^/]+)/(?P[^/]+)", "(?P[^/]+)"}, d, config); err != nil { + if err := parseImportId([]string{"projects/(?P[^/]+)/zones/(?P[^/]+)/autoscalers/(?P[^/]+)", "(?P[^/]+)/(?P[^/]+)/(?P[^/]+)", "(?P[^/]+)/(?P[^/]+)", "(?P[^/]+)"}, d, config); err != nil { return nil, err } diff --git a/google/resource_compute_region_autoscaler.go b/google/resource_compute_region_autoscaler.go index 19cb3e7d486..9695b532989 100644 --- a/google/resource_compute_region_autoscaler.go +++ b/google/resource_compute_region_autoscaler.go @@ -385,7 +385,7 @@ func resourceComputeRegionAutoscalerDelete(d *schema.ResourceData, meta interfac func resourceComputeRegionAutoscalerImport(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { config := meta.(*Config) - if err := parseImportId([]string{"projects/(?P[^/]+)/regions/(?P[^/]+)/autoscalers/(?P[^/]+)", "(?P[^/]+)/(?P[^/]+)", "(?P[^/]+)/(?P[^/]+)/(?P[^/]+)", "(?P[^/]+)"}, d, config); err != nil { + if err := parseImportId([]string{"projects/(?P[^/]+)/regions/(?P[^/]+)/autoscalers/(?P[^/]+)", "(?P[^/]+)/(?P[^/]+)/(?P[^/]+)", "(?P[^/]+)/(?P[^/]+)", "(?P[^/]+)"}, d, config); err != nil { return nil, err } diff --git a/google/resource_compute_router.go b/google/resource_compute_router.go index b41cf35c3e1..20f188320ee 100644 --- a/google/resource_compute_router.go +++ b/google/resource_compute_router.go @@ -361,7 +361,7 @@ func resourceComputeRouterDelete(d *schema.ResourceData, meta interface{}) error func resourceComputeRouterImport(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { config := meta.(*Config) - if err := parseImportId([]string{"projects/(?P[^/]+)/regions/(?P[^/]+)/routers/(?P[^/]+)", "(?P[^/]+)/(?P[^/]+)", "(?P[^/]+)/(?P[^/]+)/(?P[^/]+)", "(?P[^/]+)"}, d, config); err != nil { + if err := parseImportId([]string{"projects/(?P[^/]+)/regions/(?P[^/]+)/routers/(?P[^/]+)", "(?P[^/]+)/(?P[^/]+)/(?P[^/]+)", "(?P[^/]+)/(?P[^/]+)", "(?P[^/]+)"}, d, config); err != nil { return nil, err } diff --git a/google/resource_compute_subnetwork.go b/google/resource_compute_subnetwork.go index 8a8a49bf68b..bb3786cfb49 100644 --- a/google/resource_compute_subnetwork.go +++ b/google/resource_compute_subnetwork.go @@ -543,7 +543,7 @@ func resourceComputeSubnetworkDelete(d *schema.ResourceData, meta interface{}) e func resourceComputeSubnetworkImport(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { config := meta.(*Config) - if err := parseImportId([]string{"projects/(?P[^/]+)/regions/(?P[^/]+)/subnetworks/(?P[^/]+)", "(?P[^/]+)/(?P[^/]+)", "(?P[^/]+)/(?P[^/]+)/(?P[^/]+)", "(?P[^/]+)"}, d, config); err != nil { + if err := parseImportId([]string{"projects/(?P[^/]+)/regions/(?P[^/]+)/subnetworks/(?P[^/]+)", "(?P[^/]+)/(?P[^/]+)/(?P[^/]+)", "(?P[^/]+)/(?P[^/]+)", "(?P[^/]+)"}, d, config); err != nil { return nil, err } diff --git a/website/docs/r/compute_autoscaler.html.markdown b/website/docs/r/compute_autoscaler.html.markdown index 73aaca052a6..2baac75e513 100644 --- a/website/docs/r/compute_autoscaler.html.markdown +++ b/website/docs/r/compute_autoscaler.html.markdown @@ -348,8 +348,8 @@ Autoscaler can be imported using any of these accepted formats: ``` $ terraform import google_compute_autoscaler.default projects/{{project}}/zones/{{zone}}/autoscalers/{{name}} -$ terraform import google_compute_autoscaler.default {{zone}}/{{name}} $ terraform import google_compute_autoscaler.default {{project}}/{{zone}}/{{name}} +$ terraform import google_compute_autoscaler.default {{zone}}/{{name}} $ terraform import google_compute_autoscaler.default {{name}} ``` diff --git a/website/docs/r/compute_region_autoscaler.html.markdown b/website/docs/r/compute_region_autoscaler.html.markdown index 18350e3c5d2..08efac9388c 100644 --- a/website/docs/r/compute_region_autoscaler.html.markdown +++ b/website/docs/r/compute_region_autoscaler.html.markdown @@ -348,8 +348,8 @@ RegionAutoscaler can be imported using any of these accepted formats: ``` $ terraform import google_compute_region_autoscaler.default projects/{{project}}/regions/{{region}}/autoscalers/{{name}} -$ terraform import google_compute_region_autoscaler.default {{region}}/{{name}} $ terraform import google_compute_region_autoscaler.default {{project}}/{{region}}/{{name}} +$ terraform import google_compute_region_autoscaler.default {{region}}/{{name}} $ terraform import google_compute_region_autoscaler.default {{name}} ``` diff --git a/website/docs/r/compute_router.html.markdown b/website/docs/r/compute_router.html.markdown index fdbbac7e5f5..07ac29672ff 100644 --- a/website/docs/r/compute_router.html.markdown +++ b/website/docs/r/compute_router.html.markdown @@ -166,8 +166,8 @@ Router can be imported using any of these accepted formats: ``` $ terraform import google_compute_router.default projects/{{project}}/regions/{{region}}/routers/{{name}} -$ terraform import google_compute_router.default {{region}}/{{name}} $ terraform import google_compute_router.default {{project}}/{{region}}/{{name}} +$ terraform import google_compute_router.default {{region}}/{{name}} $ terraform import google_compute_router.default {{name}} ``` diff --git a/website/docs/r/compute_subnetwork.html.markdown b/website/docs/r/compute_subnetwork.html.markdown index ead02754666..c51af70e8cb 100644 --- a/website/docs/r/compute_subnetwork.html.markdown +++ b/website/docs/r/compute_subnetwork.html.markdown @@ -188,8 +188,8 @@ Subnetwork can be imported using any of these accepted formats: ``` $ terraform import google_compute_subnetwork.default projects/{{project}}/regions/{{region}}/subnetworks/{{name}} -$ terraform import google_compute_subnetwork.default {{region}}/{{name}} $ terraform import google_compute_subnetwork.default {{project}}/{{region}}/{{name}} +$ terraform import google_compute_subnetwork.default {{region}}/{{name}} $ terraform import google_compute_subnetwork.default {{name}} ``` diff --git a/website/docs/r/container_node_pool.html.markdown b/website/docs/r/container_node_pool.html.markdown index 4008aadc856..f50f2b9ad56 100644 --- a/website/docs/r/container_node_pool.html.markdown +++ b/website/docs/r/container_node_pool.html.markdown @@ -18,7 +18,7 @@ and [the API reference](https://cloud.google.com/container-engine/reference/rest resource "google_container_cluster" "primary" { name = "my-gke-cluster" location = "us-central1" - + # We can't create a cluster with no node pool defined, but we want to only use # separately managed node pools. So we create the smallest possible default # node pool and immediately delete it.