terraform-routeros / terraform-provider-routeros

Terraform Provider for Mikrotik RouterOS
Mozilla Public License 2.0
208 stars 60 forks source link

"no track" action in routeros_ip_firewall_raw needs tweaking #529

Closed leijonatm closed 3 months ago

leijonatm commented 3 months ago

Describe the bug I am using resource routeros_ip_firewall_raw to add a new record but the resource expects action "no track" to be have a hypen in between like "no-track" but routerOS manual expects it with no hyphen like "notrack".

To Reproduce

Expected behavior Add the record in RAW with no problems

Debug Information

2024-08-06T15:59:30.587+0300 [INFO] Starting apply for routeros_ip_firewall_raw.firewall_raw[0] 2024-08-06T15:59:30.587+0300 [DEBUG] routeros_ip_firewall_raw.firewall_raw[0]: applying the planned Create change 2024-08-06T15:59:30.588+0300 [DEBUG] provider.terraform-provider-routeros_v1.59.0: request body: /ip/firewall/raw/add =comment=Route traffic =disabled=no =chain=prerouting =action=no-track =dst-address=172.16.98.0/24 =src-address=172.16.18.0/24: tf_rpc=Configure @caller=github.com/terraform-routeros/terraform-provider-routeros/routeros/log.go:27 @module=routeros tf_provider_addr=terraform-routeros/routeros tf_req_id=a2cf4150-c9dd-6c57-4501-d5026d4f0c34 timestamp="2024-08-06T15:59:30.588+0300" 2024-08-06T15:59:30.593+0300 [DEBUG] provider.terraform-provider-routeros_v1.59.0: An error was encountered while sending a PUT request to the API: from RouterOS device: input does not match any value of action: @module=routeros tf_provider_addr=terraform-routeros/routeros tf_req_id=ba39165c-059a-ea30-c2e7-be3bb4ffc721 @caller=github.com/terraform-routeros/terraform-provider-routeros/routeros/log.go:27 tf_resource_type=routeros_ip_firewall_raw tf_rpc=ApplyResourceChange timestamp="2024-08-06T15:59:30.593+0300" 2024-08-06T15:59:30.593+0300 [ERROR] provider.terraform-provider-routeros_v1.59.0: Response contains error diagnostic: @caller=github.com/hashicorp/terraform-plugin-go@v0.23.0/tfprotov5/internal/diag/diagnostics.go:58 diagnostic_detail="" tf_req_id=ba39165c-059a-ea30-c2e7-be3bb4ffc721 @module=sdk.proto tf_provider_addr=terraform-routeros/routeros tf_resource_type=routeros_ip_firewall_raw tf_rpc=ApplyResourceChange diagnostic_summary="from RouterOS device: input does not match any value of action" diagnostic_severity=ERROR tf_proto_version=5.6 timestamp="2024-08-06T15:59:30.593+0300" 2024-08-06T15:59:30.610+0300 [DEBUG] State storage *statemgr.Filesystem declined to persist a state snapshot 2024-08-06T15:59:30.610+0300 [ERROR] vertex "routeros_ip_firewall_raw.firewall_raw[0]" error: from RouterOS device: input does not match any value of action

Stack Trace If applicable, add the stack trace the crash produced.

Additional context Add any other context about the problem here.

vaerh commented 3 months ago

Ok, I'll fix it. The action should be called something else:

image

vaerh commented 3 months ago

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

The release is available on GitHub release

Your semantic-release bot :package::rocket: