This is a Terraform provider for Juniper Apstra. It relies on a Go client library at https://github.com/Juniper/apstra-go-sdk
Instructions for popular operating systems can be found here.
The terraform configuration must:
- be named with a
.tffile extension. - reference this provider by its global address. registry.terraform.io/Juniper/apstra or just: Juniper/apstra.
- include a provider configuration block which tells the provider where to find the Apstra service.
terraform {
required_providers {
apstra = {
source = "Juniper/apstra"
}
}
}
provider "apstra" {
url = "<apstra-server-url>"
}Run the following at a command prompt while in the same directory as the configuration file to fetch the Apstra provider plugin.
terraform initApstra credentials can be supplied through environment variables:
export APSTRA_USER=<username>
export APSTRA_PASS=<password>Alternatively, credentials can be embedded in the URL using HTTP basic
authentication format (we don't actually do basic authentication, but the
format is: https://user:password@host). Any special characters in the username
and password must be URL-encoded when using this approach.
Full documentation for provider, resources and data sources can be found here.