terraform-routeros / terraform-provider-routeros

Terraform Provider for Mikrotik RouterOS
Mozilla Public License 2.0
166 stars 46 forks source link

invalid syntax for 'client_keepalive' field #432

Closed blackden closed 2 months ago

blackden commented 2 months ago

Issue Description: When running Terraform planning, an error occurs. The error happens when attempting to create the routeros_interface_wireguard_peer resource with the client_keepalive parameter. The error indicates that Terraform expects a numeric value for the client_keepalive parameter but fails to parse it correctly, even when a numeric value is provided as expected.

Steps to Reproduce:

  1. Run Terraform using a configuration file that includes the routeros_interface_wireguard_peer resource.
  2. Attempt to perform planning (terraform plan).

Expected Behavior: Expected successful planning execution without errors, as the client_keepalive parameter was specified as a numeric value according to the documentation.

Actual Behavior: When performing planning, an error is encountered indicating that Terraform cannot parse the numeric value of the client_keepalive parameter, even though it is correctly represented.

Terraform Version: Terraform v1.7.5 on darwin_arm64

Configuration File:

resource "routeros_interface_wireguard_peer" "wg_peer" {
  # Other parameters...
  client_keepalive = 25  # Correct numeric value
}

Documentation: Link to the documentation where the client_keepalive parameter is described as requiring a numeric value.

Additional Notes:


╷
│ Error: strconv.Atoi: parsing "25s": invalid syntax for 'client_keepalive' field
│ 
│   with routeros_interface_wireguard_peer.wg_peer["0"],
│   on interface_wireguard_peer.tf line 21, in resource "routeros_interface_wireguard_peer" "wg_peer":
│   21: resource "routeros_interface_wireguard_peer" "wg_peer" {
│ 
╵
vaerh commented 2 months ago

Thanks, fixed!

vaerh commented 2 months ago

:tada: This issue has been resolved in version 1.46.1 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: