|
59 | 59 | "addons_config.0.horizontal_pod_autoscaling",
|
60 | 60 | "addons_config.0.network_policy_config",
|
61 | 61 | "addons_config.0.cloudrun_config",
|
| 62 | + "addons_config.0.gcp_filestore_csi_driver_config", |
62 | 63 | }
|
63 | 64 |
|
64 | 65 | forceNewClusterNodeConfigFields = []string{
|
@@ -228,6 +229,23 @@ func resourceContainerCluster() *schema.Resource {
|
228 | 229 | },
|
229 | 230 | },
|
230 | 231 | },
|
| 232 | + "gcp_filestore_csi_driver_config": { |
| 233 | + Type: schema.TypeList, |
| 234 | + Optional: true, |
| 235 | + Computed: true, |
| 236 | + AtLeastOneOf: addonsConfigKeys, |
| 237 | + MaxItems: 1, |
| 238 | + Description: `The status of the Filestore CSI driver addon, which allows the usage of filestore instance as volumes. Defaults to disabled; set enabled = true to enable.`, |
| 239 | + ConflictsWith: []string{"enable_autopilot"}, |
| 240 | + Elem: &schema.Resource{ |
| 241 | + Schema: map[string]*schema.Schema{ |
| 242 | + "enabled": { |
| 243 | + Type: schema.TypeBool, |
| 244 | + Required: true, |
| 245 | + }, |
| 246 | + }, |
| 247 | + }, |
| 248 | + }, |
231 | 249 | "cloudrun_config": {
|
232 | 250 | Type: schema.TypeList,
|
233 | 251 | Optional: true,
|
@@ -2564,6 +2582,14 @@ func expandClusterAddonsConfig(configured interface{}) *container.AddonsConfig {
|
2564 | 2582 | }
|
2565 | 2583 | }
|
2566 | 2584 |
|
| 2585 | + if v, ok := config["gcp_filestore_csi_driver_config"]; ok && len(v.([]interface{})) > 0 { |
| 2586 | + addon := v.([]interface{})[0].(map[string]interface{}) |
| 2587 | + ac.GcpFilestoreCsiDriverConfig = &container.GcpFilestoreCsiDriverConfig{ |
| 2588 | + Enabled: addon["enabled"].(bool), |
| 2589 | + ForceSendFields: []string{"Enabled"}, |
| 2590 | + } |
| 2591 | + } |
| 2592 | + |
2567 | 2593 | if v, ok := config["cloudrun_config"]; ok && len(v.([]interface{})) > 0 {
|
2568 | 2594 | addon := v.([]interface{})[0].(map[string]interface{})
|
2569 | 2595 | ac.CloudRunConfig = &container.CloudRunConfig{
|
@@ -3068,6 +3094,14 @@ func flattenClusterAddonsConfig(c *container.AddonsConfig) []map[string]interfac
|
3068 | 3094 | }
|
3069 | 3095 | }
|
3070 | 3096 |
|
| 3097 | + if c.GcpFilestoreCsiDriverConfig != nil { |
| 3098 | + result["gcp_filestore_csi_driver_config"] = []map[string]interface{}{ |
| 3099 | + { |
| 3100 | + "enabled": c.GcpFilestoreCsiDriverConfig.Enabled, |
| 3101 | + }, |
| 3102 | + } |
| 3103 | + } |
| 3104 | + |
3071 | 3105 | if c.CloudRunConfig != nil {
|
3072 | 3106 | cloudRunConfig := map[string]interface{}{
|
3073 | 3107 | "disabled": c.CloudRunConfig.Disabled,
|
|
0 commit comments