|
|
|
|
@ -26,6 +26,23 @@ func TestAccContainerCluster_basic(t *testing.T) {
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func TestAccContainerCluster_withVersion(t *testing.T) {
|
|
|
|
|
resource.Test(t, resource.TestCase{
|
|
|
|
|
PreCheck: func() { testAccPreCheck(t) },
|
|
|
|
|
Providers: testAccProviders,
|
|
|
|
|
CheckDestroy: testAccCheckContainerClusterDestroy,
|
|
|
|
|
Steps: []resource.TestStep{
|
|
|
|
|
resource.TestStep{
|
|
|
|
|
Config: testAccContainerCluster_withVersion,
|
|
|
|
|
Check: resource.ComposeTestCheckFunc(
|
|
|
|
|
testAccCheckContainerClusterExists(
|
|
|
|
|
"google_container_cluster.with_version"),
|
|
|
|
|
),
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func TestAccContainerCluster_withNodeConfig(t *testing.T) {
|
|
|
|
|
resource.Test(t, resource.TestCase{
|
|
|
|
|
PreCheck: func() { testAccPreCheck(t) },
|
|
|
|
|
@ -138,6 +155,19 @@ resource "google_container_cluster" "primary" {
|
|
|
|
|
}
|
|
|
|
|
}`, acctest.RandString(10))
|
|
|
|
|
|
|
|
|
|
var testAccContainerCluster_withVersion = fmt.Sprintf(`
|
|
|
|
|
resource "google_container_cluster" "with_version" {
|
|
|
|
|
name = "cluster-test-%s"
|
|
|
|
|
zone = "us-central1-a"
|
|
|
|
|
node_version = "1.4.7"
|
|
|
|
|
initial_node_count = 1
|
|
|
|
|
|
|
|
|
|
master_auth {
|
|
|
|
|
username = "mr.yoda"
|
|
|
|
|
password = "adoy.rm"
|
|
|
|
|
}
|
|
|
|
|
}`, acctest.RandString(10))
|
|
|
|
|
|
|
|
|
|
var testAccContainerCluster_withNodeConfig = fmt.Sprintf(`
|
|
|
|
|
resource "google_container_cluster" "with_node_config" {
|
|
|
|
|
name = "cluster-test-%s"
|
|
|
|
|
|