Skip to content

Commit 007fdb8

Browse files
seems like autopilot returns gateway api config channel CHANNEL STANDARD (#7906) (#14576)
* seems like autopilot returns gateway api config channel CHANNEL STANDARD * i think only the parent needs to be O+C * add CHANNEL_EXPERIMENTAL to error message and docs Signed-off-by: Modular Magician <[email protected]>
1 parent 5c42d5a commit 007fdb8

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
lines changed

.changelog/7906.txt

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:bug
2+
container: added ability for `gateway_api_config.channel` to default from the api
3+
```

google/resource_container_cluster.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -1654,14 +1654,15 @@ func ResourceContainerCluster() *schema.Resource {
16541654
"gateway_api_config": {
16551655
Type: schema.TypeList,
16561656
Optional: true,
1657+
Computed: true,
16571658
MaxItems: 1,
16581659
Description: `Configuration for GKE Gateway API controller.`,
16591660
Elem: &schema.Resource{
16601661
Schema: map[string]*schema.Schema{
16611662
"channel": {
16621663
Type: schema.TypeString,
16631664
Required: true,
1664-
ValidateFunc: validation.StringInSlice([]string{"CHANNEL_DISABLED", "CHANNEL_STANDARD"}, false),
1665+
ValidateFunc: validation.StringInSlice([]string{"CHANNEL_DISABLED", "CHANNEL_EXPERIMENTAL", "CHANNEL_STANDARD"}, false),
16651666
Description: `The Gateway API release channel to use for Gateway API.`,
16661667
},
16671668
},

google/resource_container_cluster_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -3012,7 +3012,7 @@ func TestAccContainerCluster_withGatewayApiConfig(t *testing.T) {
30123012
Steps: []resource.TestStep{
30133013
{
30143014
Config: testAccContainerCluster_withGatewayApiConfig(clusterName, "CANARY"),
3015-
ExpectError: regexp.MustCompile(`expected gateway_api_config\.0\.channel to be one of \[CHANNEL_DISABLED CHANNEL_STANDARD\], got CANARY`),
3015+
ExpectError: regexp.MustCompile(`expected gateway_api_config\.0\.channel to be one of \[CHANNEL_DISABLED CHANNEL_EXPERIMENTAL CHANNEL_STANDARD\], got CANARY`),
30163016
},
30173017
{
30183018
Config: testAccContainerCluster_withGatewayApiConfig(clusterName, "CHANNEL_DISABLED"),

website/docs/r/container_cluster.html.markdown

+1-1
Original file line numberDiff line numberDiff line change
@@ -1175,7 +1175,7 @@ and all pods running on the nodes. Specified as a map from the key, such as
11751175

11761176
<a name="nested_gateway_api_config"></a>The `gateway_api_config` block supports:
11771177

1178-
* `channel` - (Required) Which Gateway Api channel should be used. `CHANNEL_DISABLED` or `CHANNEL_STANDARD`.
1178+
* `channel` - (Required) Which Gateway Api channel should be used. `CHANNEL_DISABLED`, `CHANNEL_EXPERIMENTAL` or `CHANNEL_STANDARD`.
11791179

11801180
<a name="nested_protect_config"></a>The `protect_config` block supports:
11811181

0 commit comments

Comments
 (0)