terraform-provider-aoscx

command module
v0.0.0-...-dc295dc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 19, 2023 License: MPL-2.0 Imports: 3 Imported by: 0

README

Terraform Provider for AOS-CX

The Terraform Provider for AOS-CX provides a set of configuration management modules and resources specifically designed to manage/configure AOS-CX switches using REST API.

Requirements

Building The Provider

  1. Clone the repository git clone https://github.com/aruba/terraform-provider-aoscx.git
  2. Enter the repository directory cd terraform-provider-aoscx
  3. Build the provider using the Go install command:
$ go install

Using the AOS-CX provider

To use the AOS-CX Terraform provider you'll need to define the switch connection details inside a provider block with the following variables:

  • hostname: IP address of the switch
  • username: Username used to login to the switch using REST API
  • password: Password used to login to the switch using REST API
provider "aoscx" {
  hostname = "10.6.7.16"
  username = "admin"
  password = "admin"
}

Once the provider is defined then you'll define the resources you want Terraform manage on your CX switch. To see all supported resources and their required/optional values see the /docs directory.

Here's an example:

resource "aoscx_vlan" "vlan42" {
        vlan_id = 42
        name = "terraform vlan"
}

resource "aoscx_interface" "int_1_1_14" {
        name = "1/1/14"
        admin_state = "down"
        description = "terraform_uplink"
}

resource "aoscx_l2_interface" "int_1_1_15" {
        interface = "1/1/15"
        admin_state = "up"
        description = "terraform_downlink"
        vlan_mode = "access"
        vlan_tag = 42
}
resource "aoscx_l2_interface" "int_1_1_16" {
        interface = "1/1/16"
        admin_state = "down"
        vlan_mode = "trunk"
        vlan_ids = [20, 42]
        native_vlan_tag = true
}

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL