Skip to content

Instantly share code, notes, and snippets.

@flrichar
Created November 29, 2022 15:26
Show Gist options
  • Save flrichar/9bc14ddfb517ab79cc02e3b6c19a36dc to your computer and use it in GitHub Desktop.
Save flrichar/9bc14ddfb517ab79cc02e3b6c19a36dc to your computer and use it in GitHub Desktop.
mikrotik dns terraform
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"
}
@flrichar
Copy link
Author

going to need to test this more with tls, LE or PrivateCA.

@flrichar
Copy link
Author

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