website-and-documentation/content/en/docs/edgeconnect/terraform-provider.md
Martin McCaffery 885c5c9ac0
All checks were successful
ci / build (push) Successful in 1m15s
Fix broken links throughout docs
2025-12-19 15:54:03 +01:00

5.8 KiB

title linkTitle weight description
Terraform provider for Edge cloud Terraform provider 30 Custom Terraform provider for orchestrating Edge deployments

Overview

This work-in-progress Terraform provider for Edge cloud allows orchestration of selected resources using flexible, concise HCL. This allows deployment to Edge Cloud through a familiar format, abstracting away specific endpoints and authentication elements, and allowing seamless combination of Edge resources with others: on OTC, other clouds, or local utilities.

Key Features

  • Interact with Apps and AppInstances using widely-used Terraform framework
  • Using Terraform's systems, provide minimal configuration: just an endpoint and credentials, then no need to deal with headers or other API boilerplate
  • Also works with community-driven OpenTofu
  • Provider currently under development: more features can be added when requested.

Purpose in EDP

Interacting with infrastructure is a complex process, with many parameters and components working together. Doing so by clicking buttons in a web UI ("ClickOps") is extremely difficult to scale, rapidly becoming highly confusing.

Instead, automations are possible through APIs and SDKs. Working directly with an API (e.g. via curl) inevitably tends to involve large amounts of boilerplate code to manage authentication, rarely-changing configuration such as region/tenant selection, and more. When one resource (say, a web server) must interact with another (say, a DNS record), the cross-references further increase this complexity.

An SDK mitigates this complexity when coding software, by providing library functions which interact with the API in abstracted ways which require a minimum of necessary information. Our SDK for Edge Connect is described in a separate section.

However, when simply wanting to deploy infrastructure in isolation - say, updating the status of a Kubernetes or App resource after a change in configuration - an SDK is still an overly complicated tool.

This is where Terraform or its community-led alternative OpenTofu, come in. They provide a simple language for defining resources, with a level of abstraction that retains the power and flexibility of the API while greatly simplifying definitions and execution.

Terraform is widely used for major infrastructure systems such as AWS, Azure or general Kubernetes. However, it is highly flexible, supporting a range of resource types which are not inherently tied to infrastructure: file manipulation; package setup through Ansible; secret generation in Vault.

As a result of this breadth of functionality and cross-compatibility, Terraform support is considered by some as necessary for a platform to be used 'seriously' - that is, at scale, or in major workloads. Our provider thus unlocks broad market relevance for the platform in a way few other tools or features could.

Repository

Code: https://edp.buildth.ing/DevFW-CICD/terraform-provider-edge-connect

Documentation: Provider is intended to ultimately wrap each resource-based endpoint of the Edge API, but currently supports a limited subset of resources.

Getting Started

Prerequisites

Quick Start

  1. Configure Terraform to use the provider by including it in provider.tf
  2. In the same directory, create terraform resources in .tf files according to the spec
  3. Set up credentials using environment variables or a provider block
  4. Run terraform init in the directory
  5. Execute terraform plan and/or terraform apply to deploy your application
  6. terraform destroy can be used to remove all deployed resources

Verification

If terraform apply completes successfully (without errors), the provider is working correctly. You can also manually validate in the Edge UI that your resources have been deployed/reconfigured as Terraform indicated.

Status

Maturity: Experimental

Additional Resources

Integration Points

Component Architecture (C4)