https://github.com/jameswoolfenden/terraform-aws-pricing
Get prices from AWS api
https://github.com/jameswoolfenden/terraform-aws-pricing
aws module pricing prototype terraform
Last synced: 25 days ago
JSON representation
Get prices from AWS api
- Host: GitHub
- URL: https://github.com/jameswoolfenden/terraform-aws-pricing
- Owner: JamesWoolfenden
- License: apache-2.0
- Created: 2019-07-14T08:23:46.000Z (almost 7 years ago)
- Default Branch: main
- Last Pushed: 2026-05-15T18:09:54.000Z (28 days ago)
- Last Synced: 2026-05-15T20:49:22.347Z (28 days ago)
- Topics: aws, module, pricing, prototype, terraform
- Language: HCL
- Homepage:
- Size: 33.2 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# terraform-aws-pricing
[](https://github.com/JamesWoolfenden/terraform-aws-pricing)
[](https://github.com/JamesWoolfenden/terraform-aws-pricing/releases/latest)
[](https://github.com/JamesWoolfenden/terraform-aws-pricing/releases/latest)

[](https://github.com/pre-commit/pre-commit)
[](https://www.checkov.io/)
Prototype pricing module.
---
It's 100% Open Source and licensed under the [APACHE2](LICENSE).
## Usage
Include this repository as a module in your existing Terraform code:
```hcl
module "pricing" {
source = "JamesWoolfenden/pricing/aws"
filters = var.filters
service_code = var.service_code
}
```
## Requirements
No requirements.
## Providers
| Name | Version |
| ---- | ------- |
| [aws](#provider\_aws) | n/a |
## Modules
No modules.
## Resources
| Name | Type |
| ---- | ---- |
| [aws_pricing_product.example](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/pricing_product) | data source |
## Inputs
| Name | Description | Type | Default | Required |
| ---- | ----------- | ---- | ------- | :------: |
| [filters](#input\_filters) | Filters for the service\_code | `list` |
[
{
"field": "productFamily",
"value": "Storage"
},
{
"field": "location",
"value": "US East (N. Virginia)"
},
{
"field": "volumeType",
"value": "Standard"
},
{
"field": "availability",
"value": "99.99%"
},
{
"field": "storageClass",
"value": "General Purpose"
}
]
| no |
| [service\_code](#input\_service\_code) | The Product calls to query AmazonS3 | `string` | n/a | yes |
## Outputs
| Name | Description |
| ---- | ----------- |
| [price](#output\_price) | n/a |
## Prototype work on aws pricing
Can I price up my Terraform as I design it?
```shell
aws pricing describe-services --region us-east-1
$services=aws pricing describe-services --region us-east-1|convertfrom-json
$services.Services
$services.Services.AmazonEC2
($data|where {$_.ServiceCode -eq "AmazonEc2"}).AttributeNames
aws pricing get-attribute-values --service-code AmazonEC2 --attribute-name location --region us-east-1
($data|where {$_.ServiceCode -eq "AmazonS3"}).AttributeNames
aws pricing get-attribute-values --service-code AmazonEC2 --attribute-name productFamily --region us-east-1
```
## Related Projects
Check out these related projects.
- [terraform-aws-codebuild](https://github.com/jameswoolfenden/terraform-aws-codebuild) - Making a Build pipeline
## Help
**Got a question?**
File a GitHub [issue](https://github.com/jameswoolfenden/terraform-aws-pricing/issues).
## Contributing
### Bug Reports & Feature Requests
Please use the [issue tracker](https://github.com/jameswoolfenden/terraform-aws-pricing/issues) to report any bugs or file feature requests.
## Copyrights
Copyright © 2019-2023 James Woolfenden
## License
[](https://opensource.org/licenses/Apache-2.0)
See [LICENSE](LICENSE) for full details.
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
### Contributors
[![James Woolfenden][jameswoolfenden_avatar]][jameswoolfenden_homepage]
[James Woolfenden][jameswoolfenden_homepage]
[jameswoolfenden_homepage]: https://github.com/jameswoolfenden
[jameswoolfenden_avatar]: https://github.com/jameswoolfenden.png?size=150