Skip to content

Commit a17e37e

Browse files
committed
Remove workaround for Konnect API bug which has been fixed
1 parent fb8d9c2 commit a17e37e

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

docs/data-sources/service.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ data "konnect_service" "example" {
1919
* `name` - **(Optional, String)** The filter string to apply to the name of the service. Uses equality.
2020
## Attribute Reference
2121
* `retries` - **(Integer)** The number of retries to execute upon failure to proxy.
22-
* `protocol` - **(Integer)** The protocol used to communicate with the host.
22+
* `protocol` - **(String)** The protocol used to communicate with the host.
2323
* `port` - **(Integer)** The port used to communicate with the host.
2424
* `path` - **(String)** The path to be used in requests to the host.
2525
* `connect_timeout` - **(Integer)** The timeout in milliseconds for establishing a connection to the host.

konnect/client/service.go

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,11 @@ type ServiceCollection struct {
2727
Services []Service `json:"data"`
2828
}
2929
type ListService struct {
30-
ControlPlaneId string `json:"-"`
31-
Id string `json:"id"`
32-
Name string `json:"name"`
33-
Retries int `json:"retries"`
34-
//This is a bug in Konnect API as protocol should be a string
35-
Protocol int `json:"protocol"`
30+
ControlPlaneId string `json:"-"`
31+
Id string `json:"id"`
32+
Name string `json:"name"`
33+
Retries int `json:"retries"`
34+
Protocol string `json:"protocol"`
3635
Host string `json:"host"`
3736
Port int `json:"port"`
3837
Path string `json:"path"`

konnect/data_source_service.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ func dataSourceService() *schema.Resource {
3939
Computed: true,
4040
},
4141
"protocol": {
42-
Type: schema.TypeInt,
42+
Type: schema.TypeString,
4343
Computed: true,
4444
},
4545
"port": {

0 commit comments

Comments
 (0)