Terraform Provider for Mikrotik RouterOS

Overview

Terraform Provider RouterOS

Purpose

This provider is intended to be used with Router OS 7 and above. It makes use of the REST API introduced with Router OS v7.

Currently Implemented

  • Interface
    • Bridge
      • Bridge VLAN
      • Bridge Port
    • VLAN
  • IP
    • DHCP Client
    • DHCP Server
    • Pool
    • Route

Usage

Please refer to the documentation

Changelog

See changelog.md

Issues
  • Datasources that return array contain wrong values

    Datasources that return array contain wrong values

    Describe the bug I setup a RouterOS with two addresses (*1 and *2, using 10.0.9.1/24 and 192.168.88.1/24), the REST api also returns the correct values.

    Using the terraform provider, the list contains the same address twice and is missing the first one. When I create a third address, the array contains three times the last one.

    This is also reproducable for the interfaces and routes datasource.

    ip_addresses = {
      "addresses" = tolist([
        {
          "actual_interface" = "ether1"
          "address" = "192.168.88.1/24"
          "disabled" = true
          "dynamic" = false
          "id" = "*2"
          "interface" = "ether1"
          "invalid" = false
          "network" = "192.168.88.0"
        },
        {
          "actual_interface" = "ether1"
          "address" = "192.168.88.1/24"
          "disabled" = true
          "dynamic" = false
          "id" = "*2"
          "interface" = "ether1"
          "invalid" = false
          "network" = "192.168.88.0"
        },
      ])
      "id" = "terraform-20220120102446891700000001"
    }
    
    

    To Reproduce Setup multiple routes, addresses or interfaces and query those.

    Minimal terraform example:

    provider "routeros" {
      hosturl  = "https://10.0.9.150"
      username = "admin"
      password = ""
      insecure = true
    }
    
    data "routeros_interfaces" "interfaces" {}
    
    data "routeros_ip_routes" "routes" {}
    
    data "routeros_ip_addresses" "addresses" {}
    
    
    output "interfaces" {
      value = data.routeros_interfaces.interfaces
    }
    
    output "ip_addresses" {
      value = data.routeros_ip_addresses.addresses
    }
    
    output "routes" {
      value = data.routeros_ip_routes.routes
    }
    
    
    

    Expected behavior Array with the correct entries.

    bug 
    opened by deveth0 2
  • Add Github actions to repository

    Add Github actions to repository

    GitHub actions should be added to the repository to:

    • Create an ephemeral testing environment
    • Enable automated testing on a pull request
    • Enable releases to the Terraform registry to happen automatically when a new version tag is created
    enhancement 
    opened by GNewbury1 0
  • Provider prints the authentication credentials to stdout

    Provider prints the authentication credentials to stdout

    Describe the bug There is a call to fmt.Println for the HTTP request after the HTTP Basic Auth credentials are set, resulting in the base64 encoded credentials being written to stdout. The base64 string can easily be decoded to retrieve the original credentials. This is a significant security issue as it is very common for the output from stdout and stderr to be logged and the logs to be shipped to logging services where the logs are visible to many users.

    https://github.com/GNewbury1/terraform-provider-routeros/blob/0cab8e158a493160863e5d471fea65d35507445f/client/client.go#L55-L59

    To Reproduce https://go.dev/play/p/0_Tn0cCp7lM

    Expected behavior Provider does not write credentials to stdout.

    Additional context This issue may also exist elsewhere in the code, I haven't looked. You should remove all debug fmt.Print commands from the provider.

    bug 
    opened by jalseth 0
  • Add ipv6_neighbor_discovery

    Add ipv6_neighbor_discovery

    This seemed to work well during minimal testing, it could use a thorough review though.

    I also couldn't get the doc generation to work, so you may need to add those.

    opened by rifelpet 0
Releases(v0.3.2)
Owner
Guy Newbury
Guy Newbury
Terraform provider to help with various AWS automation tasks (mostly all that stuff we cannot accomplish with the official AWS terraform provider)

terraform-provider-awsutils Terraform provider for performing various tasks that cannot be performed with the official AWS Terraform Provider from Has

