feat: add terraform generate command to export workspace resources to…#25
Merged
thibaultleouay merged 1 commit intomainfrom Apr 1, 2026
Merged
feat: add terraform generate command to export workspace resources to…#25thibaultleouay merged 1 commit intomainfrom
thibaultleouay merged 1 commit intomainfrom
Conversation
… 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
… HCL
Adds
openstatus terraform generate(aliastf gen) that fetches all workspace resources and generates Terraform HCL files with import blocks.internal/terraform/package with fetch, HCL generation (hclwrite), naming/dedup, region mapping (28 regions), and enum converters