Skip to content

Commit

Permalink
Tidying up test config, changelog message and schema import
Browse files Browse the repository at this point in the history
  • Loading branch information
JaylonmcShan03 committed Nov 22, 2024
1 parent 7ec763b commit d6a2d50
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
6 changes: 5 additions & 1 deletion .changelog/2625.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
```release-note:enhancement
Added the `traffic_distribution` field to the `kubernetes_service_v1` resource
`resource/kubernetes_service`: add a new field `traffic_distribution`.
```

```
`resource/kubernetes_service_v1`: add a new field `traffic_distribution`.
```
2 changes: 1 addition & 1 deletion kubernetes/resource_kubernetes_service_v1.go
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ func resourceKubernetesServiceSchemaV1() map[string]*schema.Schema {
Description: "Specifies the preferred strategy for distributing traffic to Service endpoints. When set to PreferClose, the Kubernetes will prioritize routing traffic to endpoints that are topologically closer",
Optional: true,
ValidateFunc: validation.StringInSlice([]string{
"PreferClose",
corev1.ServiceTrafficDistributionPreferClose,
}, false),
},
"type": {
Expand Down
5 changes: 4 additions & 1 deletion kubernetes/resource_kubernetes_service_v1_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -825,7 +825,10 @@ func TestAccKubernetesServiceV1_trafficDistribution(t *testing.T) {
resourceName := "kubernetes_service_v1.test"

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
PreCheck: func() {
testAccPreCheck(t)
skipIfClusterVersionLessThan(t, "1.31")
},
IDRefreshIgnore: []string{"metadata.0.resource_version"},
ProviderFactories: testAccProviderFactories,
CheckDestroy: testAccCheckKubernetesServiceV1Destroy,
Expand Down

0 comments on commit d6a2d50

Please sign in to comment.