Skip to content

Commit

Permalink
Remove tests for RegionUrlMap from GA provider (#1174)
Browse files Browse the repository at this point in the history
Signed-off-by: Modular Magician <[email protected]>
  • Loading branch information
modular-magician authored and Ty Larrabee committed Sep 23, 2019
1 parent fdaf5b7 commit e5fb5ef
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 18 deletions.
23 changes: 13 additions & 10 deletions google-beta/resource_compute_region_url_map_generated_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,27 +33,24 @@ func TestAccComputeRegionUrlMap_regionUrlMapBasicExample(t *testing.T) {

resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
Providers: testAccProvidersOiCS,
CheckDestroy: testAccCheckComputeRegionUrlMapDestroy,
Steps: []resource.TestStep{
{
Config: testAccComputeRegionUrlMap_regionUrlMapBasicExample(context),
},
{
ResourceName: "google_compute_region_url_map.regionurlmap",
ImportState: true,
ImportStateVerify: true,
},
},
})
}

func testAccComputeRegionUrlMap_regionUrlMapBasicExample(context map[string]interface{}) string {
return Nprintf(`
resource "google_compute_region_url_map" "regionurlmap" {
provider = "google-beta"
region = "us-central1"
name = "regionurlmap%{random_suffix}"
description = "a description"
region = "us-central1"
default_service = "${google_compute_region_backend_service.home.self_link}"
Expand Down Expand Up @@ -85,26 +82,32 @@ resource "google_compute_region_url_map" "regionurlmap" {
}
resource "google_compute_region_backend_service" "login" {
name = "login%{random_suffix}"
provider = "google-beta"
region = "us-central1"
name = "login%{random_suffix}"
protocol = "HTTP"
timeout_sec = 10
health_checks = ["${google_compute_region_health_check.default.self_link}"]
}
resource "google_compute_region_backend_service" "home" {
name = "home%{random_suffix}"
provider = "google-beta"
region = "us-central1"
name = "home%{random_suffix}"
protocol = "HTTP"
timeout_sec = 10
health_checks = ["${google_compute_region_health_check.default.self_link}"]
}
resource "google_compute_region_health_check" "default" {
provider = "google-beta"
region = "us-central1"
name = "health-check%{random_suffix}"
region = "us-central1"
check_interval_sec = 1
timeout_sec = 1
http_health_check {
Expand Down
26 changes: 18 additions & 8 deletions website/docs/r/compute_region_url_map.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ description: |-
UrlMaps are used to route requests to a backend service based on rules
that you define for the host and path of an incoming URL.

~> **Warning:** This resource is in beta, and should be used with the terraform-provider-google-beta provider.
See [Provider Versions](https://terraform.io/docs/providers/google/provider_versions.html) for more details on beta resources.


<div class = "oics-button" style="float: right; margin: 0 0 -15px">
Expand All @@ -37,9 +39,11 @@ that you define for the host and path of an incoming URL.

```hcl
resource "google_compute_region_url_map" "regionurlmap" {
provider = "google-beta"
region = "us-central1"
name = "regionurlmap"
description = "a description"
region = "us-central1"
default_service = "${google_compute_region_backend_service.home.self_link}"
Expand Down Expand Up @@ -71,26 +75,32 @@ resource "google_compute_region_url_map" "regionurlmap" {
}
resource "google_compute_region_backend_service" "login" {
name = "login"
provider = "google-beta"
region = "us-central1"
name = "login"
protocol = "HTTP"
timeout_sec = 10
health_checks = ["${google_compute_region_health_check.default.self_link}"]
}
resource "google_compute_region_backend_service" "home" {
name = "home"
provider = "google-beta"
region = "us-central1"
name = "home"
protocol = "HTTP"
timeout_sec = 10
health_checks = ["${google_compute_region_health_check.default.self_link}"]
}
resource "google_compute_region_health_check" "default" {
provider = "google-beta"
region = "us-central1"
name = "health-check"
region = "us-central1"
check_interval_sec = 1
timeout_sec = 1
http_health_check {
Expand Down Expand Up @@ -254,10 +264,10 @@ This resource provides the following
RegionUrlMap can be imported using any of these accepted formats:

```
$ terraform import google_compute_region_url_map.default projects/{{project}}/regions/{{region}}/urlMaps/{{name}}
$ terraform import google_compute_region_url_map.default {{project}}/{{region}}/{{name}}
$ terraform import google_compute_region_url_map.default {{region}}/{{name}}
$ terraform import google_compute_region_url_map.default {{name}}
$ terraform import -provider=google-beta google_compute_region_url_map.default projects/{{project}}/regions/{{region}}/urlMaps/{{name}}
$ terraform import -provider=google-beta google_compute_region_url_map.default {{project}}/{{region}}/{{name}}
$ terraform import -provider=google-beta google_compute_region_url_map.default {{region}}/{{name}}
$ terraform import -provider=google-beta google_compute_region_url_map.default {{name}}
```

-> If you're importing a resource with beta features, make sure to include `-provider=google-beta`
Expand Down

0 comments on commit e5fb5ef

Please sign in to comment.