Skip to content

Commit 53499a9

Browse files
committed
google: Add regression test for hashicorp#2978
1 parent 80e90a8 commit 53499a9

1 file changed

Lines changed: 40 additions & 0 deletions

File tree

builtin/providers/google/resource_container_cluster_test.go

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,23 @@ func TestAccContainerCluster_basic(t *testing.T) {
2525
})
2626
}
2727

28+
func TestAccContainerCluster_withNodeConfig(t *testing.T) {
29+
resource.Test(t, resource.TestCase{
30+
PreCheck: func() { testAccPreCheck(t) },
31+
Providers: testAccProviders,
32+
CheckDestroy: testAccCheckContainerClusterDestroy,
33+
Steps: []resource.TestStep{
34+
resource.TestStep{
35+
Config: testAccContainerCluster_withNodeConfig,
36+
Check: resource.ComposeTestCheckFunc(
37+
testAccCheckContainerClusterExists(
38+
"google_container_cluster.with_node_config"),
39+
),
40+
},
41+
},
42+
})
43+
}
44+
2845
func testAccCheckContainerClusterDestroy(s *terraform.State) error {
2946
config := testAccProvider.Meta().(*Config)
3047

@@ -83,3 +100,26 @@ resource "google_container_cluster" "primary" {
83100
password = "adoy.rm"
84101
}
85102
}`
103+
104+
const testAccContainerCluster_withNodeConfig = `
105+
resource "google_container_cluster" "with_node_config" {
106+
name = "terraform-foo-bar-with-nodeconfig"
107+
zone = "us-central1-f"
108+
initial_node_count = 1
109+
110+
master_auth {
111+
username = "mr.yoda"
112+
password = "adoy.rm"
113+
}
114+
115+
node_config {
116+
machine_type = "f1-micro"
117+
disk_size_gb = 15
118+
oauth_scopes = [
119+
"https://www.googleapis.com/auth/compute",
120+
"https://www.googleapis.com/auth/devstorage.read_only",
121+
"https://www.googleapis.com/auth/logging.write",
122+
"https://www.googleapis.com/auth/monitoring"
123+
]
124+
}
125+
}`

0 commit comments

Comments
 (0)