Skip to content

Commit d9413e2

Browse files
author
Sébastien GLON
committed
Add website doc for resource storage_bucket_iam_policy
1 parent cc6271e commit d9413e2

12 files changed

+6510
-2478
lines changed

google/resource_container_cluster.go

+6-4
Original file line numberDiff line numberDiff line change
@@ -225,16 +225,17 @@ func resourceContainerCluster() *schema.Resource {
225225
},
226226
},
227227
},
228-
"dashboard": {
228+
"kubernetes_dashboard": {
229229
Type: schema.TypeList,
230-
Optional: false,
230+
Optional: true,
231+
ForceNew: true,
231232
MaxItems: 1,
232233
Elem: &schema.Resource{
233234
Schema: map[string]*schema.Schema{
234235
"disabled": {
235236
Type: schema.TypeBool,
236237
Optional: true,
237-
ForceNew: false,
238+
ForceNew: true,
238239
},
239240
},
240241
},
@@ -386,7 +387,8 @@ func resourceContainerClusterCreate(d *schema.ResourceData, meta interface{}) er
386387
Disabled: addon["disabled"].(bool),
387388
}
388389
}
389-
if v, ok := addonsConfig["dashboard"]; ok && len(v.([]interface{})) > 0 {
390+
391+
if v, ok := addonsConfig["kubernetes_dashboard"]; ok && len(v.([]interface{})) > 0 {
390392
addon := v.([]interface{})[0].(map[string]interface{})
391393
cluster.AddonsConfig.KubernetesDashboard = &container.KubernetesDashboard{
392394
Disabled: addon["disabled"].(bool),

google/resource_container_cluster_test.go

+12-11
Original file line numberDiff line numberDiff line change
@@ -558,17 +558,18 @@ func testAccCheckContainerCluster(n string) resource.TestCheckFunc {
558558
}
559559
clusterTests = append(clusterTests, clusterTestField{"additional_zones", additionalZones})
560560

561-
// AddonsConfig is neither Required or Computed, so the API may return nil for it
562-
if cluster.AddonsConfig != nil {
563-
if cluster.AddonsConfig.HttpLoadBalancing != nil {
564-
clusterTests = append(clusterTests, clusterTestField{"addons_config.0.http_load_balancing.0.disabled", strconv.FormatBool(cluster.AddonsConfig.HttpLoadBalancing.Disabled)})
565-
}
566-
if cluster.AddonsConfig.HorizontalPodAutoscaling != nil {
567-
clusterTests = append(clusterTests, clusterTestField{"addons_config.0.horizontal_pod_autoscaling.0.disabled", strconv.FormatBool(cluster.AddonsConfig.HorizontalPodAutoscaling.Disabled)})
568-
}
569-
if cluster.AddonsConfig.KubernetesDashboard != nil {
570-
clusterTests = append(clusterTests, clusterTestField{"addons_config.0.KubernetesDashboard.0.disabled", strconv.FormatBool(cluster.AddonsConfig.KubernetesDashboard.Disabled)})
571-
}
561+
// AddonsConfig is neither Required or Computed, so the API may return nil for it.
562+
httpLoadBalancingDisabled := false
563+
if cluster.AddonsConfig != nil && cluster.AddonsConfig.HttpLoadBalancing != nil {
564+
httpLoadBalancingDisabled = cluster.AddonsConfig.HttpLoadBalancing.Disabled
565+
}
566+
horizontalPodAutoscalingDisabled := false
567+
if cluster.AddonsConfig != nil && cluster.AddonsConfig.HorizontalPodAutoscaling != nil {
568+
horizontalPodAutoscalingDisabled = cluster.AddonsConfig.HorizontalPodAutoscaling.Disabled
569+
}
570+
kubernetesDashboardDisabled := false
571+
if cluster.AddonsConfig != nil && cluster.AddonsConfig.KubernetesDashboard != nil {
572+
kubernetesDashboardDisabled = cluster.AddonsConfig.KubernetesDashboard.Disabled
572573
}
573574
clusterTests = append(clusterTests, clusterTestField{"addons_config.0.http_load_balancing.0.disabled", httpLoadBalancingDisabled})
574575
clusterTests = append(clusterTests, clusterTestField{"addons_config.0.horizontal_pod_autoscaling.0.disabled", horizontalPodAutoscalingDisabled})

google/resource_storage_bucket.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,7 @@ func resourceGCSBucketLifecycleCreateOrUpdate(d *schema.ResourceData, sb *storag
534534
}
535535

536536
if v, ok := condition["is_live"]; ok {
537-
target_lifecycle_rule.Condition.IsLive = v.(*bool)
537+
target_lifecycle_rule.Condition.IsLive = v.(bool)
538538
}
539539

540540
if v, ok := condition["matches_storage_class"]; ok {

vendor/google.golang.org/api/bigquery/v2/bigquery-api.json

+188-35
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)