{"id":31146333,"url":"https://github.com/docspring/terraform-provider-logstruct","last_synced_at":"2026-01-28T06:54:33.038Z","repository":{"id":313158357,"uuid":"1050249018","full_name":"DocSpring/terraform-provider-logstruct","owner":"DocSpring","description":"Terraform provider for LogStruct to keep your CloudWatch metrics and alarms in sync","archived":false,"fork":false,"pushed_at":"2025-09-04T07:19:40.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-04T09:33:55.243Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DocSpring.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-04T06:53:35.000Z","updated_at":"2025-09-04T07:19:43.000Z","dependencies_parsed_at":"2025-09-04T09:44:14.199Z","dependency_job_id":null,"html_url":"https://github.com/DocSpring/terraform-provider-logstruct","commit_stats":null,"previous_names":["docspring/terraform-provider-logstruct"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/DocSpring/terraform-provider-logstruct","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DocSpring%2Fterraform-provider-logstruct","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DocSpring%2Fterraform-provider-logstruct/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DocSpring%2Fterraform-provider-logstruct/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DocSpring%2Fterraform-provider-logstruct/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DocSpring","download_url":"https://codeload.github.com/DocSpring/terraform-provider-logstruct/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DocSpring%2Fterraform-provider-logstruct/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275788051,"owners_count":25528695,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-18T02:00:09.552Z","response_time":77,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-09-18T15:09:37.989Z","updated_at":"2025-09-18T15:09:38.949Z","avatar_url":"https://github.com/DocSpring.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# terraform-provider-logstruct\n\nTerraform provider for LogStruct: type-safe CloudWatch filter patterns and LogStruct metadata validation at plan time.\n\nLinks:\n\n- Website: https://logstruct.com/\n- LogStruct (Ruby gem): https://github.com/DocSpring/logstruct\n- Provider (this repo): https://github.com/DocSpring/terraform-provider-logstruct\n\n## Features\n\n- Validate that a `struct` and `event` combination is valid based on LogStruct's typed definitions.\n- Generate CloudWatch Logs filter patterns without stringly-typed values.\n- Fail fast during `terraform validate/plan` if LogStruct enums/keys drift.\n\n## Data Sources\n\n### `logstruct_struct`\n\nInputs:\n\n- `struct` (string): e.g. `\"ActionMailer\"`\n\nOutputs:\n\n- `fixed_source` (string, null if not fixed)\n- `allowed_events` (list of strings)\n- `keys` (map): canonical key names, e.g. `evt`, `src`, etc.\n\n### `logstruct_cloudwatch_filter`\n\nInputs:\n\n- `struct` (string)\n- `event` (string, serialized value as emitted by LogStruct)\n- `predicates` (map(string =\u003e list(string)), optional): additional equality clauses\n\nOutputs:\n\n- `pattern` (string): CloudWatch filter pattern `{ $.src = \"mailer\" \u0026\u0026 $.evt = \"delivered\" ... }`\n\n## Installation\n\n```hcl\nterraform {\n  required_providers {\n    logstruct = {\n      source  = \"DocSpring/logstruct\"\n      version = \"\u003e= 0.1.0\"\n    }\n  }\n}\n```\n\n## Example\n\n```hcl\ndata \"logstruct_cloudwatch_filter\" \"email_delivered\" {\n  struct = \"ActionMailer\"\n  event  = \"delivered\"\n}\n\nresource \"aws_cloudwatch_log_metric_filter\" \"email_delivered_count\" {\n  name           = \"Email Delivered Count\"\n  log_group_name = var.log_group.docspring\n  pattern        = data.logstruct_cloudwatch_filter.email_delivered.pattern\n\n  metric_transformation {\n    name          = \"docspring_email_delivered_count\"\n    namespace     = var.namespace.logs\n    value         = \"1\"\n    default_value = \"0\"\n    unit          = \"Count\"\n  }\n}\n```\n\nSee more examples at https://logstruct.com/docs/terraform.\n\n## Releasing\n\nUse GoReleaser to build and publish GitHub releases with platform-specific zips and checksums. Tags must be semantic versions prefixed with `v` (e.g. `v0.1.0`).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdocspring%2Fterraform-provider-logstruct","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdocspring%2Fterraform-provider-logstruct","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdocspring%2Fterraform-provider-logstruct/lists"}