{"id":22347768,"url":"https://github.com/wearetechnative/terraform-null-url-parser","last_synced_at":"2026-01-06T07:34:20.465Z","repository":{"id":200936706,"uuid":"706566442","full_name":"wearetechnative/terraform-null-url-parser","owner":"wearetechnative","description":"Parse a full url into seperate URL components","archived":false,"fork":false,"pushed_at":"2025-01-14T13:22:33.000Z","size":205,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-31T12:12:36.377Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://registry.terraform.io/modules/TechNative-B-V/url-parser/null/latest","language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wearetechnative.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2023-10-18T07:49:37.000Z","updated_at":"2025-01-14T13:22:37.000Z","dependencies_parsed_at":null,"dependency_job_id":"c8a9c969-c5ae-4319-8f33-298e892e8688","html_url":"https://github.com/wearetechnative/terraform-null-url-parser","commit_stats":null,"previous_names":["wearetechnative/terraform-null-url-parser"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wearetechnative%2Fterraform-null-url-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wearetechnative%2Fterraform-null-url-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wearetechnative%2Fterraform-null-url-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wearetechnative%2Fterraform-null-url-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wearetechnative","download_url":"https://codeload.github.com/wearetechnative/terraform-null-url-parser/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245641317,"owners_count":20648637,"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","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":"2024-12-04T10:10:51.705Z","updated_at":"2026-01-06T07:34:15.429Z","avatar_url":"https://github.com/wearetechnative.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# terraform-null-url-parser ![](https://img.shields.io/github/actions/workflow/status/TechNative-B-V/terraform-null-url-parser/lint_test.yaml)\n\n\n\nThis module parses a given URL into seperate components.\n\n[![](we-are-technative.png)](https://www.technative.nl)\n\n## What is it good for?\n\nSay you want to configure an S3 bucket as redirecting website. You can use\n*url-parser* for setting `hostname`, `protocol` and `path` in your\n`routing_rules`.\n\n## Release workflow\n\nThis repository uses [pre-commit](https://pre-commit.com/) to ensure consistent documentation. This is accomplished by running \"pre-commit\" before committing your changes and will then execute the hooks defined in the [`.pre-commit-config.yaml`](.pre-commit-config.yaml) file.\n\nYou can install \"pre-commit\" by running \"pip install pre-commit\"\n\nOnce a commit is pushed, a github will run an automated test to validate that the new commit will not break anything.\n\n## Usage\n\n```hcl\n\nmodule \"target_url\" {\n  source = \"TechNative-B-V/terraform-null-url-parser/null\"\n  version = \"0.1.0\"\n\n  url    = \"https://registry.terraform.io/namespaces/TechNative-B-V\"\n}\n\nresource \"aws_s3_bucket_website_configuration\" \"bucket_webconf\" {\n\n  ...\n\n  routing_rules = \u003c\u003cEOF\n[{\n    \"Redirect\": {\n        \"Hostname\": \"${module.target_url.hostname}\",\n        \"Protocol\": \"${module.target_url.protocol}\",\n        \"ReplaceKeyWith\": \"${module.target_url.path_and_param}\"\n    }\n}]\nEOF\n}\n```\n\nThis generates:\n\n```\n[{\n    \"Redirect\": {\n        \"Hostname\": \"registry.terraform.io\",\n        \"Protocol\": \"https\",\n        \"ReplaceKeyWith\": \"/namespaces/TechNative-B-V\"\n    }\n}]\n```\n\n\u003c!-- BEGIN_TF_DOCS --\u003e\n## Resources\n\nNo resources.\n\n## Inputs\n\n| Name | Description | Type | Default | Required |\n|------|-------------|------|---------|:--------:|\n| \u003ca name=\"input_url\"\u003e\u003c/a\u003e [url](#input\\_url) | URL to parse | `string` | n/a | yes |\n\n## Outputs\n\n| Name | Description |\n|------|-------------|\n| \u003ca name=\"output_anchor\"\u003e\u003c/a\u003e [anchor](#output\\_anchor) | Anchor component of URL. E.g http://test.com/index.html#second-paragrapth -\u003e 'second-paragraph' |\n| \u003ca name=\"output_hostname\"\u003e\u003c/a\u003e [hostname](#output\\_hostname) | Hostname component of URL. E.g http://dev.test.com -\u003e 'dev.test.com' |\n| \u003ca name=\"output_parsed_url\"\u003e\u003c/a\u003e [parsed\\_url](#output\\_parsed\\_url) | All URL components as map of strings |\n| \u003ca name=\"output_path\"\u003e\u003c/a\u003e [path](#output\\_path) | Path component of URL. E.g http://test.com/blog/one -\u003e '/blog/one' |\n| \u003ca name=\"output_path_and_param\"\u003e\u003c/a\u003e [path\\_and\\_param](#output\\_path\\_and\\_param) | The path, query string and anchor components combined as one string. |\n| \u003ca name=\"output_protocol\"\u003e\u003c/a\u003e [protocol](#output\\_protocol) | Protocol component of URL. E.g http://test.com -\u003e 'http' |\n| \u003ca name=\"output_query\"\u003e\u003c/a\u003e [query](#output\\_query) | Query string component of URL. E.g http://test.com/index.html?a=1\u0026b=2 -\u003e 'a=1\u0026b2' |\n\u003c!-- END_TF_DOCS --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwearetechnative%2Fterraform-null-url-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwearetechnative%2Fterraform-null-url-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwearetechnative%2Fterraform-null-url-parser/lists"}