How splunk-terraform/terraform-provider-signalfx works
Project type and purpose
• This is an open-source Terraform provider plugin (“terraform-provider-signalfx”) written in Go.
• Purpose: automate management of Splunk Observability Cloud resources (dashboards, integrations, charts, etc.) via Terraform.
File structure
• Top level:
• main.go – entrypoint registering the provider with Terraform Plugin SDK
• signalfx/ – Go package implementing the Provider, Resources, Data Sources
• internal/ – layered libraries:
– common, convert: helper functions and type conversions
– definition: per-resource schema + CRUD wiring
– framework: testing & provider scaffolding, plugin-protocol glue
– tfextension: Terraform extension helpers (diagnostics, logging)
– tftest: acceptance and unit test harness
– providermeta, track, visual: metadata, telemetry, presentation support
• templates/, docs/, examples/ – codegen templates, user docs, usage examples
• .github/workflows, goreleaser.yml, GNUmakefile – CI/CD, linting, release automation
README for additional insights
• Confirms it uses Terraform 0.12+ Plugin SDK and Go 1.19+.
• Describes build/test/release workflows.
• Integration test harness calls real Splunk APIs (and AWS for CloudWatch).
Essential architectural elements
• Lane 1: Terraform Core
• Lane 2: Plugin Host & gRPC
• Lane 3: Plugin internals (sub-layers)
• Lane 4: External services
• Within Plugin internals, further subdivide into:
• Provider registration
• Definition & schema
• Conversion helpers
• API client
• Test harness