Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

attempt fixing quota issues #2181

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .changelog/3652.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:none

```
13 changes: 2 additions & 11 deletions google-beta/resource_compute_node_group_generated_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,10 @@ func TestAccComputeNodeGroup_nodeGroupBasicExample(t *testing.T) {

func testAccComputeNodeGroup_nodeGroupBasicExample(context map[string]interface{}) string {
return Nprintf(`
data "google_compute_node_types" "central1a" {
zone = "us-central1-a"
}

resource "google_compute_node_template" "soletenant-tmpl" {
name = "tf-test-soletenant-tmpl%{random_suffix}"
region = "us-central1"
node_type = data.google_compute_node_types.central1a.names[0]
node_type = "n1-node-96-624"
}

resource "google_compute_node_group" "nodes" {
Expand Down Expand Up @@ -91,16 +87,11 @@ func TestAccComputeNodeGroup_nodeGroupAutoscalingPolicyExample(t *testing.T) {

func testAccComputeNodeGroup_nodeGroupAutoscalingPolicyExample(context map[string]interface{}) string {
return Nprintf(`
data "google_compute_node_types" "central1a" {
provider = google-beta
zone = "us-central1-a"
}

resource "google_compute_node_template" "soletenant-tmpl" {
provider = google-beta
name = "tf-test-soletenant-tmpl%{random_suffix}"
region = "us-central1"
node_type = data.google_compute_node_types.central1a.names[0]
node_type = "n1-node-96-624"
}

resource "google_compute_node_group" "nodes" {
Expand Down
8 changes: 2 additions & 6 deletions google-beta/resource_compute_node_group_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,20 +86,16 @@ func testAccCheckComputeNodeGroupCreationTimeBefore(prevTimeCreated *time.Time)

func testAccComputeNodeGroup_updateNodeTemplate(groupName, tmplPrefix, tmplToUse string) string {
return fmt.Sprintf(`
data "google_compute_node_types" "central1a" {
zone = "us-central1-a"
}

resource "google_compute_node_template" "tmpl1" {
name = "%s-first"
region = "us-central1"
node_type = data.google_compute_node_types.central1a.names[0]
node_type = "n1-node-96-624"
}

resource "google_compute_node_template" "tmpl2" {
name = "%s-second"
region = "us-central1"
node_type = data.google_compute_node_types.central1a.names[0]
node_type = "n1-node-96-624"
}

resource "google_compute_node_group" "nodes" {
Expand Down
5 changes: 3 additions & 2 deletions google-beta/resource_compute_node_template.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,9 @@ func resourceComputeNodeTemplate() *schema.Resource {
Type: schema.TypeString,
Optional: true,
ForceNew: true,
ValidateFunc: validation.StringInSlice([]string{"ENABLED", "DISABLED", ""}, false),
Description: `CPU overcommit. Possible values: ["ENABLED", "DISABLED"]`,
ValidateFunc: validation.StringInSlice([]string{"ENABLED", "NONE", ""}, false),
Description: `CPU overcommit. Default value: "NONE" Possible values: ["ENABLED", "NONE"]`,
Default: "NONE",
},
"description": {
Type: schema.TypeString,
Expand Down
8 changes: 2 additions & 6 deletions google-beta/resource_compute_node_template_generated_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,10 @@ func TestAccComputeNodeTemplate_nodeTemplateBasicExample(t *testing.T) {

func testAccComputeNodeTemplate_nodeTemplateBasicExample(context map[string]interface{}) string {
return Nprintf(`
data "google_compute_node_types" "central1a" {
zone = "us-central1-a"
}

resource "google_compute_node_template" "template" {
name = "tf-test-soletenant-tmpl%{random_suffix}"
region = "us-central1"
node_type = data.google_compute_node_types.central1a.names[0]
node_type = "n1-node-96-624"
}
`, context)
}
Expand Down Expand Up @@ -97,7 +93,7 @@ resource "google_compute_node_template" "template" {

name = "tf-test-soletenant-with-licenses%{random_suffix}"
region = "us-central1"
node_type = data.google_compute_node_types.central1a.names[0]
node_type = "n1-node-96-624"

node_affinity_labels = {
foo = "baz"
Expand Down
13 changes: 2 additions & 11 deletions website/docs/r/compute_node_group.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,10 @@ Terraform to delete and recreate the node group.


```hcl
data "google_compute_node_types" "central1a" {
zone = "us-central1-a"
}

resource "google_compute_node_template" "soletenant-tmpl" {
name = "soletenant-tmpl"
region = "us-central1"
node_type = data.google_compute_node_types.central1a.names[0]
node_type = "n1-node-96-624"
}

resource "google_compute_node_group" "nodes" {
Expand All @@ -73,16 +69,11 @@ resource "google_compute_node_group" "nodes" {


```hcl
data "google_compute_node_types" "central1a" {
provider = google-beta
zone = "us-central1-a"
}

resource "google_compute_node_template" "soletenant-tmpl" {
provider = google-beta
name = "soletenant-tmpl"
region = "us-central1"
node_type = data.google_compute_node_types.central1a.names[0]
node_type = "n1-node-96-624"
}

resource "google_compute_node_group" "nodes" {
Expand Down
11 changes: 4 additions & 7 deletions website/docs/r/compute_node_template.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,10 @@ To get more information about NodeTemplate, see:


```hcl
data "google_compute_node_types" "central1a" {
zone = "us-central1-a"
}

resource "google_compute_node_template" "template" {
name = "soletenant-tmpl"
region = "us-central1"
node_type = data.google_compute_node_types.central1a.names[0]
node_type = "n1-node-96-624"
}
```
<div class = "oics-button" style="float: right; margin: 0 0 -15px">
Expand All @@ -76,7 +72,7 @@ resource "google_compute_node_template" "template" {

name = "soletenant-with-licenses"
region = "us-central1"
node_type = data.google_compute_node_types.central1a.names[0]
node_type = "n1-node-96-624"

node_affinity_labels = {
foo = "baz"
Expand Down Expand Up @@ -131,9 +127,10 @@ The following arguments are supported:
(Optional, [Beta](https://terraform.io/docs/providers/google/guides/provider_versions.html))
CPU overcommit.

Default value: `NONE`
Possible values are:
* `ENABLED`
* `DISABLED`
* `NONE`

* `region` -
(Optional)
Expand Down