Cloud Posse 19 Jun 24, 2022
Terraform Provider for Azure (Resource Manager)Terraform Provider for Azure (Resource Manager)

Terraform Provider for Azure (Resource Manager) Version 2.x of the AzureRM Provider requires Terraform 0.12.x and later, but 1.0 is recommended. Terra

null 0 Oct 16, 2021
Terraform-provider-mailcow - Terraform provider for Mailcow

Terraform Provider Scaffolding (Terraform Plugin SDK) This template repository i

Owen Valentine 0 Dec 31, 2021
Terraform-provider-buddy - Terraform Buddy provider For golang

Terraform Provider for Buddy Documentation Requirements Terraform >= 1.0.11 Go >

Buddy 1 Jan 5, 2022
Terraform-provider-vercel - Terraform Vercel Provider With Golang

Vercel Terraform Provider Website: https://www.terraform.io Documentation: https

Vercel 54 Jun 25, 2022
Terraform-provider-age - Age Terraform Provider with golang

Age Terraform Provider This provider lets you generate an Age key pair. Using th

ConsenSys Software 0 Feb 15, 2022
kube-champ 37 Jun 6, 2022
Terraform-in-Terraform: Execute Modules directly from the Terraform Registry

Terraform-In-Terraform Provider This provider allows running Terraform in Terraform. This might seem insane but there are some edge cases where it com

WeakPixel 36 Jun 16, 2022
Terraform utility provider for constructing bash scripts that use data from a Terraform module

Terraform Bash Provider This is a Terraform utility provider which aims to robustly generate Bash scripts which refer to data that originated in Terra

Martin Atkins 32 Jun 23, 2022
Quick start repository for creating a Terraform provider using terraform-plugin-framework

Terraform Provider Scaffolding (Terraform Plugin Framework) This template repository is built on the Terraform Plugin Framework. The template reposito

HashiCorp 38 Jun 27, 2022
Terraform Provider Scaffolding (Terraform Plugin SDK)

Terraform Provider Scaffolding (Terraform Plugin SDK) This template repository is built on the Terraform Plugin SDK. The template repository built on

Brian Flad 0 Feb 8, 2022
OpenAPI Terraform Provider that configures itself at runtime with the resources exposed by the service provider (defined in a swagger file)

Terraform Provider OpenAPI This terraform provider aims to minimise as much as possible the efforts needed from service providers to create and mainta

Daniel I. Khan Ramiro 207 Jun 26, 2022
Hashicups-tf-provider - HashiCups Terraform Provider Tutorial

Terraform Provider HashiCups Run the following command to build the provider go

Andrew Xie 1 Jan 10, 2022
Terraform-grafana-dashboard - Grafana dashboard Terraform module

terraform-grafana-dashboard terraform-grafana-dashboard for project Requirements

hadenlabs 1 May 2, 2022
Puccini-terraform - Enable TOSCA for Terraform using Puccini

(work in progress) TOSCA for Terraform Enable TOSCA for Terraform using Puccini.

Tal Liron 3 Mar 30, 2022
Terraform-ncloud-docs - Terraform-ncloud-docs

terraform-ncloud-docs Overview This docs help to use terraform creation server C

Naver Cloud Platform 1 Mar 4, 2022
Terraform-house - Golang Based terraform automation example using tf.json

Terraform House Manage your own terraform workflow using go language, with the b

Bayu Rizky Ramadhan 0 Feb 17, 2022
LTF is a minimal, transparent Terraform wrapper. It makes Terraform projects easier to work with.

LTF Status: alpha LTF is a minimal, transparent Terraform wrapper. It makes Terraform projects easier to work with. In standard Terraform projects, th

Raymond Butcher 7 May 19, 2022
Terraform Controller manages the life cycles of a terraform resource, allowing developers to self-serve dependencies in a controlled manner.

TERRAFORM CONTROLLER Terraform Controller manages the life cycles of a terraform resource, allowing developers to self-serve dependencies in a control

appvia 40 Jun 27, 2022