Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected value: aes256 for RouterOS v7.7 #291

Closed
bonjonson opened this issue Nov 8, 2023 · 1 comment · Fixed by #294
Closed

Unexpected value: aes256 for RouterOS v7.7 #291

bonjonson opened this issue Nov 8, 2023 · 1 comment · Fixed by #294
Labels
bug Something isn't working released

Comments

@bonjonson
Copy link
Contributor

bonjonson commented Nov 8, 2023

Describe the bug
The routeros_ovpn_server resource expects the cipher parameter "aes256-cbc", however in routeros the valid value for is "aes256"

To Reproduce
Define value cipher = "aes256" for routeros_ovpn_server

Expected behavior
Valid values:

/interface/ovpn-server> /interface/ovpn-server/server/set cipher=
aes128  aes192  aes256  blowfish128  null

Stack Trace

Planning failed. Terraform encountered an error while generating this plan.
╷
│ Error: Bad value
│ 
│   with module.ovpn_server.routeros_ovpn_server.server,
│   on ../modules/terraform-ros-ovpn-server/main.tf line 4, in resource "routeros_ovpn_server" "server":
│    4:   cipher                     = var.cipher
│ 
│ Unexpected value: aes256

But if I define value like "aes256-cbc

Terraform will perform the following actions:

  # module.ovpn_server.routeros_ovpn_server.server will be updated in-place
  ~ resource "routeros_ovpn_server" "server" {
      ~ cipher                     = "aes256" -> "aes256-cbc"
        id                         = "interface.ovpn-server.server"
      + reneg_sec                  = 3600
        # (17 unchanged attributes hidden)
    }

Plan: 0 to add, 1 to change, 0 to destroy.

Do you want to perform these actions?
  Terraform will perform the actions described above.
  Only 'yes' will be accepted to approve.

  Enter a value: yes

module.ovpn_server.routeros_ovpn_server.server: Modifying... [id=interface.ovpn-server.server]
╷
│ Error: from RouterOS device: invalid value for argument cipher
│ 
│   with module.ovpn_server.routeros_ovpn_server.server,
│   on ../modules/terraform-ros-ovpn-server/main.tf line 1, in resource "routeros_ovpn_server" "server":
│    1: resource "routeros_ovpn_server" "server" {
│ 

Additional context
RouterOS expect value like "aes256"

/interface ovpn-server server
set auth=sha256,sha512  cipher=aes256 <....> tls-version=only-1.2

RouterOS v7.7

@bonjonson bonjonson added the bug Something isn't working label Nov 8, 2023
@bonjonson bonjonson changed the title Unexpected value: aes256 Unexpected value: aes256 for RouterOS v7.7 Nov 8, 2023
vaerh added a commit that referenced this issue Nov 9, 2023
@vaerh vaerh closed this as completed in #294 Nov 9, 2023
@vaerh
Copy link
Collaborator

vaerh commented Nov 9, 2023

🎉 This issue has been resolved in version 1.22.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@vaerh vaerh added the released label Nov 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants