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

Use this repo for docs only (part 1) #567

Merged
merged 14 commits into from
Oct 19, 2023
20 changes: 17 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,23 @@
on: workflow_dispatch
on:
workflow_run:
workflows: [ Checks ]
types: [ completed]
branches: [ master ]

name: "Release"

jobs:
release-dev:
uses: ./.github/workflows/release_dev.yml
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}

steps:
- uses: ./.github/workflows/release_dev.yml

release-prod:
uses: ./.github/workflows/release_prod.yml
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
needs: release-dev

steps:
- uses: ./.github/workflows/release_prod.yml
14 changes: 10 additions & 4 deletions .github/workflows/release_dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@ name: "Release dev"

jobs:
release-dev:
runs-on: ubuntu-latest
steps:
- name: hello-world
run: echo "Hello World!"
uses: ./.github/workflows/upload_assets.yml
with:
aws-region: us-east-2
domain: www.dev.infracost.io
infracost-dashboard-api-endpoint: https://dashboard.api.infracost.io
infracost-dashboard-endpoint: https://dashboard.infracost.io
secrets:
AWS_ACCESS_KEY_ID: ${{ secrets.DEV_AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.DEV_AWS_SECRET_ACCESS_KEY }}
INFRACOST_DOCS_API_TOKEN: ${{ secrets.INFRACOST_DOCS_API_TOKEN }}
14 changes: 10 additions & 4 deletions .github/workflows/release_prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@ name: "Release prod"

jobs:
release-prod:
runs-on: ubuntu-latest
steps:
- name: hello-world
run: echo "Hello World!"
uses: ./.github/workflows/upload_assets.yml
with:
aws-region: us-east-2
domain: www-new.infracost.io
infracost-dashboard-api-endpoint: https://dashboard.api.infracost.io
infracost-dashboard-endpoint: https://dashboard.infracost.io
secrets:
AWS_ACCESS_KEY_ID: ${{ secrets.PROD_AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.PROD_AWS_SECRET_ACCESS_KEY }}
INFRACOST_DOCS_API_TOKEN: ${{ secrets.INFRACOST_DOCS_API_TOKEN }}
55 changes: 55 additions & 0 deletions .github/workflows/upload_assets.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
on:
workflow_call:
inputs:
aws-region:
default: us-east-2
type: string
domain:
type: string
infracost-dashboard-api-endpoint:
type: string
infracost-dashboard-endpoint:
type: string
secrets:
AWS_ACCESS_KEY_ID:
required: true
AWS_SECRET_ACCESS_KEY:
required: true
INFRACOST_DOCS_API_TOKEN:
required: true

name: Upload assets

jobs:
release:
name: Upload assets
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: use node 18.12.0
uses: actions/setup-node@v3
with:
node-version: 18.12.0
- name: install node modules
run: npm ci
- name: build project
run: npm run build
env:
INFRACOST_DASHBOARD_API_ENDPOINT: ${{ inputs.infracost-dashboard-api-endpoint }}
INFRACOST_DASHBOARD_ENDPOINT: ${{ inputs.infracost-dashboard-endpoint }}
INFRACOST_DOCS_API_TOKEN: ${{ secrets.INFRACOST_DOCS_API_TOKEN }}
- name: configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ inputs.aws-region }}
- name: sync S3 and cloudfront
id: sync_s3_and_cloudfront
run: |
CLOUDFRONT_DISTRIBUTION=$(aws cloudfront list-distributions | jq -r '.DistributionList.Items[] | select(.Aliases.Items[0]=="'${{ inputs.domain }}'")')
CLOUDFRONT_DISTRIBUTION_ID=$(echo $CLOUDFRONT_DISTRIBUTION | jq -r '.Id')
S3_BUCKET=$(echo $CLOUDFRONT_DISTRIBUTION | jq -r '.Origins.Items[] | select (.Id=="docs") | .DomainName' | sed 's/\(.*\)\.s3-website\.[^.]*\.amazonaws.com/\1/')
aws s3 sync build s3://${S3_BUCKET}/docs
aws cloudfront create-invalidation --distribution-id=${CLOUDFRONT_DISTRIBUTION_ID} --paths "/docs/*" --no-cli-pager
2 changes: 1 addition & 1 deletion blog/2020-08-17-infracost-cloud-costs-for-devs.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ hide_table_of_contents: false
date: "2020-08-17"
---

