No description
Find a file
Martin McCaffery 7cb14a872a
All checks were successful
test / test (push) Successful in 20s
ci / goreleaser (push) Successful in 30s
test: output json from goreleaser
2025-11-19 09:58:57 +01:00
.github/workflows test: output json from goreleaser 2025-11-19 09:58:57 +01:00
examples Update SDK version to support AppName query for AppInst 2025-11-14 11:26:41 +01:00
internal/provider fix: Fixed handling of removed resources when reading from client 2025-11-17 16:31:11 +01:00
.gitignore init 2025-11-11 14:15:52 +01:00
.goreleaser.yaml improved .goreleaser.yaml 2025-11-18 15:46:54 +01:00
go.mod fix: Fixed handling of removed resources when reading from client 2025-11-17 16:31:11 +01:00
go.sum fix: Fixed handling of removed resources when reading from client 2025-11-17 16:31:11 +01:00
main.go fix: Fixed handling of removed resources when reading from client 2025-11-17 16:31:11 +01:00
Makefile init 2025-11-11 14:15:52 +01:00
README.md docs(README): Added section about installing local provider binary 2025-11-17 17:11:22 +01:00
terraform-registry-manifest.json added terraform-registry-manifest.json 2025-11-18 14:04:36 +01:00

Terraform Provider for Edge Connect

This Terraform provider allows you to manage Edge Connect applications and application instances.

Features

  • Manage application specifications (edge-connect_app resource)
  • Manage application instances (edge-connect_appinst resource)
  • Query existing applications and instances (data sources)
  • Support for bearer token and basic authentication
  • Full CRUD operations for all resources

Requirements

  • Terraform >= 1.0
  • Go >= 1.21 (for development)
  • Access to an Edge Connect API endpoint

Installation

terraform {
  required_providers {
    edge-connect = {
      source  = "DevFW-CICD/edge-connect"
      version = "~> 1.0"
    }
  }
}

Local Development

  1. Clone the repository:
git clone ssh://git@edp.buildth.ing/DevFW-CICD/terraform-provider-edge-connect.git
cd terraform-provider-edge-connect
  1. Build the provider:
go build -o terraform-provider-edge-connect
  1. Install locally:
mkdir -p ~/.terraform.d/plugins/registry.terraform.io/DevFW-CICD/edge-connect/1.0.0/darwin_arm64
cp terraform-provider-edge-connect ~/.terraform.d/plugins/registry.terraform.io/DevFW-CICD/edge-connect/1.0.0/darwin_arm64/

Note: Adjust the path based on your OS and architecture (e.g., linux_amd64, darwin_amd64, etc.)

Usage

Provider Configuration

As the provider is currently not officially registered for public download, terraform must be configured to use a locally built version.

To generate the binary run go install . from the repository root. This installs the provider binary to $HOME/go/bin and means that terraform init is not necessary.

You will also need a ~/.terraformrc file with the following contents. <home> should refer to your $HOME directory.

provider_installation {

  dev_overrides {
      "local/edge-connect" = "<home>/go/bin"
  }

  # For all other providers, install them directly from their origin provider
  # registries as normal. If you omit this, Terraform will _only_ use
  # the dev_overrides block, and so no other providers will be available.
  direct {}
}

You can then reference the local provider in your .tf files as follows:

provider "edge-connect" {
  base_url = "https://edp.buildth.ing"
  token    = var.edge_connect_token
}

Or using basic authentication:

provider "edge-connect" {
  base_url = "https://edp.buildth.ing"
  username = var.edge_connect_username
  password = var.edge_connect_password
}

Configuration can also be provided via environment variables:

  • EDGE_CONNECT_BASE_URL
  • EDGE_CONNECT_TOKEN
  • EDGE_CONNECT_USERNAME
  • EDGE_CONNECT_PASSWORD

Creating an Application

resource "edge-connect_app" "example" {
  region       = "EU"
  organization = "myorg"
  name         = "my-app"
  version      = "1.0.0"

  image_type     = "Docker"
  image_path     = "nginx:latest"
  deployment     = "kubernetes"
  default_flavor = "EU.small"
  access_ports   = "tcp:80,tcp:443"
}

