{"id":21413078,"url":"https://github.com/rixrix/vscode-terraform-snippets","last_synced_at":"2025-07-14T03:31:03.160Z","repository":{"id":14048466,"uuid":"65347431","full_name":"rixrix/vscode-terraform-snippets","owner":"rixrix","description":"Advanced Terraform Snippets for Visual Studio Code. It has at least 23k downloads from the marketplace.","archived":false,"fork":false,"pushed_at":"2023-09-06T19:38:50.000Z","size":376,"stargazers_count":49,"open_issues_count":23,"forks_count":30,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-07T23:01:43.238Z","etag":null,"topics":["atlas","chef","cloud","consul","devops","docker","google-cloud","ide","kubernetes","plugin","snippets","terraform","terraform-snippets","visual-studio","vscode-extension"],"latest_commit_sha":null,"homepage":"https://marketplace.visualstudio.com/items?itemName=mindginative.terraform-snippets","language":"JavaScript","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/rixrix.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}},"created_at":"2016-08-10T03:27:05.000Z","updated_at":"2024-11-25T23:55:50.000Z","dependencies_parsed_at":"2022-08-03T12:45:27.042Z","dependency_job_id":null,"html_url":"https://github.com/rixrix/vscode-terraform-snippets","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"purl":"pkg:github/rixrix/vscode-terraform-snippets","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rixrix%2Fvscode-terraform-snippets","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rixrix%2Fvscode-terraform-snippets/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rixrix%2Fvscode-terraform-snippets/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rixrix%2Fvscode-terraform-snippets/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rixrix","download_url":"https://codeload.github.com/rixrix/vscode-terraform-snippets/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rixrix%2Fvscode-terraform-snippets/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265237695,"owners_count":23732514,"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":["atlas","chef","cloud","consul","devops","docker","google-cloud","ide","kubernetes","plugin","snippets","terraform","terraform-snippets","visual-studio","vscode-extension"],"created_at":"2024-11-22T18:16:46.099Z","updated_at":"2025-07-14T03:31:02.733Z","avatar_url":"https://github.com/rixrix.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# News\n\u003e ## I'm looking for volunteers to help me maintain this project. I don't have enough time to do some of the work.\n\n# Advanced Terraform Snippets for Visual Studio Code\n\nProvides **550+** code snippets of Hashicorp's [Terraform](https://www.terraform.io/) cloud orchestration tool for [Visual Studio Code](https://code.visualstudio.com/).\n\n## Usage\nType part of the snippets `tf`, press `enter`:\n\n### Sample Snippets\n\n#### Input / Output / Module\n```bash\ntf-variable                         // generates `variable \"myVariable\" { }`\ntf-variable-default                 // generates `variable \"myVariable\" { default = \"\"}`\ntf-output                           // generates `output \"myOutputName\" { value = \"\"}`\ntf-module                           // generates `module \"myModuleName\" { source = \"\"}`\ntf-module-github                    // generates `module \"myModuleName\" { source = \"github.com/username\"}`\ntf-module-github-private            // generates `module \"myModuleName\" { source = \"git::https://MACHINE-USER:MACHINE-PASS@github.com/username\"}`\ntf-module-bitbucket                 // generates `module \"myModuleName\" { source = \"bitbucket.org/username\"}`\ntf-module-git                       // generates `module \"myModuleName\" { source = \"git://\"}`\ntf-module-mercurial                 // generates `module \"myModuleName\" { source = \"hg::http://\"}`\ntf-module-s3                        // generates `module \"myModuleName\" { source = \"s3::https://\"}`\n```\n\n#### Providers\n\n```bash\ntf-aws                              // generates `provider \"aws\" { ... }`\ntf-aws-profile                       // generates `provider \"aws\" { profile = \"\", shared_credentials_file=\"\",... }`\ntf-azurerm                          // generates `provider \"azurerm\" { ... }`\ntf-google                           // generates `provider \"google\" { ... }`\ntf-openstack                        // generates `provider \"openstack\" { ... }`\ntf-ibm_provider                     // generates `provider \"ibm\" { ... }`\n```\n\n#### Backends / Remote State\n\n```bash\ntf-backend-azure                    // generates `data \"terraform_remote_state\" \"xxx\" { backend = \"azure\" ... }`\ntf-backend-s3                       // generates `data \"terraform_remote_state\" \"xxx\" { backend = \"s3\" ... }`\ntf-backend-gcs                      // generates `data \"terraform_remote_state\" \"xxx\" { backend = \"gcs\" ... }`\ntf-backend-consul                   // generates `data \"terraform_remote_state\" \"xxx\" { backend = \"consul\" ... }`\n```\n#### Handy shortcuts for AWS Regions\n\n```bash\ntf-aws-region-us-east-1             // generates US East (N.Virginia) `us-east-1`\ntf-aws-region-ap-south-1            // generates Asia Pacific (Mumbai) `ap-south-1`\n\nplus all other AWS regions\n\n```\n\n#### Others + more, see supported list\n```bash\ntf-depends_on                       // generates `depends_on []`\ntf-provisioner-connection           // generates `provisioner \"file\" { ... }`\ntf-provisioner-file                 // generates `provisioner \"file\" { ... }`\ntf-provisioner-local-exec           // generates `provisioner \"local-exec\" { ... }`\ntf-provisioner-remote-exec          // generates `provisioner \"remote-exec\" { ... }`\ntf-provisioner-null_resource        // generates `resource \"null_resource\" { ... }`\ntf-template_file                    // generates `data \"template_file\" \"init\" { ... }`\ntf-template_file-inline             // generates `data \"template_file\" \"init\" { ... }` inline\ntf-template_cloudinit_config        // generates `data \"template_cloudinit_config\" \"config\" { ... }` inline\n```\n\n![Use Extension](https://raw.githubusercontent.com/rixrix/vscode-terraform-snippets/master/images/screenshot.png)\n\nAlternatively, press `Ctrl`+`Space` (Windows, Linux) or `Cmd`+`Space` (OSX) to activate snippets from within the editor.\n\n## Supported Snippets\n\n### Input, Output, Module\n\n* [Input variables](https://www.terraform.io/intro/getting-started/variables.html)\n* [Output Variables](https://www.terraform.io/intro/getting-started/outputs.html)\n* [Modules](https://www.terraform.io/intro/getting-started/modules.html)\n\n### Provisioners\n\n* [Resource](https://www.terraform.io/intro/getting-started/provision.html), [connection](https://www.terraform.io/docs/provisioners/connection.html), [file](https://www.terraform.io/docs/provisioners/file.html), [local-exec](https://www.terraform.io/docs/provisioners/local-exec.html), [remote-exec](https://www.terraform.io/docs/provisioners/remote-exec.html)\n* [null_resource](https://www.terraform.io/docs/provisioners/null_resource.html), [file](https://www.terraform.io/docs/providers/template/d/file.html), [cloudinit](https://www.terraform.io/docs/providers/template/d/cloudinit_config.html), [Chef provisioner](https://www.terraform.io/docs/provisioners/chef.html)\n\n### Providers\n\n* Amazon Web Services, Google Cloud, Microsoft Azure, CloudStack\n* Consul, Docker, Heroku, DigitalOcean, Bitbucket\n* GitHub, Archive, Atlas, Chef, Cloudflare\n* MySQL, PostgreSQL, SoftLayer, Scaleway, CenturyLinkCloud\n* Cobbler, Datadog, DNSMadeEasy, DNSimple, Dyn\n* Fastly, Grafana, InfluxDB, Librato, Logentries\n* Mailgun, Packet, PagerDuty, PowerDNS, RabbitMQ\n* Random, Rundeck, StatusCake, Terraform, TLS,\n* Triton, UltraDNS, OpenStack, VMware vCloud Director, VMware vSphere\n* GitLab, Arukas, New Relic, Kubernetes, Vault, OpsGenie, IBM Cloud\n\n### Backends / Remote State\n\n* Artifactory, Atlas, Microsoft Azure Storage, Consul, Etcd,\n* Google Cloud Storage, Http, Local, Manta, Amazon S3, Openstack Swift\n\n## Requirements / Dependencies\n\nInstall the [Terraform Language](https://marketplace.visualstudio.com/items?itemName=mauve.terraform) support extension from the marketplace published by \"Mikael Olenfalk\"\n\n## Installation\n\n1. Install Visual Studio Code 1.x or higher\n2. Launch Code\n3. From the command palette `Ctrl`-`Shift`-`P` (Windows, Linux) or `Cmd`-`Shift`-`P` (OSX)\n4. Select `Install Extension`\n5. Choose the extension\n6. Reload Visual Studio Code\n\n## Development\n\n### How to build\n\n- `npm run build:snippets`\n  - Generates a single file in \"snippets/terraform.json\" from \"src/\" snippets file.\n\n### Convention\n  - All commit logs must follow the \"Conventional Changelog\" convention, particularly \"angular\" preset. see https://github.com/conventional-changelog/conventional-changelog\n\n## How can you help ?\n\nIt is super easy, the snippets for each Terraform features are self-contained into its own single JSON file.\n\n```\nsrc/\n    backends/\n    configuration/\n    modules/\n    state/\n    provisioners/\n    providers/\n        aws.json\n        chef.json\n        your-new-feature-here.json\n```\n\n## Issues / Comments / Suggestions\n\nFeel free to file an issue or submit a pull request at https://github.com/rixrix/vscode-terraform-snippets/issues\n\n## Notes\n\n* Microsoft Azure (Legacy ASM) is not included in this release due to [inactivity of development](https://www.terraform.io/docs/providers/azure/index.html).\n\n## Contributors\n\n* [Lionel T.](https://github.com/lktslionel)\n* [madole](https://github.com/madole)\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frixrix%2Fvscode-terraform-snippets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frixrix%2Fvscode-terraform-snippets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frixrix%2Fvscode-terraform-snippets/lists"}