6.3 KiB
| title | linkTitle | weight | description |
|---|---|---|---|
| Terraform provider for Edge cloud | Terraform provider | 20 | Custom Terraform provider for orchestrating Edge deployments |
{{% alert title="Draft" color="warning" %}} Editorial Status: Mostly ready
- Jira Ticket: TICKET-6732
- Assignee: Martin
- Status: Draft
- Last Updated: 2025-12-04
- TODO:
- Add detailed component description
- Include usage examples and code samples (NOTE: links to docs, rather than inline refs)
- Add architecture diagrams
- Review and finalize content {{% /alert %}}
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
- Configure Terraform to use the provider by including it in
provider.tf - In the same directory, create terraform resources in
.tffiles according to the spec - Set up credentials using environment variables or a
providerblock - Run
terraform initin the directory - Execute
terraform planand/orterraform applyto deploy your application terraform destroycan 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
- Edge Connect SDK: The provider uses the Edge Connect SDK under the hood.
- Terralist: The provider is published using a custom instance of Terralist. This can only be written to with a login via Forgejo, but can be read publicly.