Skip to content

Commit

Permalink
Merge pull request #1421 from modular-magician/codegen-pr-2736
Browse files Browse the repository at this point in the history
Dataproc autoscaling ga
  • Loading branch information
slevenick authored Nov 22, 2019
2 parents bbe2a16 + 1efc981 commit ba20557
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,23 +33,24 @@ func TestAccDataprocAutoscalingPolicy_dataprocAutoscalingPolicyExample(t *testin

resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProvidersOiCS,
Providers: testAccProviders,
CheckDestroy: testAccCheckDataprocAutoscalingPolicyDestroy,
Steps: []resource.TestStep{
{
Config: testAccDataprocAutoscalingPolicy_dataprocAutoscalingPolicyExample(context),
},
{
ResourceName: "google_dataproc_autoscaling_policy.asp",
ImportState: true,
ImportStateVerify: true,
},
},
})
}

func testAccDataprocAutoscalingPolicy_dataprocAutoscalingPolicyExample(context map[string]interface{}) string {
return Nprintf(`
provider "google-beta" {
}
resource "google_dataproc_cluster" "basic" {
provider = google-beta
name = "tf-dataproc-test-%{random_suffix}"
region = "us-central1"
Expand All @@ -61,7 +62,6 @@ resource "google_dataproc_cluster" "basic" {
}
resource "google_dataproc_autoscaling_policy" "asp" {
provider = google-beta
policy_id = "tf-dataproc-test-%{random_suffix}"
location = "us-central1"
Expand Down
13 changes: 3 additions & 10 deletions website/docs/r/dataproc_autoscaling_policy.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ description: |-

Describes an autoscaling policy for Dataproc cluster autoscaler.

~> **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/guides/provider_versions.html) for more details on beta resources.


<div class = "oics-button" style="float: right; margin: 0 0 -15px">
Expand All @@ -37,11 +35,7 @@ See [Provider Versions](https://terraform.io/docs/providers/google/guides/provid


```hcl
provider "google-beta" {
}
resource "google_dataproc_cluster" "basic" {
provider = google-beta
name = "tf-dataproc-test-"
region = "us-central1"
Expand All @@ -53,7 +47,6 @@ resource "google_dataproc_cluster" "basic" {
}
resource "google_dataproc_autoscaling_policy" "asp" {
provider = google-beta
policy_id = "tf-dataproc-test-"
location = "us-central1"
Expand Down Expand Up @@ -239,9 +232,9 @@ This resource provides the following
AutoscalingPolicy can be imported using any of these accepted formats:

```
$ terraform import -provider=google-beta google_dataproc_autoscaling_policy.default projects/{{project}}/locations/{{location}}/autoscalingPolicies/{{policy_id}}
$ terraform import -provider=google-beta google_dataproc_autoscaling_policy.default {{project}}/{{location}}/{{policy_id}}
$ terraform import -provider=google-beta google_dataproc_autoscaling_policy.default {{location}}/{{policy_id}}
$ terraform import google_dataproc_autoscaling_policy.default projects/{{project}}/locations/{{location}}/autoscalingPolicies/{{policy_id}}
$ terraform import google_dataproc_autoscaling_policy.default {{project}}/{{location}}/{{policy_id}}
$ terraform import google_dataproc_autoscaling_policy.default {{location}}/{{policy_id}}
```

-> If you're importing a resource with beta features, make sure to include `-provider=google-beta`
Expand Down
1 change: 0 additions & 1 deletion website/google.erb
Original file line number Diff line number Diff line change
Expand Up @@ -824,7 +824,6 @@
<li<%= sidebar_current("docs-google-dataproc") %>>
<a href="#">Google Dataproc Resources</a>
<ul class="nav nav-visible">

<li<%= sidebar_current("docs-google-dataproc-autoscaling-policy") %>>
<a href="/docs/providers/google/r/dataproc_autoscaling_policy.html">google_dataproc_autoscaling_policy</a>
</li>
Expand Down

0 comments on commit ba20557

Please sign in to comment.