Skip to content

poroping/terraform-provider-fortios

 
 

Repository files navigation

FortiOS Terraform Provider

Requirements

  • Terraform 0.15.x +
  • Go 1.17.x (to build the provider plugin)

Building the Provider

  1. Clone repository to: $GOPATH/src/github.com/terraform-providers/terraform-provider-fortios.

    mkdir -p $GOPATH/src/github.com/terraform-providers; cd $GOPATH/src/github.com/terraform-providers
    git clone git@github.com:poroping/terraform-provider-fortios
  2. Enter the provider directory and build the provider.

    cd $GOPATH/src/github.com/terraform-providers/terraform-provider-fortios
    go build

Using the Provider

If you're building the provider, follow the instructions to install it as a plugin. After placing it into your plugins directory, run terraform init --upgrade to initialize it.

terraform init --upgrade

Developing the Provider

If you wish to work on the provider, you'll first need Go installed on your machine (version 1.17+ is required). You'll also need to correctly setup a GOPATH, as well as adding $GOPATH/bin to your $PATH.

To compile the provider, run go install. This will build the provider and put the provider binary in the $GOPATH/bin directory.

go install

Versioning

The provider was generated from schemas covering 6.2, 6.4 and 7.0. Acceptance testing is performed with the latest GA release.

Contributions and Bugs

Feel free to raise an issue for a bug or feature request.

Collecting debug information

This information will be crucial to quickly resolving any issues.

  • SSH to your FortiGate. Close any open GUI windows as this will generate spam during the debug. Run the following commands:

    diagnose debug enable
    diagnose debug application httpsd -1
    diagnose debug cli 8
    
  • Run terraform apply with debugging enabled:

    TF_LOG=debug terraform apply