{"id":13707030,"url":"https://github.com/alexandrst88/terraform-variables-generator","last_synced_at":"2025-10-24T12:31:06.407Z","repository":{"id":56191916,"uuid":"131874946","full_name":"alexandrst88/terraform-variables-generator","owner":"alexandrst88","description":"Simple Tool for Generate Variables file from Terraform Configuration","archived":false,"fork":false,"pushed_at":"2020-12-25T05:49:55.000Z","size":31,"stargazers_count":185,"open_issues_count":3,"forks_count":33,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-01-31T01:15:33.224Z","etag":null,"topics":["terraform","terraform-code","terraform-configurations","terraform-scripts","terraform-templates","terraform-variables","tf-files"],"latest_commit_sha":null,"homepage":"","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/alexandrst88.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-05-02T16:03:41.000Z","updated_at":"2024-04-12T19:24:29.000Z","dependencies_parsed_at":"2022-08-15T14:20:53.503Z","dependency_job_id":null,"html_url":"https://github.com/alexandrst88/terraform-variables-generator","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexandrst88%2Fterraform-variables-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexandrst88%2Fterraform-variables-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexandrst88%2Fterraform-variables-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexandrst88%2Fterraform-variables-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alexandrst88","download_url":"https://codeload.github.com/alexandrst88/terraform-variables-generator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237964507,"owners_count":19394414,"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":["terraform","terraform-code","terraform-configurations","terraform-scripts","terraform-templates","terraform-variables","tf-files"],"created_at":"2024-08-02T22:01:16.038Z","updated_at":"2025-10-24T12:31:01.027Z","avatar_url":"https://github.com/alexandrst88.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# terraform-variables-generator\n\nTerraform versions support ![version](https://img.shields.io/badge/version-0.11.*-blue) ![version](https://img.shields.io/badge/version-0.12.*-blue) ![version](https://img.shields.io/badge/version-0.13.*-blue) ![Build Status](https://github.com/alexandrst88/terraform-variables-generator/workflows/release/badge.svg) [![Twitter](https://img.shields.io/twitter/url/https/twitter.com/AlexandrSt88.svg?style=social\u0026label=Follow%20%40AlexandrSt88)](https://twitter.com/AlexandrSt88)\n\n\nSimple Tool to Generate Variables file from Terraform Configuration. It will find all *.tf files in current directory, and generate variables.tf file. If you already have this file, it will ask to override it.\n\n| Version | Supports |\n|---------|----------|\n| 0.11.*  |    yes   |\n| 0.12.*  |    yes   |\n| 0.13.*  |    yes   |\n\n\n## Build\n\n```bash\ngo build .\n```\n\n## Usage\n\n```bash\n./terraform-variables-generator\n```\n\nIt will find all `*.tf` files in current directory, and generate variables.tf file. If you already have this file, it will ask to override it.\n\n### Example\n\n```hcl\nresource \"aws_vpc\" \"vpc\" {\n  cidr_block           = var.cidr\n  enable_dns_hostnames = var.enable_dns_hostnames\n  enable_dns_support   = var.enable_dns_support\n\n  tags {\n    Name = var.name\n  }\n}\n\nresource \"aws_internet_gateway\" \"vpc\" {\n  vpc_id = aws_vpc.vpc.id\n\n  tags {\n    Name = \"${var.name}-igw\"\n  }\n}\n```\n\nWill generate\n\n```hcl\nvariable \"ami\" {\n  description = \"\"\n}\n\nvariable \"instance_type\" {\n  description = \"\"\n}\n\nvariable \"cidr\" {\n  description = \"\"\n}\n\nvariable \"enable_dns_hostnames\" {\n  description = \"\"\n}\n\nvariable \"enable_dns_support\" {\n  description = \"\"\n}\n\nvariable \"name\" {\n  description = \"\"\n}\n```\n\n## Tests\n\nRun tests and linter\n\n```bash\ngo test -v -race ./...\ngolint -set_exit_status $(go list ./...)\n```\n\n## TO DO\n\nMove Locals and Variables to Single Interface\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexandrst88%2Fterraform-variables-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexandrst88%2Fterraform-variables-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexandrst88%2Fterraform-variables-generator/lists"}