Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add infracost configuration #84

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,8 @@ override.tfvars
*.tfstate.*
*.terraform.lock.hcl

# infracost files
.infracost

# Crash log files
crash.log
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,27 @@ These examples cover deploying an Iglu Server, for hosting your schemas, and a S
| ![i1][install-image] | ![i3][faq-image] |
| **[Installation Guide][installguide]** | **[FAQ][faq]** |

### Estimating costs

To estimate costs, use [infracost](https://www.infracost.io/docs/).

For example:

```bash
cd terraform/aws
infracost breakdown --config-file infracost.yml
```

To estimate costs accounting for usage-based pricing:

```bash
cd terraform/aws
infracost breakdown --config-file infracost.yml --sync-usage-file
# edit iglu_server/default/infracost-usage.yml
# edit pipeline/default/infracost-usage.yml
infracost breakdown --config-file infracost.yml
```

### Updating READMEs

To generate the READMEs, use [terraform-docs][tf-docs].
Expand Down
6 changes: 6 additions & 0 deletions terraform/aws/infracost.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 0.1
projects:
- path: iglu_server/default
usage_file: iglu_server/default/infracost-usage.yml
- path: pipeline/default
usage_file: pipeline/default/infracost-usage.yml
8 changes: 8 additions & 0 deletions terraform/azure/infracost.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
version: 0.1
projects:
- path: base
usage_file: base/infracost-usage.yml
- path: iglu_server
usage_file: iglu_server/infracost-usage.yml
- path: pipeline
usage_file: pipeline/infracost-usage.yml