Skip to content

edgedelta/terraform-provider-edgedelta

Repository files navigation

Terraform Provider Edge Delta

Edge Delta provider requires Terraform 0.13.0 and later.

Usage Example

When using the Edge Delta Provider, the recommended approach to pass the api_secret is to use an environment variable instead of explicitly passing the secret in the provider block.

terraform {
  required_providers {
    edgedelta = {
      source  = "edgedelta/edgedelta"
      version = "0.0.6"
    }
  }
}

variable "ED_API_TOKEN" {
  type = string
}

provider "edgedelta" {
  org_id             = "<your-organization-id>"
  api_secret         = var.ED_API_TOKEN
}

resource "edgedelta_config" "bare_minimum" {
  config_content     = file("/path/to/the/agent/configuration/file.yml")
}

Further usage documentation is available in the provider repo.

Developer Requirements

  • Terraform version 0.13.0+
  • Go version 1.17 (to build the provider plugin)

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).

First clone the repository to: $GOPATH/src/edgedelta.com/edgedelta/terraform-provider-edgedelta

repo_path="$GOPATH/src/edgedelta.com/edgedelta"
mkdir -p $repo_path
cd $repo_path
$ git clone git@github.com:edgedelta/terraform-provider-edgedelta
$ cd terraform-provider-edgedelta

Once inside the provider directory, you can compile the provider by running make, which will build the provider and put the provider binary in the ~/.terraform.d/plugins directory.