{"id":17419938,"url":"https://github.com/bendrucker/terraform-aws-ec2-pricing","last_synced_at":"2025-04-15T00:01:48.144Z","repository":{"id":42010327,"uuid":"242223603","full_name":"bendrucker/terraform-aws-ec2-pricing","owner":"bendrucker","description":"Terraform module that uses the AWS Pricing API to query EC2 instance type attributes","archived":false,"fork":false,"pushed_at":"2025-02-04T20:22:15.000Z","size":491,"stargazers_count":5,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-10T08:14:07.234Z","etag":null,"topics":["aws","aws-pricing","ec2","terraform","terraform-module"],"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/bendrucker.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":"2020-02-21T20:19:57.000Z","updated_at":"2025-02-04T20:22:18.000Z","dependencies_parsed_at":"2023-11-06T11:42:15.244Z","dependency_job_id":"e41e2443-cae7-4edb-a774-adad6b404fd5","html_url":"https://github.com/bendrucker/terraform-aws-ec2-pricing","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bendrucker%2Fterraform-aws-ec2-pricing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bendrucker%2Fterraform-aws-ec2-pricing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bendrucker%2Fterraform-aws-ec2-pricing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bendrucker%2Fterraform-aws-ec2-pricing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bendrucker","download_url":"https://codeload.github.com/bendrucker/terraform-aws-ec2-pricing/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248981263,"owners_count":21193145,"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":["aws","aws-pricing","ec2","terraform","terraform-module"],"created_at":"2024-10-17T02:36:55.631Z","updated_at":"2025-04-15T00:01:48.105Z","avatar_url":"https://github.com/bendrucker.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# terraform-aws-ec2-pricing [![terraform workflow status](https://github.com/bendrucker/terraform-aws-ec2-pricing/workflows/terraform/badge.svg?branch=master)](https://github.com/bendrucker/terraform-aws-ec2-pricing/actions?query=workflow%3Aterraform)\n\n\u003e Terraform module that uses the [AWS Pricing API](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/price-changes.html) to query EC2 instance type attributes\n\n## Usage\n\n```tf\nmodule \"instance\" {\n  source        = \"bendrucker/ec2-pricing/aws\"\n  instance_type = \"m5.large\"\n}\n```\n\nThe module exposes outputs that describe key attributes of the specified instance type. These values are helpful for creating monitoring or resource quotas that are defined relative to the instance's capacity.\n\nFor example, you might pass these along to a [`kubernetes_resource_quota`](https://www.terraform.io/docs/providers/kubernetes/r/resource_quota.html) in order to assign a percentage of cluster capacity to a namespace:\n\n```tf\nlocals {\n  # allow developers to use 80% of worker resources\n  # reserve the remaining 20% for system components\n  developer_quota = 0.8\n}\n\nresource \"kubernetes_resource_quota\" \"developers\" {\n  metadata {\n    name      = \"developers-quota\"\n    namespace = \"developers\"\n  }\n\n  spec {\n    hard = {\n      cpu    = var.worker_count * module.instance.cpus * local.developer_quota\n      memory = \"${var.worker_count * module.instance.memory * local.developer_quota} GiB\"\n    }\n  }\n}\n```\n\n\u003c!-- https://github.com/segmentio/terraform-docs --\u003e\n\u003c!-- terraform-docs markdown table . --\u003e\n\n## Providers\n\n| Name | Version |\n|------|---------|\n| aws | ~\u003e 2 |\n\n## Inputs\n\n| Name | Description | Type | Default | Required |\n|------|-------------|------|---------|:-----:|\n| instance\\_type | EC2 instance type for which attributes will be fetched | `string` | n/a | yes |\n\n## Outputs\n\n| Name | Description |\n|------|-------------|\n| cpus | Number of CPU cores available on the instance |\n| memory | Memory available on the instance, in gibibytes (GiB) |\n\n\u003c!-- end terraform-docs --\u003e\n\n## Testing\n\nThis module is tested via [Terratest](https://github.com/gruntwork-io/terratest).\n\n```sh\nmake test\n```\n\n## License\n\nMIT © [Ben Drucker](http://bendrucker.me)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbendrucker%2Fterraform-aws-ec2-pricing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbendrucker%2Fterraform-aws-ec2-pricing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbendrucker%2Fterraform-aws-ec2-pricing/lists"}