feat(provider): add partial terraform provider docs
This commit is contained in:
parent
1ab3e6c262
commit
c345d3b3b5
2 changed files with 31 additions and 17 deletions
|
|
@ -2,7 +2,7 @@
|
|||
title: Terraform provider for Edge cloud
|
||||
linkTitle: Edge provider
|
||||
weight: 20
|
||||
description: Custom Terraform provider for orchestrating infrastructure deployments
|
||||
description: Custom Terraform provider for orchestrating Edge deployments
|
||||
---
|
||||
|
||||
{{% alert title="Draft" color="warning" %}}
|
||||
|
|
@ -26,39 +26,51 @@ This work-in-progress Terraform provider for Edge cloud allows orchestration of
|
|||
## 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 header structure or other tokens
|
||||
* Provider currently under development: more features can be added at will.
|
||||
* 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.
|
||||
|
||||
[Explain the role this component plays in the Edge Developer Platform and how it contributes to the overall platform capabilities]
|
||||
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](/docs/components/deployments/edgeconnect/edgeconnect-sdk/).
|
||||
|
||||
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](https://developer.hashicorp.com/terraform) or its community-led alternative [OpenTofu](https://opentofu.org/), 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](https://registry.terraform.io/providers/hashicorp/aws/latest/docs), [Azure](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs) or general [Kubernetes](https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs). However, it is highly flexible, supporting a range of resource types which are not inherently tied to infrastructure: [file](https://registry.terraform.io/search/providers?q=file) manipulation; package setup through [Ansible](https://registry.terraform.io/providers/ansible/aap/1.4.0); secret generation in [Vault](https://registry.terraform.io/providers/hashicorp/vault/latest/docs).
|
||||
|
||||
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**: [Link to source code repository]
|
||||
**Code**: https://edp.buildth.ing/DevFW-CICD/terraform-provider-edge-connect
|
||||
|
||||
**Documentation**: [Link to component-specific documentation]
|
||||
**Documentation**: Provider is intended to ultimately wrap each resource-based endpoint of the [Edge API](https://swagger.edge.platform.mg3.mdb.osc.live/), but currently supports a limited [subset of resources](https://edp.buildth.ing/DevFW-CICD/terraform-provider-edge-connect#resources).
|
||||
|
||||
## Getting Started
|
||||
|
||||
### Prerequisites
|
||||
|
||||
* [Prerequisite 1]
|
||||
* [Prerequisite 2]
|
||||
* [Terraform](https://developer.hashicorp.com/terraform) or [OpenTofu](https://opentofu.org/)
|
||||
* Edge access and credentials
|
||||
|
||||
### Quick Start
|
||||
|
||||
[Step-by-step guide to get started with this component]
|
||||
|
||||
1. [Step 1]
|
||||
2. [Step 2]
|
||||
3. [Step 3]
|
||||
1. Configure Terraform to use the provider by [including it](https://edp.buildth.ing/DevFW-CICD/terraform-provider-edge-connect#using-terraform-registry-recommended) in `provider.tf`
|
||||
1. In the same directory, create terraform resources in `.tf` files according to the [spec](https://edp.buildth.ing/DevFW-CICD/terraform-provider-edge-connect#resources)
|
||||
1. [Set up credentials](https://edp.buildth.ing/DevFW-CICD/terraform-provider-edge-connect/src/branch/main/README.md#provider-configuration) using environment variables or a `provider` block
|
||||
1. Run `terraform init` in the directory
|
||||
1. Execute `terraform plan` and/or `terraform apply` to deploy your application
|
||||
1. `terraform destroy` can be used to remove all deployed resources
|
||||
|
||||
### Verification
|
||||
|
||||
[How to verify the component is working correctly]
|
||||
If `terraform apply` completes successfully (without errors), the provider is working correctly. You may also manually validate (in the Edge UI) that your resources have been deployed/reconfigured as Terraform indicated.
|
||||
|
||||
## Usage Examples
|
||||
|
||||
|
|
@ -76,14 +88,16 @@ This work-in-progress Terraform provider for Edge cloud allows orchestration of
|
|||
|
||||
## Integration Points
|
||||
|
||||
* **[Component A]**: [How it integrates]
|
||||
* **[Component B]**: [How it integrates]
|
||||
* **Edge Connect SDK**: The provider uses the [Edge Connect SDK](http://localhost:1313/docs/components/deployments/edgeconnect/edgeconnect-sdk/) under the hood.
|
||||
* **Terralist**: The provider is published using a [custom instance](https://terralist.garm-provider-test.t09.de/) of [Terralist](https://www.terralist.io/). This [can only](https://edp.buildth.ing/DevFW-CICD/stacks/src/commit/5b438097bbd027f0025d6198c34c22f856392a03/template/stacks/terralist/terralist/values.yaml#L9-L38) be written to with a login via [Forgejo](https://edp.buildth.ing/), but can be accessed without such access.
|
||||
* **[Component C]**: [How it integrates]
|
||||
|
||||
## Architecture
|
||||
|
||||
[Optional: Add architectural diagrams and descriptions]
|
||||
|
||||
Terralist and its authentication
|
||||
|
||||
### Component Architecture (C4)
|
||||
|
||||
[Add C4 Container or Component diagrams showing the internal structure]
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ description: >
|
|||
* **Jira Ticket**: [TICKET-6732](https://jira.telekom-mms.com/browse/IPCEICIS-6732)
|
||||
* **Assignee**: Martin
|
||||
* **Status**: Draft
|
||||
* **Last Updated**: 2025-11-26
|
||||
* **Last Updated**: 2025-12-02
|
||||
* **TODO**:
|
||||
* [x] Add detailed component description
|
||||
* [x] Include usage examples and code samples
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue