Skip to content

feat: add terraform generate command to export workspace resources to…#25

Merged
thibaultleouay merged 1 commit intomainfrom
terraform-import
Apr 1, 2026
Merged

feat: add terraform generate command to export workspace resources to…#25
thibaultleouay merged 1 commit intomainfrom
terraform-import

Conversation

@thibaultleouay
Copy link
Copy Markdown
Member

… HCL

Adds openstatus terraform generate (alias tf gen) that fetches all workspace resources and generates Terraform HCL files with import blocks.

  • New internal/terraform/ package with fetch, HCL generation (hclwrite), naming/dedup, region mapping (28 regions), and enum converters
  • Generates provider.tf, monitors.tf, notifications.tf, status_pages.tf, and imports.tf in ./openstatus-terraform/
  • Supports HTTP, TCP, DNS monitors, 12 notification providers, status pages with components and component groups
  • Cross-references single-value fields (page_id, monitor_id, group_id) as Terraform traversals with fallback to raw strings
  • Sensitive values emitted as "REPLACE_ME" with TODO comments
  • Updates CLI skill with terraform trigger phrases and workflow docs

… HCL

Adds `openstatus terraform generate` (alias `tf gen`) that fetches all
workspace resources and generates Terraform HCL files with import blocks.

- New `internal/terraform/` package with fetch, HCL generation (hclwrite),
  naming/dedup, region mapping (28 regions), and enum converters
- Generates provider.tf, monitors.tf, notifications.tf, status_pages.tf,
  and imports.tf in ./openstatus-terraform/
- Supports HTTP, TCP, DNS monitors, 12 notification providers, status pages
  with components and component groups
- Cross-references single-value fields (page_id, monitor_id, group_id) as
  Terraform traversals with fallback to raw strings
- Sensitive values emitted as "REPLACE_ME" with TODO comments
- Updates CLI skill with terraform trigger phrases and workflow docs
@thibaultleouay thibaultleouay merged commit cddeb9b into main Apr 1, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant