/terraform-provider-solidserver

A simple Terraform provider to interact with EfficientIP's SOLIDServer

Primary LanguageGoBSD 2-Clause "Simplified" LicenseBSD-2-Clause

License Go Report Card

EfficientIP SOLIDserver Provider

This provider allows to easily interact with EfficientIP's SOLIDserver REST API. It allows to manage supported resources through CRUD operations for efficient DDI orchestration.

This provider is compatible with EfficientIP SOLIDserver version 6.0.2 and higher.

Build

Download the latest revision of the master branch then use the go compiler to generate the binary.

cd "${GOPATH}"
go get github.com/EfficientIP-Labs/terraform-provider-solidserver
cd ./src/github.com/EfficientIP-Labs/terraform-provider-solidserver
go get
go build -o terraform-provider-solidserver_vX.Y.Z

Install

If using terraform 0.13 or higher, you can leverage the terraform registry to install the provider see here.

Otherwise, you can either download the appropriate build for your system from the release page or build the master branch of this repository. In both cases, you will need to deploy the provider binary file in the proper directory as described below.

Linux

Create the following folder path: $HOME/.terraform.d/plugins/terraform.efficientip.com/efficientip/solidserver/<provider_version>/linux_amd64 Move the provider binary file terraform-provider-solidserver_vX.Y.Z into the previously created directory. Refer to it within your terraform file as follow:

terraform {
  required_providers {
    solidserver = {
      source  = "terraform.efficientip.com/efficientip/solidserver"
      version = "X.Y.Z"
    }
  }
}

Windows

Create the following folder path: %APPDATA%\terraform.d\plugins\terraform.efficientip.com\efficientip\solidserver\<provider_version>/linux_amd64. Move the provider binary file terraform-provider-solidserver_vX.Y.Z into the previously created directory. Refer to it within your terraform file as follow:

terraform {
  required_providers {
    solidserver = {
      source  = "terraform.efficientip.com/efficientip/solidserver"
      version = "X.Y.Z"
    }
  }
}

Debug

You can enable debug mode by exporting TF_LOG environment variable setting its value to DEBUG.

For further details have a look to the terraform documentation

Acceptance Tests

In order to perform the acceptance tests of the solidserver module, first set in your environment the variables required for the connection (SOLIDServer_HOST, SOLIDServer_USERNAME and SOLIDServer_PASSWORD). In addition you could disable the TLS certificate validation by setting the SOLIDServer_SSLVERIFY to false.

TF_ACC=1 go test solidserver -v -count=1 -tags "all"

Using the SOLIDserver provider

SOLIDServer provider supports the following arguments:

  • username - (Required) Username used to establish the connection. Can be stored in SOLIDServer_USERNAME environment variable.
  • password - (Required) Password associated with the username. Can be stored in SOLIDServer_PASSWORD environment variable.
  • host - (Required) IP Address of the SOLIDServer REST API endpoint. Can be stored in SOLIDServer_HOST environment variable.
  • sslverify - (Optional) Enable/Disable ssl certificate check. Can be stored in SOLIDServer_SSLVERIFY environment variable.
  • additional_trust_certs_file - (Optional) Path to a file containing concatenated PEM-formatted certificates that will be trusted in addition to system defaults.
  • solidserverversion - (Optional) The version of the SOLIDserver to interact with. This field is only for API users not able to retrieve this information dynamically.
provider "solidserver" {
    username = "username"
    password = "password"
    host  = "192.168.0.1"
    sslverify = "false"
}

Available Resources

SOLIDServer provider allows to manage several resources listed below:

Available Data-Sources

SOLIDServer provider allows to retrieve information from several resources listed below: