https://github.com/jeremmfr/terraform-provider-junos
Terraform provider for Junos devices
https://github.com/jeremmfr/terraform-provider-junos
junos-automation netconf terraform-provider
Last synced: about 1 month ago
JSON representation
Terraform provider for Junos devices
- Host: GitHub
- URL: https://github.com/jeremmfr/terraform-provider-junos
- Owner: jeremmfr
- License: mit
- Created: 2019-09-02T10:54:46.000Z (about 6 years ago)
- Default Branch: main
- Last Pushed: 2025-08-18T07:12:33.000Z (about 2 months ago)
- Last Synced: 2025-08-18T09:19:19.097Z (about 2 months ago)
- Topics: junos-automation, netconf, terraform-provider
- Language: Go
- Homepage: https://registry.terraform.io/providers/jeremmfr/junos
- Size: 10.9 MB
- Stars: 66
- Watchers: 8
- Forks: 24
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: .github/CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# terraform-provider-junos
[](https://github.com/jeremmfr/terraform-provider-junos/releases)
[](https://github.com/jeremmfr/terraform-provider-junos/releases)
[](https://registry.terraform.io/providers/jeremmfr/junos)
[](https://registry.terraform.io/providers/jeremmfr/junos/latest/docs)
[](https://github.com/jeremmfr/terraform-provider-junos/blob/main/LICENSE)
[](https://github.com/jeremmfr/terraform-provider-junos/actions/workflows/go.yml)
[](https://github.com/jeremmfr/terraform-provider-junos/actions/workflows/linters.yml)
[](https://www.buymeacoffee.com/jeremmfr)---
This is an **unofficial** Terraform provider for Junos devices with netconf protocol
See [Terraform registry](https://registry.terraform.io/providers/jeremmfr/junos)
for provider and resources documentation.## Requirements
- [Terraform](https://developer.hashicorp.com/terraform/install)
### In addition to develop
- [Go](https://go.dev/doc/install) `v1.24` or `v1.25`
## Automatic install
Add source information inside the Terraform configuration block for automatic provider installation:
```hcl
terraform {
required_providers {
junos = {
source = "jeremmfr/junos"
}
}
}
```## Manual install
- Download latest version in [releases](https://github.com/jeremmfr/terraform-provider-junos/releases)
- Extract provider binary in
[local mirror directory](https://developer.hashicorp.com/terraform/cli/config/config-file#implied-local-mirror-directories)
with a fake registry (`registry.local`):```bash
for archive in $(ls terraform-provider-junos*.zip) ; do
OS_ARCH=$(echo $archive | cut -d'_' -f3-4 | cut -d'.' -f1)
VERSION=$(echo $archive | cut -d'_' -f2)
tfPath="${HOME}/.terraform.d/plugins/registry.local/jeremmfr/junos/${VERSION}/${OS_ARCH}/"
mkdir -p ${tfPath}
unzip ${archive} -d ${tfPath}
done
```- Add inside the terraform configuration block:
```hcl
terraform {
required_providers {
junos = {
source = "registry.local/jeremmfr/junos"
}
}
}
```## Missing Junos parameters
Some Junos parameters are not included in provider for various reasons
(time, utility, understanding, ...) but you can create a issue
to request the potential addition of missing features.## Contributing
To contribute, please read the [contribution guideline](.github/CONTRIBUTING.md)
## Compile a binary from source to use with Terraform
### Build to override automatic install version (Terraform 0.14 and later)
Since Terraform 0.14,
[development overrides for provider developers](https://developer.hashicorp.com/terraform/cli/config/config-file#development-overrides-for-provider-developers)
allow to use the provider built from source.
Use a Terraform [cli configuration file](https://developer.hashicorp.com/terraform/cli/config/config-file)
(`~/.terraformrc` by default) with at least the following options:```hcl
provider_installation {
dev_overrides {
"jeremmfr/junos" = "[replace with the GOPATH]/bin"
}
direct {}
}
```and build then install in $GOPATH/bin:
```bash
git clone https://github.com/jeremmfr/terraform-provider-junos.git
cd terraform-provider-junos
go install
```---
### Build to use with a fake registry (Terraform 0.13)
```bash
git clone https://github.com/jeremmfr/terraform-provider-junos.git
cd terraform-provider-junos && git fetch --tags
latestTag=$(git describe --tags `git rev-list --tags --max-count=1`)
git checkout ${latestTag}
tfPath="${HOME}/.terraform.d/plugins/registry.local/jeremmfr/junos/${latestTag:1}/$(go env GOOS)_$(go env GOARCH)/"
mkdir -p ${tfPath}
go build -o ${tfPath}/terraform-provider-junos_${latestTag}
unset latestTag tfPath
```and add inside the terraform configuration block:
```hcl
terraform {
required_providers {
junos = {
source = "registry.local/jeremmfr/junos"
}
}
}
```