diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 95b14c24..7c69f884 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 diff --git a/.github/workflows/release_dev.yml b/.github/workflows/release_dev.yml index 37658140..c33910dd 100644 --- a/.github/workflows/release_dev.yml +++ b/.github/workflows/release_dev.yml @@ -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 }} diff --git a/.github/workflows/release_prod.yml b/.github/workflows/release_prod.yml index 9b47b8c8..8d9a580c 100644 --- a/.github/workflows/release_prod.yml +++ b/.github/workflows/release_prod.yml @@ -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 }} diff --git a/.github/workflows/upload_assets.yml b/.github/workflows/upload_assets.yml new file mode 100644 index 00000000..d5249dc0 --- /dev/null +++ b/.github/workflows/upload_assets.yml @@ -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 diff --git a/blog/2020-08-17-infracost-cloud-costs-for-devs.md b/blog/2020-08-17-infracost-cloud-costs-for-devs.md index e6be1671..f10fa9fa 100644 --- a/blog/2020-08-17-infracost-cloud-costs-for-devs.md +++ b/blog/2020-08-17-infracost-cloud-costs-for-devs.md @@ -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). diff --git a/blog/2022-05-12-why-are-cloud-costs-so-complex.md b/blog/2022-05-12-why-are-cloud-costs-so-complex.md index 3186f086..c53c8018 100644 --- a/blog/2022-05-12-why-are-cloud-costs-so-complex.md +++ b/blog/2022-05-12-why-are-cloud-costs-so-complex.md @@ -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. diff --git a/blog/2023-02-07-feb-2023-update.md b/blog/2023-02-07-feb-2023-update.md index 2df7c7d3..acb86282 100644 --- a/blog/2023-02-07-feb-2023-update.md +++ b/blog/2023-02-07-feb-2023-update.md @@ -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. diff --git a/blog/2023-02-16-cost-of-changes-in-jira-infracost.md b/blog/2023-02-16-cost-of-changes-in-jira-infracost.md index 1c6c2b7e..3fcb3685 100644 --- a/blog/2023-02-16-cost-of-changes-in-jira-infracost.md +++ b/blog/2023-02-16-cost-of-changes-in-jira-infracost.md @@ -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/) - \ No newline at end of file + diff --git a/blog/2023-03-08-cloud-cost-optimization-formula.md b/blog/2023-03-08-cloud-cost-optimization-formula.md index 95a7ca4b..f2f45d26 100644 --- a/blog/2023-03-08-cloud-cost-optimization-formula.md +++ b/blog/2023-03-08-cloud-cost-optimization-formula.md @@ -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. \ No newline at end of file +Usage optimization requires engineering effort, and is the main component of the equation to impact for long term optimization. diff --git a/blog/2023-03-08-infracost-soc2-certified.md b/blog/2023-03-08-infracost-soc2-certified.md index 860d80f4..24440b08 100644 --- a/blog/2023-03-08-infracost-soc2-certified.md +++ b/blog/2023-03-08-infracost-soc2-certified.md @@ -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. -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). @@ -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/) \ No newline at end of file +[https://dashboard.infracost.io/](https://dashboard.infracost.io/) diff --git a/blog/2023-03-20-mar-2023-update.md b/blog/2023-03-20-mar-2023-update.md index bbd9ab6f..2dea8de9 100644 --- a/blog/2023-03-20-mar-2023-update.md +++ b/blog/2023-03-20-mar-2023-update.md @@ -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 @@ -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. diff --git a/blog/2023-06-14-jun-2023-update.md b/blog/2023-06-14-jun-2023-update.md index 129c89f0..ba228577 100644 --- a/blog/2023-06-14-jun-2023-update.md +++ b/blog/2023-06-14-jun-2023-update.md @@ -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 🚀 diff --git a/docs/cloud_pricing_api/self_hosted.md b/docs/cloud_pricing_api/self_hosted.md index 0ea24bf9..43f395eb 100644 --- a/docs/cloud_pricing_api/self_hosted.md +++ b/docs/cloud_pricing_api/self_hosted.md @@ -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 ``` diff --git a/docs/infracost_cloud/jira_integration.md b/docs/infracost_cloud/jira_integration.md index 4a98b786..69f651a6 100644 --- a/docs/infracost_cloud/jira_integration.md +++ b/docs/infracost_cloud/jira_integration.md @@ -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) @@ -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) diff --git a/docs/infracost_cloud/sso.md b/docs/infracost_cloud/sso.md index bdd68cfd..d1031202 100644 --- a/docs/infracost_cloud/sso.md +++ b/docs/infracost_cloud/sso.md @@ -13,10 +13,10 @@ Infracost Cloud supports authenticating with Enterprise SSO providers. To set up
Org Settings
and copy your Org ID
. You will need to provide this to Infracost in a future step.Azure Active Directory > App registrations
New registration
Infracost Cloud
Web
for the platform and enter https://login.infracost.io/login/callback
Add a certificate or secret > New client secret
Infracost Cloud SSO
that expires in 24 months.Org Settings
and copy your Org ID
. You will need to provide this to Infracost in a future step.Applications > Applications
Create App Integration
SAML 2.0
and click Next.Infracost Cloud
and click Next.https://login.infracost.io/login/callback?connection=<YOUR INFRACOST ORG ID>
urn:auth0:infracost:<YOUR INFRACOST ORG ID>
Org Settings
and copy your Org ID
. You will need to provide this to Infracost in a future step.Applications > Applications
Create App Integration
SAML 2.0
and click Next.Infracost Cloud
and click Next.https://login.infracost.io/login/callback?connection=<YOUR INFRACOST ORG ID>
urn:auth0:infracost:<YOUR INFRACOST ORG ID>
Org Settings
and copy your Org ID
. You will need this when setting up the SAML app in Google Workspace.Apps > Web and mobile apps
Add app > Add custom SAML app
Infracost Cloud
https://login.infracost.io/login/callback?connection=<YOUR INFRACOST ORG ID>
urn:auth0:infracost:<YOUR INFRACOST ORG ID>
Signed response
UNSPECIFIED
and for Name ID choose Basic Information > Primary email
. The form should look like the following:Org Settings
and copy your Org ID
. You will need this when setting up the SAML app in Google Workspace.Apps > Web and mobile apps
Add app > Add custom SAML app
Infracost Cloud
https://login.infracost.io/login/callback?connection=<YOUR INFRACOST ORG ID>
urn:auth0:infracost:<YOUR INFRACOST ORG ID>
Signed response
UNSPECIFIED
and for Name ID choose Basic Information > Primary email
. The form should look like the following:Org Settings
and copy your Org ID
. You will need to provide this in the next step.