diff --git a/.gitignore b/.gitignore index 8ec4bfc..473e6e9 100644 --- a/.gitignore +++ b/.gitignore @@ -15,5 +15,8 @@ override.tfvars *.tfstate.* *.terraform.lock.hcl +# infracost files +.infracost + # Crash log files crash.log diff --git a/README.md b/README.md index 1385a27..797e1eb 100644 --- a/README.md +++ b/README.md @@ -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]. diff --git a/terraform/aws/infracost.yml b/terraform/aws/infracost.yml new file mode 100644 index 0000000..fdf5216 --- /dev/null +++ b/terraform/aws/infracost.yml @@ -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 diff --git a/terraform/azure/infracost.yml b/terraform/azure/infracost.yml new file mode 100644 index 0000000..8ff34a4 --- /dev/null +++ b/terraform/azure/infracost.yml @@ -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