@@ -2236,6 +2236,14 @@ func TestAccContainerCluster_withLoggingConfig(t *testing.T) {
22362236 ImportState : true ,
22372237 ImportStateVerify : true ,
22382238 },
2239+ {
2240+ Config : testAccContainerCluster_withLoggingConfigDisabled (clusterName ),
2241+ },
2242+ {
2243+ ResourceName : "google_container_cluster.primary" ,
2244+ ImportState : true ,
2245+ ImportStateVerify : true ,
2246+ },
22392247 {
22402248 Config : testAccContainerCluster_withLoggingConfigUpdated (clusterName ),
22412249 },
@@ -2283,6 +2291,15 @@ func TestAccContainerCluster_withMonitoringConfig(t *testing.T) {
22832291 ImportStateVerify : true ,
22842292 ImportStateVerifyIgnore : []string {"min_master_version" },
22852293 },
2294+ {
2295+ Config : testAccContainerCluster_withMonitoringConfigDisabled (clusterName ),
2296+ },
2297+ {
2298+ ResourceName : "google_container_cluster.primary" ,
2299+ ImportState : true ,
2300+ ImportStateVerify : true ,
2301+ ImportStateVerifyIgnore : []string {"min_master_version" },
2302+ },
22862303 {
22872304 Config : testAccContainerCluster_withMonitoringConfigUpdated (clusterName ),
22882305 },
@@ -6010,6 +6027,19 @@ resource "google_container_cluster" "primary" {
60106027` , name )
60116028}
60126029
6030+ func testAccContainerCluster_withLoggingConfigDisabled (name string ) string {
6031+ return fmt .Sprintf (`
6032+ resource "google_container_cluster" "primary" {
6033+ name = "%s"
6034+ location = "us-central1-a"
6035+ initial_node_count = 1
6036+ logging_config {
6037+ enable_components = []
6038+ }
6039+ }
6040+ ` , name )
6041+ }
6042+
60136043func testAccContainerCluster_withLoggingConfigUpdated (name string ) string {
60146044 return fmt .Sprintf (`
60156045resource "google_container_cluster" "primary" {
@@ -6051,6 +6081,19 @@ resource "google_container_cluster" "primary" {
60516081` , name )
60526082}
60536083
6084+ func testAccContainerCluster_withMonitoringConfigDisabled (name string ) string {
6085+ return fmt .Sprintf (`
6086+ resource "google_container_cluster" "primary" {
6087+ name = "%s"
6088+ location = "us-central1-a"
6089+ initial_node_count = 1
6090+ monitoring_config {
6091+ enable_components = []
6092+ }
6093+ }
6094+ ` , name )
6095+ }
6096+
60546097func testAccContainerCluster_withMonitoringConfigUpdated (name string ) string {
60556098 return fmt .Sprintf (`
60566099resource "google_container_cluster" "primary" {
0 commit comments