Skip to content

Mathias-gt/terraform-provider-aosx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Terraform RESTCONF Provider

The Terraform AOS-X RESTCONF provider allows you to manage configuration of Alcatel-Lucent Enterprise OmniSwitch using the RESTCONF API.

Building the Provider

  1. Clone the provider repository:
git clone https://github.com/Mathias-gt/terraform-provider-aosx
  1. Move into the repository directory:
cd terraform-provider-aosx
  1. Build the provider binary:
go build -o terraform-provider-aosx
  1. Move the provider binary to the Terraform plugins directory:

For Terraform 0.12.x and earlier, you can put the provider binary in the same directory as your Terraform configuration files or in the user plugins directory, which is usually ~/.terraform.d/plugins on UNIX-like systems and %APPDATA%\terraform.d\plugins on Windows.

Example for Linux:

mkdir -p ~/.terraform.d/plugins/spacewalkers.com/ale/aosx/1.0.0/linux_amd64
mv -f terraform-provider-aosx ~/.terraform.d/plugins/spacewalkers.com/ale/aosx/1.0.0/linux_amd64

Example of main.tf file

terraform {
  required_providers {
    aosx = {
      source  = "spacewalkers.com/ale/aosx"
    }
  }
}

provider "aosx" {
  username = "admin"
  password = "switch"
}

  resource "aosx_restconf" "example" {
    path    = "https://172.26.9.40/restconf/data/ale-vlan:ale-vlan"
    delete_path    = "https://172.26.9.40/restconf/data/ale-vlan:ale-vlan/VLAN/VLAN_LIST=100"
    content = jsonencode({
            "ale-vlan:ale-vlan": {
                "VLAN": {
                    "VLAN_LIST": [
                        {
                            "vlan_id": 100,
                            "description": "VLAN_100",
                            "admin_status": "enable"
                        }
                    ]
                }
            }
        })
    }

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages