GithubHelp home page GithubHelp logo

evgeniyprudchenko / terraform-provider-mikrotik Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ddelnano/terraform-provider-mikrotik

0.0 0.0 0.0 11.14 MB

License: MIT License

Go 99.76% Makefile 0.24%

terraform-provider-mikrotik's Introduction

Mikrotik provider for Terraform

Intro

This is a terraform provider for managing resources on your RouterOS device. To see what resources and data sources are supported, please see the documentation on the terraform registry.

Support

You can discuss any issues you have or feature requests in Discord.

Donations

If you get value out this project and want to show your support you can find me on patreon.

Building provider locally

Requirements:

To build the provider with make:

$ make build

which creates a terraform-provider-mikrotik binary in repository's root folder.

or build with go compiler:

$ go build -o terraform-provider-mikrotik

To use locally built provider, Terraform should be aware of its binary.

It could be done with custom CLI config file:

# custom.tfrc

provider_installation {
    dev_overrides {
        "ddelnano/mikrotik" = "/path/to/clones/repository/terraform-provider-mikrotik"
    }

    direct {}
}

The dev_overrides section is available since Terraform 0.14.

Finally, tell Terraform CLI to use custom confiuration by exporting environment variable:

$ export TF_CLI_CONFIG_FILE=path/to/custom.tfrc

NOTE: with dev_overrides it is not possible to run terraform init (see official docs) so you should immediately use terraform plan and terraform apply without initializing.

Contributing

Dependencies

  • RouterOS. See which versions are supported by what is tested in CI
  • Terraform 0.12+

Testing

The provider is tested with Terraform's acceptance testing framework. As long as you have a RouterOS device you should be able to run them. Please be aware it will create resources on your device! Code that is accepted by the project will not be destructive for anything existing on your router but be careful when changing test code!

In order to run the tests you will need to set the following environment variables:

export MIKROTIK_HOST=router-hostname:8728
export MIKROTIK_USER=username
# Please be aware this will put your password in your bash history and is not safe
export MIKROTIK_PASSWORD=password

After those environment variables are set you can run the tests with the following command:

make testacc

terraform-provider-mikrotik's People

Contributors

ddelnano avatar maksym-nazarenko avatar jdelnano avatar stacab avatar ivoronin avatar jmbaur avatar v12 avatar mskriver avatar holmesb avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.