{"id":13451664,"url":"https://github.com/minamijoyo/tfschema","last_synced_at":"2025-04-05T03:13:04.578Z","repository":{"id":29610320,"uuid":"117117824","full_name":"minamijoyo/tfschema","owner":"minamijoyo","description":"A schema inspector for Terraform / OpenTofu providers","archived":false,"fork":false,"pushed_at":"2024-08-10T14:33:31.000Z","size":758,"stargazers_count":297,"open_issues_count":4,"forks_count":14,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-29T02:08:26.999Z","etag":null,"topics":["go","opentofu","terraform"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/minamijoyo.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":"2018-01-11T15:39:31.000Z","updated_at":"2025-03-22T07:03:31.000Z","dependencies_parsed_at":"2022-09-09T13:21:23.437Z","dependency_job_id":"4e494c70-c080-4071-b6f5-fa8b39df247c","html_url":"https://github.com/minamijoyo/tfschema","commit_stats":{"total_commits":196,"total_committers":8,"mean_commits":24.5,"dds":"0.061224489795918324","last_synced_commit":"3313edc58677fed47232ec884e6b25999b8a08fc"},"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minamijoyo%2Ftfschema","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minamijoyo%2Ftfschema/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minamijoyo%2Ftfschema/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minamijoyo%2Ftfschema/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/minamijoyo","download_url":"https://codeload.github.com/minamijoyo/tfschema/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247280272,"owners_count":20912967,"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":["go","opentofu","terraform"],"created_at":"2024-07-31T07:00:58.375Z","updated_at":"2025-04-05T03:13:04.552Z","avatar_url":"https://github.com/minamijoyo.png","language":"Go","funding_links":[],"categories":["Go","Tools"],"sub_categories":["Providers","Miscellaneous","Community providers"],"readme":"# tfschema\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)\n[![GitHub release](https://img.shields.io/github/release/minamijoyo/tfschema.svg)](https://github.com/minamijoyo/tfschema/releases/latest)\n[![GoDoc](https://godoc.org/github.com/minamijoyo/tfschema/tfschema?status.svg)](https://godoc.org/github.com/minamijoyo/tfschema)\n\nA schema inspector for Terraform / OpenTofu providers.\n\n# Features\n\n- Get resource type definitions dynamically from Terraform / OpenTofu providers via go-plugin protocol.\n- List available resource types.\n- Autocomplete resource types in bash/zsh.\n- Open official provider documents quickly by your system web browser.\n- Terraform v1.x support (minimum requirements: Terraform \u003e= v0.12)\n- OpenTofu v1.6+ support\n\n![demo](/images/tfschema-demo.gif)\n\n# Getting Started\n\n```\n$ brew install minamijoyo/tfschema/tfschema\n\n$ echo 'provider \"aws\" {}' \u003e main.tf\n$ terraform init\n```\n\n```\n$ tfschema resource list aws | grep aws_iam_user\naws_iam_user\naws_iam_user_group_membership\naws_iam_user_login_profile\naws_iam_user_policy\naws_iam_user_policy_attachment\naws_iam_user_ssh_key\n```\n\n```\n$ tfschema resource show aws_iam_user\n+----------------------+-------------+----------+----------+----------+-----------+\n| ATTRIBUTE            | TYPE        | REQUIRED | OPTIONAL | COMPUTED | SENSITIVE |\n+----------------------+-------------+----------+----------+----------+-----------+\n| arn                  | string      | false    | false    | true     | false     |\n| force_destroy        | bool        | false    | true     | false    | false     |\n| id                   | string      | false    | true     | true     | false     |\n| name                 | string      | true     | false    | false    | false     |\n| path                 | string      | false    | true     | false    | false     |\n| permissions_boundary | string      | false    | true     | false    | false     |\n| tags                 | map(string) | false    | true     | false    | false     |\n| unique_id            | string      | false    | false    | true     | false     |\n+----------------------+-------------+----------+----------+----------+-----------+\n```\n\n# Install\n\nIf you are Mac OSX user:\n\n```\n$ brew install minamijoyo/tfschema/tfschema\n```\n\nor\n\nIf you have Go 1.17+ development environment:\n\n```bash\n$ git clone https://github.com/minamijoyo/tfschema\n$ cd tfschema\n$ go install\n```\n\nor\n\nDownload the latest compiled binaries and put it anywhere in your executable path.\n\nhttps://github.com/minamijoyo/tfschema/releases\n\n# Rules of finding provider's binary\nWhen `terraform init` command is executed, provider's binary is installed under the auto installed directory ( .terraform/providers/`\u003cSOURCE ADDRESS\u003e`/`\u003cVERSION\u003e`/`\u003cOS\u003e_\u003cARCH\u003e` ) by default.\nThe tfschema can use the same provider's binary as terraform uses, so you can run `tfschema` command in the same directory where you run the `terraform` command\nAlternatively, you can set the environment variable `$TFSCHEMA_ROOT_DIR` to be this directory. If `$TFSCHEMA_ROOT_DIR` is not set, it will default to the current directory\n\nThe tfschema finds provider's binary under the following directories.\n\n1. `$TFSCHEMA_ROOT_DIR`\n2. same directory as `tfschema` executable\n3. user vendor directory ( `$TFSCHEMA_ROOT_DIR`/terraform.d/plugins/`\u003cOS\u003e_\u003cARCH\u003e` )\n4. auto installed directory for Terraform v0.14+ ( `$TFSCHEMA_ROOT_DIR`/.terraform/providers/`\u003cSOURCE ADDRESS\u003e`/`\u003cVERSION\u003e`/`\u003cOS\u003e_\u003cARCH\u003e` )\n5. auto installed directory for Terraform v0.13 ( `$TFSCHEMA_ROOT_DIR`/.terraform/plugins/`\u003cSOURCE ADDRESS\u003e`/`\u003cVERSION\u003e`/`\u003cOS\u003e_\u003cARCH\u003e` )\n6. legacy auto installed directory for Terraform \u003c v0.13 ( `$TFSCHEMA_ROOT_DIR`/.terraform/plugins/`\u003cOS\u003e_\u003cARCH\u003e` )\n7. global plugin directory ( $HOME/.terraform.d/plugins )\n8. global plugin directory with os and arch ( $HOME/.terraform.d/plugins/`\u003cOS\u003e_\u003cARCH\u003e` )\n9. gopath ( $GOPATH/bin )\n\nIf you are Mac OSX user, `\u003cOS\u003e_\u003cARCH\u003e` is `darwin_amd64`.\nThe `\u003cSOURCE ADDRESS\u003e` is a fully qualified provider name in Terraform 0.13+. (e.g. `registry.terraform.io/hashicorp/aws`)\n\nNote that it doesn't have exactly the same behavior of Terraform because of some reasons:\n\n- Support multiple Terraform versions\n- Can't import internal packages of Terraform and it's too complicated to support\n- For debug\n\n# Autocomplete\n\nTo enable autocomplete, execute the following command:\n\n```\n$ tfschema -install-autocomplete\n```\n\nThe above command adds the following line to your ~/.bashrc and ~/.zshrc:\n\n.bashrc\n\n```bash\ncomplete -C \u003c/path/to/tfschema\u003e tfschema\n```\n\n.zshrc\n\n```bash\nautoload -U +X bashcompinit \u0026\u0026 bashcompinit\ncomplete -o nospace -C \u003c/path/to/tfschema\u003e tfschema\n```\n\nCheck your .bashrc and/or .zshrc and reload it.\n\n# Usage\n\n```\n$ tfschema --help\nUsage: tfschema [--version] [--help] \u003ccommand\u003e [\u003cargs\u003e]\n\nAvailable commands are:\n    data\n    provider\n    resource\n```\n\n```\n$ tfschema resource --help\nThis command is accessed by using one of the subcommands below.\n\nSubcommands:\n    browse    Browse a documentation of resource\n    list      List resource types\n    show      Show a type definition of resource\n```\n\n```\n$ tfschema resource show --help\nUsage: tfschema resource show [options] RESOURCE_TYPE\n\nOptions:\n\n  -format=type    Set output format to table or json (default: table)\n```\n# Contributions\nAny feedback and contributions are welcome. Feel free to open an issue and submit a pull request.\n\n# Acknowledgments\nThe tfschema is built on Terraform and its providers. I'm sincerely grateful to those authors.\n\n# License\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fminamijoyo%2Ftfschema","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fminamijoyo%2Ftfschema","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fminamijoyo%2Ftfschema/lists"}