@@ -1923,6 +1923,14 @@ func TestAccContainerCluster_withLoggingConfig(t *testing.T) {
1923
1923
ImportState : true ,
1924
1924
ImportStateVerify : true ,
1925
1925
},
1926
+ {
1927
+ Config : testAccContainerCluster_withLoggingConfigDisabled (clusterName ),
1928
+ },
1929
+ {
1930
+ ResourceName : "google_container_cluster.primary" ,
1931
+ ImportState : true ,
1932
+ ImportStateVerify : true ,
1933
+ },
1926
1934
{
1927
1935
Config : testAccContainerCluster_withLoggingConfigUpdated (clusterName ),
1928
1936
},
@@ -1964,6 +1972,21 @@ func TestAccContainerCluster_withMonitoringConfig(t *testing.T) {
1964
1972
{
1965
1973
Config : testAccContainerCluster_withMonitoringConfigEnabled (clusterName ),
1966
1974
},
1975
+ {
1976
+ ResourceName : "google_container_cluster.primary" ,
1977
+ ImportState : true ,
1978
+ ImportStateVerify : true ,
1979
+ ImportStateVerifyIgnore : []string {"min_master_version" },
1980
+ },
1981
+ {
1982
+ Config : testAccContainerCluster_withMonitoringConfigDisabled (clusterName ),
1983
+ },
1984
+ {
1985
+ ResourceName : "google_container_cluster.primary" ,
1986
+ ImportState : true ,
1987
+ ImportStateVerify : true ,
1988
+ ImportStateVerifyIgnore : []string {"min_master_version" },
1989
+ },
1967
1990
{
1968
1991
Config : testAccContainerCluster_basic_1_23_8 (clusterName ),
1969
1992
},
@@ -4807,6 +4830,19 @@ resource "google_container_cluster" "primary" {
4807
4830
` , name )
4808
4831
}
4809
4832
4833
+ func testAccContainerCluster_withLoggingConfigDisabled (name string ) string {
4834
+ return fmt .Sprintf (`
4835
+ resource "google_container_cluster" "primary" {
4836
+ name = "%s"
4837
+ location = "us-central1-a"
4838
+ initial_node_count = 1
4839
+ logging_config {
4840
+ enable_components = []
4841
+ }
4842
+ }
4843
+ ` , name )
4844
+ }
4845
+
4810
4846
func testAccContainerCluster_withLoggingConfigUpdated (name string ) string {
4811
4847
return fmt .Sprintf (`
4812
4848
resource "google_container_cluster" "primary" {
@@ -4848,6 +4884,19 @@ resource "google_container_cluster" "primary" {
4848
4884
` , name )
4849
4885
}
4850
4886
4887
+ func testAccContainerCluster_withMonitoringConfigDisabled (name string ) string {
4888
+ return fmt .Sprintf (`
4889
+ resource "google_container_cluster" "primary" {
4890
+ name = "%s"
4891
+ location = "us-central1-a"
4892
+ initial_node_count = 1
4893
+ monitoring_config {
4894
+ enable_components = []
4895
+ }
4896
+ }
4897
+ ` , name )
4898
+ }
4899
+
4851
4900
func testAccContainerCluster_withSoleTenantGroup (name string ) string {
4852
4901
return fmt .Sprintf (`
4853
4902
resource "google_compute_node_template" "soletenant-tmpl" {
0 commit comments