This is a terraform provider that will use Terraform to drive cloudvision resources.
The provider gives the ability to
The provider itself can be found on the official Terraform registery as cloudvision
The provider uses go-cvprac which provides connectivy to either the Cloudvision on prem or Cloudvision as a service(cvaas)
Before proceeding please leverage the cloudvision service token.
To receive a service token please follow this guide
Once the token is issued it will need to be either referenced within a var as the following.
provider "cvprovider" {
cvp = "10.90.226.175"
cvptoken = "locationoftoken.txt"
port = 443
}
The alternative and suggested method is to use a environmental variable. For example,
export TF_VAR_cvptoken=123456789abcdefghi
Linux amd-64
make linux
Darwin amd-64
make darwin
terraform {
required_providers {
cvprovider = {
source = "aristanetworks/cloudvision"
}
}
}
provider "cvprovider" {
cvp = "cloudvisionservernameorip"
token = "${var.cvptoken}"
port = 443
}
data "cvprovider_data_inventory" "all" {
}
output "test" {
value = [for k in data.cvprovider_data_inventory.all.inventory : k.hostname]
}
All demos can be found within the examples/ directory.
cd examples/data-sources/example-data-inventory
terraform init
terraform plan
Truncated output
Changes to Outputs:
+ test = [
+ "SPINE-2",
+ "SPINE-1",
+ "LEAF3",
If this works you should be able to successfully run resources. This test is a simple test making sure that you can talk to Cloudvision portal.
Detailed documentation for the GitHub provider can be found here.
Detailed documentation for contributing to the GitHub provider can be found here.