iosifnicolae2 / terraform-provider-routeros

Terraform Provider for Mikrotik RouterOS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Terraform Provider RouterOS

module testing workflow

Note: A breaking change was introduced as part of v1.0.3 of the provider. This has been reverted in v1.0.4. Please do not use v1.0.3.

Purpose

This provider allows you to configure Mikrotik routers using old API or REST API, using or not using TLS.

From version 1.0.0, the provider has been rewritten by vaerh, and their fork has now been merged. This version drastically improves adding new endpoints to the provider, enabling significantly easier development. vaerh has been added as a maintainer to this project.

We are not affiliated in any way with Mikrotik or the development of RouterOS

Using the provider

To get started with the provider, you first need to enable the REST API on your router. You can follow the Mikrotik documentation on this, but the gist is to create an SSL cert (in /system/certificates) and enable the web-ssl service (in /ip/services) which uses that certificate. After that, include the following in your Terraform manifests:

terraform {
  required_providers {
    routeros = {
      source = "terraform-routeros/routeros"
    }
  }
}

provider "routeros" {
  hosturl  = "(https|api|apis)://my.router.local[:port]"
  username = "my_username"
  password = "my_super_secret_password"
}

For more in-depth documentation about each of the resources and datasources, please read the documentation on Hashicorp's Provider registry

Versions tested

  • go 1.19 and ROS 7.7, 7.8, 7.9 (stable)

Changelog

For a detailed changelog, please see the changelog.md.

Contributing

This version of the module greatly simplifies the process of adding new resources. You are welcome!

About

Terraform Provider for Mikrotik RouterOS

License:Mozilla Public License 2.0


Languages

Language:Go 99.6%Language:Makefile 0.4%