Creating an Application Instance

resource "edge-connect_appinst" "example" {
  region = "EU"

  app_organization      = edge-connect_app.example.organization
  app_name              = edge-connect_app.example.name
  app_version           = edge-connect_app.example.version
  cloudlet_organization = "cloudlet-org"
  cloudlet_name         = "edge-cloudlet-1"
  cluster_organization  = "cluster-org"

  flavor = "EU.medium"
}

Using Data Sources

data "edge-connect_app" "existing" {
  region       = "EU"
  organization = "myorg"
  name         = "existing-app"
  version      = "2.0.0"
}

output "app_image" {
  value = data.edge-connect_app.existing.image_path
}

Resources

edge-connect_app

Manages an Edge Connect application specification.

Arguments

  • region (Required, Forces new resource) - The region where the app is deployed (e.g., 'EU')
  • organization (Required, Forces new resource) - The organization that owns the app
  • name (Required, Forces new resource) - The name of the application
  • version (Required, Forces new resource) - The version of the application
  • image_type (Required) - The type of image (e.g., 'Docker')
  • image_path (Required) - The path to the container image
  • deployment (Required) - The deployment type (e.g., 'kubernetes')
  • default_flavor (Optional) - The default flavor (e.g., 'EU.small', 'EU.medium', 'EU.big', 'EU.large')
  • deployment_manifest (Optional) - The Kubernetes deployment manifest (YAML)
  • access_ports (Optional) - The access ports in format 'protocol:port' (e.g., 'tcp:80,tcp:443')
  • annotations (Optional) - Annotations for the app

Attributes

  • id - The unique identifier (format: region/organization/name/version)
  • created_at - The timestamp when the app was created
  • updated_at - The timestamp when the app was last updated

edge-connect_appinst

Manages an Edge Connect application instance.

Arguments

  • region (Required, Forces new resource) - The region where the app instance is deployed
  • app_organization (Required, Forces new resource) - The organization that owns the app
  • app_name (Required, Forces new resource) - The name of the application
  • app_version (Required, Forces new resource) - The version of the application
  • cloudlet_organization (Required, Forces new resource) - The organization that owns the cloudlet
  • cloudlet_name (Required, Forces new resource) - The name of the cloudlet
  • cluster_organization (Required, Forces new resource) - The organization that owns the cluster
  • cloudlet (Optional) - The cloudlet identifier
  • flavor (Optional) - The flavor for the app instance

Attributes

  • id - The unique identifier
  • real_cluster_name - The real cluster name
  • state - The state of the app instance
  • runtime_info - Runtime information for the app instance
  • uri - The URI to access the app instance
  • liveness - The liveness status of the app instance
  • power_state - The power state of the app instance
  • created_at - The timestamp when the app instance was created
  • updated_at - The timestamp when the app instance was last updated

Data Sources

data.edge-connect_app

Fetches information about an existing Edge Connect application.

Arguments

  • region (Required) - The region where the app is deployed
  • organization (Required) - The organization that owns the app
  • name (Required) - The name of the application
  • version (Required) - The version of the application

data.edge-connect_appinst

Fetches information about an existing Edge Connect application instance.

Arguments

  • region (Required) - The region where the app instance is deployed
  • app_organization (Required) - The organization that owns the app
  • app_name (Required) - The name of the application
  • app_version (Required) - The version of the application
  • cloudlet_organization (Required) - The organization that owns the cloudlet
  • cloudlet_name (Required) - The name of the cloudlet
  • cluster_organization (Required) - The organization that owns the cluster

Examples

See the examples directory for complete usage examples.

Development

Building

go build -o terraform-provider-edge-connect

Testing

go test ./...

Running Example

cd examples
terraform init
terraform plan
terraform apply

Contributing

Contributions are welcome! Please submit pull requests or open issues on the repository.

License

This provider is distributed under the Mozilla Public License 2.0. See LICENSE for more information.

Support

For issues and questions: