NOTE: ## ### this is a fork of the CiscoDevNet provider by Apcela intended to be published independently.
There are still many references to CiscoDevNet
in the code and docs, many of these are historical at this point.
This provider is being developed and tested against:
Clone this repository and enter the provider directory.
$ git clone https://github.com/Apcela/terraform-provider-sdwan.git
Enter the provider directory. Use the make
command to build, test and validate the provider.
$ cd terraform-provider-sdwan
$ make
Move the generated binary from the build step to the plugin directory/CiscoDevNet/sdwan/<version>
/<os>_<arch>
. Examples for <os>_<arch>
are windows_amd64
, linux_arm
, darwin_amd64
, etc. After placing it into your plugins directory, run terraform init
to initialize it.
example:
#configure provider with your SDWAN credentials.
terraform {
required_providers {
sdwan = {
source = "Apcela/sdwan"
}
}
}
provider "sdwan" {
# cisco-sdwan user name
username = "admin"
# cisco-sdwan password
password = "password"
# cisco-sdwan url
url = "https://my-cisco-sdwan.com"
insecure = true
}
resource "sdwan_device_template" "test" {
template_name = "example1"
template_description = "For testing purpose"
device_type = "vedge-cloud"
device_role = "sdwan-edge"
config_type = "file"
factory_default = false
template_configuration = "`"
}
If you want to work on the provider, you'll first need Go installed on your machine. You'll also need to correctly setup a GOPATH, as well as adding $GOPATH/bin
to your $PATH
.
To compile the provider, run make build
. This will build the provider with sanity checks present in scripts directory and put the provider binary in $GOPATH/bin
directory.
- Set environment variable
TF_LOG
to one of the log levelsTRACE
,DEBUG
,INFO
,WARN
orERROR
- Set environment variable
TF_LOG_PATH
to write logs in a file. e.g.TF_LOG_PATH=tf.log
For more details visit - Terraform Debugging