Created
November 29, 2022 15:26
-
-
Save flrichar/9bc14ddfb517ab79cc02e3b6c19a36dc to your computer and use it in GitHub Desktop.
mikrotik dns terraform
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
terraform { | |
required_providers { | |
mikrotik = { | |
source = "ddelnano/mikrotik" | |
version = ">= 0.9.1" | |
} | |
} | |
} | |
# Configure the mikrotik Provider, | |
# can be via Env variables as well | |
provider "mikrotik" { | |
host = "hexs760.gxize.local:8728" | |
username = "some-user" | |
password = "some-password" | |
######## | |
##ca_certificate = "/path/to/ca/certificate.pem" | |
insecure = true | |
tls = false | |
} | |
resource "mikrotik_dns_record" "traefik-n515" { | |
name = "traefik-n515.gxize.local" | |
address = "10.16.23.216" | |
ttl = 900 | |
comment = "VIP for traefik-dashboard on n515, Nov-2022" | |
} |
That moment when you see Mikrotik has a REST API -- https://help.mikrotik.com/docs/display/ROS/REST+API ...
gees this just became much easier.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
going to need to test this more with tls, LE or PrivateCA.