{"id":18469514,"url":"https://github.com/miteshsharma/terraformtemplates","last_synced_at":"2025-10-11T12:22:27.691Z","repository":{"id":109599552,"uuid":"152896770","full_name":"MiteshSharma/TerraformTemplates","owner":"MiteshSharma","description":"Creating policy file to be used in terraform configuration using templates","archived":false,"fork":false,"pushed_at":"2018-10-13T17:33:04.000Z","size":3,"stargazers_count":7,"open_issues_count":0,"forks_count":16,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-08T10:41:44.870Z","etag":null,"topics":["aws","iam","iam-policy","templates","terraform"],"latest_commit_sha":null,"homepage":"","language":"HCL","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/MiteshSharma.png","metadata":{"files":{"readme":"README.md","changelog":null,"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-10-13T17:27:10.000Z","updated_at":"2024-01-04T05:59:51.000Z","dependencies_parsed_at":"2023-07-29T00:46:13.942Z","dependency_job_id":null,"html_url":"https://github.com/MiteshSharma/TerraformTemplates","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/MiteshSharma/TerraformTemplates","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MiteshSharma%2FTerraformTemplates","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MiteshSharma%2FTerraformTemplates/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MiteshSharma%2FTerraformTemplates/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MiteshSharma%2FTerraformTemplates/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MiteshSharma","download_url":"https://codeload.github.com/MiteshSharma/TerraformTemplates/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MiteshSharma%2FTerraformTemplates/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279007151,"owners_count":26084247,"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-10-11T02:00:06.511Z","response_time":55,"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":["aws","iam","iam-policy","templates","terraform"],"created_at":"2024-11-06T10:10:44.103Z","updated_at":"2025-10-11T12:22:27.657Z","avatar_url":"https://github.com/MiteshSharma.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Terraform Templates\n\nIf you ever worked with IAM policies in Terraform, then you can easily recognize the pain of having similar policies copy pasted at different places with only a few parameters changed. One of the common examples is to create multiple users with the same permissions, in which you have an exactly same policy at multiple places. Another example is to give multiple users permissions of different S3 buckets. Copy pasting same policy for different users or buckets creates a lot of redundancy, the chance of error and pain to manage them.\n\nAll these common permissions can be moved to a single file with few dynamic parameters which can be changed based on requirement. This can be done using templates which are data-sources defined by a file. We define variables to use in these templates which rendered in the final result used in resources. We can use any built-in functions in our templates to bring dynamic behavior to them. Data with type template_file is used for our use-case to read the content of template and render.\n\nCommands used:\n\nterraform init : Initialize a Terraform working directory\n\nterraform plan : Generate and show an execution plan\n\nterraform apply : Builds or changes infrastructure\n\nterraform destroy : Destroy Terraform-managed infrastructure","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiteshsharma%2Fterraformtemplates","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmiteshsharma%2Fterraformtemplates","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiteshsharma%2Fterraformtemplates/lists"}