[Infracost](https://github.com/aliscott/infracost) helps developers and DevOps engineers get cost estimates from their IaC (Infrastructure as Code).
[Infracost](https://github.com/aliscott/infracost) helps developers and DevOps engineers get cost estimates from their IaC (Infrastructure as Code).

<!--truncate-->

Expand Down
2 changes: 1 addition & 1 deletion blog/2022-05-12-why-are-cloud-costs-so-complex.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ date: "2022-05-12"

import useBaseUrl from '@docusaurus/useBaseUrl';

In 2009 I started my PhD research to focus on the decisions that needed to be made for an organization to adopt public clouds. These included the benefits, the risks and the costs of using such systems. My aim was to create a set of vendor neutral tools that would assist decision makers during the process.
In 2009 I started my PhD research to focus on the decisions that needed to be made for an organization to adopt public clouds. These included the benefits, the risks and the costs of using such systems. My aim was to create a set of vendor neutral tools that would assist decision makers during the process.

<!--truncate-->

Expand Down
2 changes: 1 addition & 1 deletion blog/2023-02-07-feb-2023-update.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Engineers love fast CI/CD builds so in January we made three major changes to ma

### 1. Only run changed directories

Previously Infracost parsed all Terraform/Terragrunt directories even though most usually do not change in a given pull request. Now the [Infracost GitHub App](/docs/integrations/github_app/) has an option to only run changed directories, which means it can post the cost-diff pull request comment very quickly (usually less than a minute). [Contact us](mailto:hello@infracost.io) if you'd like to try this. Infracost Cloud stitches together the results of all directories in the dashboard to show team leads, managers and FinOps practitioners the whole repository costs.
Previously Infracost parsed all Terraform/Terragrunt directories even though most usually do not change in a given pull request. Now the [Infracost GitHub App](/docs/integrations/github_app/) has an option to only run changed directories, which means it can post the cost-diff pull request comment very quickly (usually less than a minute). [Contact us](mailto:hello@infracost.io) if you'd like to try this. Infracost Cloud stitches together the results of all directories in the dashboard to show team leads, managers and FinOps practitioners the whole repository costs.

The GitHub App works with GitHub.com, GitHub Enterprise Cloud and GitHub Enterprise Server and has two key benefits over manual CI/CD integrations:
1. Infracost runs significantly faster as only changed folders are run based on the GitHub App events.
Expand Down
2 changes: 1 addition & 1 deletion blog/2023-02-16-cost-of-changes-in-jira-infracost.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ Once engineers know how much their infrastructure changes will cost, they can sh

I’m super excited to announce the [Infracost Jira integration](https://www.infracost.io/docs/infracost_cloud/jira_integration/). Engineers can keep building features, and see cost estimates in the CI/CD. These estimates are pushed directly into Jira under the relevant issue so that product teams can see the cost impact of each feature they have requested. This is a bidirectional connection, meaning you can see cloud cost estimates in Jira and also filter by Jira issues in Infracost Cloud to see the Pull Requests which went into building the capability. If there are many PRs for a Jira issue, they are all summed up and sent to Jira. I’d love to invite you to try it now, and provide your feedback on where this feature should go next: [https://www.infracost.io/docs/infracost_cloud/jira_integration/](https://www.infracost.io/docs/infracost_cloud/jira_integration/)

<img src={useBaseUrl("img/blog/cost-changes-in-jira/cloud-costs-in-jira.png")} alt="Cloud Costs directly in Jira"/>
<img src={useBaseUrl("img/blog/cost-changes-in-jira/cloud-costs-in-jira.png")} alt="Cloud Costs directly in Jira"/>
6 changes: 3 additions & 3 deletions blog/2023-03-08-cloud-cost-optimization-formula.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ Trust your engineers - you are on the same team.

## Conclusion

In conclusion, optimizing cloud costs requires a combination of financial decisions, engineering, and an understanding of the equation: Cloud Costs = Usage x Unit Price.
In conclusion, optimizing cloud costs requires a combination of financial decisions, engineering, and an understanding of the equation: Cloud Costs = Usage x Unit Price.

Unit Price optimization can be done through committing to use a resource for a certain duration or dollar amount, or through negotiating an overall discount with the cloud provider.
Unit Price optimization can be done through committing to use a resource for a certain duration or dollar amount, or through negotiating an overall discount with the cloud provider.

Usage optimization requires engineering effort, and is the main component of the equation to impact for long term optimization.
Usage optimization requires engineering effort, and is the main component of the equation to impact for long term optimization.
8 changes: 4 additions & 4 deletions blog/2023-03-08-infracost-soc2-certified.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ date: "2023-03-08"

import useBaseUrl from '@docusaurus/useBaseUrl';

I’m very excited to announce that Infracost has achieved SOC2 Type 2 certification. This is a significant milestone for us as it reinforces our commitment to security, privacy, and reliability.
I’m very excited to announce that Infracost has achieved SOC2 Type 2 certification. This is a significant milestone for us as it reinforces our commitment to security, privacy, and reliability.

<!--truncate-->

<img src={useBaseUrl("img/blog/soc2blog/infracost-soc2.png")} alt="Infracost is now SOC2 certified" width="60%" />

We understand the importance of maintaining high standards of security and compliance, especially for our enterprise customers who rely on our platform to help them be proactive in managing their cloud infrastructure and their cloud costs vs reactive after money has been spent. Our certification means that our platform can be trusted by our users and customers across our Open Source as well as SaaS product to handle their sensitive data.
We understand the importance of maintaining high standards of security and compliance, especially for our enterprise customers who rely on our platform to help them be proactive in managing their cloud infrastructure and their cloud costs vs reactive after money has been spent. Our certification means that our platform can be trusted by our users and customers across our Open Source as well as SaaS product to handle their sensitive data.

To achieve SOC2 Type 2 compliance, we underwent a rigorous audit conducted by a third-party auditing firm. The audit evaluated our internal controls, policies, and procedures, and confirmed that they met the stringent requirements set by the American Institute of Certified Public Accountants (AICPA).

Expand All @@ -28,6 +28,6 @@ Infracost CI/CD helps engineers understand how their code changes will impact cl

Infracost Cloud sits on top of the CI/CD integration and gives managers, FinOps and Platform teams a central place where they can see all upcoming changes to cloud costs, as well as letting them design guardrails and policies to automate best practices directly in CI/CD.

Infracost can be setup in a matter of minutes; It is open source and free. Get started now:
Infracost can be setup in a matter of minutes; It is open source and free. Get started now:

[https://dashboard.infracost.io/](https://dashboard.infracost.io/)
[https://dashboard.infracost.io/](https://dashboard.infracost.io/)
4 changes: 2 additions & 2 deletions blog/2023-03-20-mar-2023-update.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ To achieve SOC2 Type 2 compliance, we underwent a rigorous audit conducted by a

## Usage file wildcards

The [usage file](/docs/features/usage_based_resources/) enables you to specify resource usage and get cost estimates for usage based resources such as AWS S3 or Lambda. This file now supports the use of the wildcard character `[*]` for resource arrays (resources with [`count` meta-argument](https://www.terraform.io/docs/language/meta-arguments/count.html)) and resource maps (resources with [`for_each` meta-argument](https://www.terraform.io/docs/language/meta-arguments/for_each.html)).
The [usage file](/docs/features/usage_based_resources/) enables you to specify resource usage and get cost estimates for usage based resources such as AWS S3 or Lambda. This file now supports the use of the wildcard character `[*]` for resource arrays (resources with [`count` meta-argument](https://www.terraform.io/docs/language/meta-arguments/count.html)) and resource maps (resources with [`for_each` meta-argument](https://www.terraform.io/docs/language/meta-arguments/for_each.html)).

```yaml
version: 0.1
Expand All @@ -58,7 +58,7 @@ We've redesigned the cost estimate page to simplify it. We've also made it easy

## Microsoft Teams integration

[Guardrails](/docs/infracost_cloud/guardrails/) help you control costs by monitoring pull requests and triggering actions when your defined thresholds or budgets are exceeded. Previously guardrails supported email and Slack notifications. We recently added support for Microsoft Teams to this feature too.
[Guardrails](/docs/infracost_cloud/guardrails/) help you control costs by monitoring pull requests and triggering actions when your defined thresholds or budgets are exceeded. Previously guardrails supported email and Slack notifications. We recently added support for Microsoft Teams to this feature too.

<img src={useBaseUrl("img/blog/mar-2023-update/microsoft-teams.png")} alt="Microsoft Teams integration" />

Expand Down
2 changes: 1 addition & 1 deletion blog/2023-06-14-jun-2023-update.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Infracost supports the following two files to help you customize how it runs. We
1. [Config files](/docs/features/config_file/) specify how Infracost should be run on a repo with multiple Terraform projects, e.g. infrastructure mono repos or Terragrunt repos. If your repo has Terraform var files, you also need a config file so Infracost knows how to apply them.
2. [Usage files](/docs/features/usage_based_resources/) specify usage estimates for resources such as AWS S3 or Azure Functions so you can get a more accurate cost estimate. You can use this to get an estimate faster instead of fiddling around with cloud vendor cost calculators, spreadsheets or wiki pages.

Try the Infracost [VS Code extension](https://marketplace.visualstudio.com/items?itemName=Infracost.infracost) to see cost estimates right in your editor, this has been installed more than 13,000 times 🚀
Try the Infracost [VS Code extension](https://marketplace.visualstudio.com/items?itemName=Infracost.infracost) to see cost estimates right in your editor, this has been installed more than 13,000 times 🚀

<img src={useBaseUrl("img/blog/jun-2023-update/vscode.png")} alt="See cost estimates for Terraform right in your editor!" />

Expand Down
8 changes: 4 additions & 4 deletions docs/cloud_pricing_api/self_hosted.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,11 @@ The Cloud Pricing API downloads the pricing DB dump from `https://pricing.api.in

If the `init-job` or the `cronjob` pods still fail to download prices, you can try changing their Kubernetes yaml to manually download the pricing DB dump using `curl` and pass any required corporate network proxy settings.
```
command:
command:
- /bin/bash
- -c
- |
npm run db:setup &&
- -c
- |
npm run db:setup &&
curl -s -H "X-Api-Key: ${INFRACOST_API_KEY}" https://pricing.api.infracost.io/data-download/latest | grep -o '"downloadUrl": *"[^"]*"' | grep -o '"[^"]*"$' | xargs -n1 curl --progress-bar --output ./data/products/products.csv.gz &&
npm run data:load
```
Expand Down
4 changes: 2 additions & 2 deletions docs/infracost_cloud/jira_integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Connect Infracost Cloud to Jira to enrich your team's cost estimates with powerf
Once enabled, the Jira integration:
- **Updates Jira issues with cost estimates** along with a direct link to your Infracost Cloud dashboard. Use this to dive into specific cloud costs impacted by engineering changes.
![jira issue](/img/jira/app-issue.png)
- You'll also be able to **review and unblock pull requests** that triggered [guardrails](docs/infracost_cloud/guardrails/).
- You'll also be able to **review and unblock pull requests** that triggered [guardrails](/docs/infracost_cloud/guardrails/).
![jira filter](/img/jira/app-guardrails.png)
- We'll also add Jira metadata to any Infracost Cloud estimate, meaning you can **search, filter and analyze costs** based on your team's Jira issues.
![dashboard](/img/jira/dashboard.png)
Expand All @@ -27,7 +27,7 @@ Once enabled, the Jira integration:
![copy token](/img/jira/2-copy-token.png)
4. Once you generate the token, a status banner appears. This highlights if Jira has successfully connected to Infracost Cloud. We'll check back here later to make sure everything looks good.
![integration status](/img/jira/3-integration-status.png)
5. Click the install app button, this takes you over to Atlassian Jira to complete the setup.
5. Click the install app button, this takes you over to Atlassian Jira to complete the setup.
![install app](/img/jira/4-install-app.png)
6. This will take you an approval screen where you'll be able to select which server you want to install the Infracost Jira app into.
![select server](/img/jira/5-select-server.png)
Expand Down
Loading