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/) -Cloud Costs directly in Jira \ No newline at end of file +Cloud Costs directly in Jira 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. Infracost is now SOC2 certified -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. Microsoft Teams integration 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 🚀 See cost estimates for Terraform right in your editor! 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
  1. In the Infracost Cloud dashboard go to Org Settings and copy your Org ID. You will need to provide this to Infracost in a future step.
  2. Login to the Azure portal
  3. Go to Azure Active Directory > App registrations
  4. Click New registration
  5. For the name enter Infracost Cloud
  6. For the Redirect URL select Web for the platform and enter https://login.infracost.io/login/callback
  7. Click on Add a certificate or secret > New client secret
  8. Copy the Application (client) ID. You will need to provide this to Infracost in a future step.
  9. Add a client secret with Description Infracost Cloud SSO that expires in 24 months.
  10. Copy the Client Secret Value. You will need to provide this to Infracost in the next step.
  11. Fill out the SSO setup form here, providing the Application (client) ID, Client secret value and the domain you want enabled for SSO.
Okta -
  1. In the Infracost Cloud dashboard go to Org Settings and copy your Org ID. You will need to provide this to Infracost in a future step.
  2. Login to the Okta Admin dashboard
  3. Go to Applications > Applications
  4. Click Create App Integration
  5. Select SAML 2.0 and click Next.
  6. For the App name enter Infracost Cloud and click Next.
  7. For Single sign on URL enter https://login.infracost.io/login/callback?connection=<YOUR INFRACOST ORG ID>
  8. For the Audience URL (SP Entity ID) enter urn:auth0:infracost:<YOUR INFRACOST ORG ID>Okta Attribute Statements form
  9. Add the following for the Attribute Statements section and click Next.Okta Attribute Statements form
  10. Choose 'I'm an Okta customer adding an internal app' and click Finish
  11. In the Sign on tab, scroll down to the SAML Signing Certificates section. On the right-hand side click the button to View SAML setup instructions.
  12. Copy the Identity Provider Single Sign-On URL and download the certificate.
  13. Fill out the SSO setup form here, providing the Identity Provider Single Sign-On URL, certificate and the domain you want enabled for SSO.
  14. In the Okta Admin dashboard assign any users to the Infracost Cloud app.
+
  1. In the Infracost Cloud dashboard go to Org Settings and copy your Org ID. You will need to provide this to Infracost in a future step.
  2. Login to the Okta Admin dashboard
  3. Go to Applications > Applications
  4. Click Create App Integration
  5. Select SAML 2.0 and click Next.
  6. For the App name enter Infracost Cloud and click Next.
  7. For Single sign on URL enter https://login.infracost.io/login/callback?connection=<YOUR INFRACOST ORG ID>
  8. For the Audience URL (SP Entity ID) enter urn:auth0:infracost:<YOUR INFRACOST ORG ID>Okta Attribute Statements form
  9. Add the following for the Attribute Statements section and click Next.Okta Attribute Statements form
  10. Choose 'I'm an Okta customer adding an internal app' and click Finish
  11. In the Sign on tab, scroll down to the SAML Signing Certificates section. On the right-hand side click the button to View SAML setup instructions.
  12. Copy the Identity Provider Single Sign-On URL and download the certificate.
  13. Fill out the SSO setup form here, providing the Identity Provider Single Sign-On URL, certificate and the domain you want enabled for SSO.
  14. In the Okta Admin dashboard assign any users to the Infracost Cloud app.
Google Workspace -
  1. In the Infracost Cloud dashboard go to Org Settings and copy your Org ID. You will need this when setting up the SAML app in Google Workspace.
  2. Login to Google Workspace admin
  3. Go to Apps > Web and mobile apps
  4. Click Add app > Add custom SAML app
  5. For the App name enter Infracost Cloud
  6. Copy the SSO URL and download the Certificate. You will need to supply these to Infracost in a future step. Click Continue.
  7. In the ACS URL enter: https://login.infracost.io/login/callback?connection=<YOUR INFRACOST ORG ID>
  8. In the Entity ID enter: urn:auth0:infracost:<YOUR INFRACOST ORG ID>
  9. Tick Signed response
  10. For Name ID format choose UNSPECIFIED and for Name ID choose Basic Information > Primary email. The form should look like the following:Google Workspace Service Provider form
  11. Click Continue
  12. Add the following Attributes and click Finish:Google Workspace Service Provider form
  13. Fill out the SSO setup form here, providing the SSO URL, Certificate and the domain you want enabled for SSO.
+
  1. In the Infracost Cloud dashboard go to Org Settings and copy your Org ID. You will need this when setting up the SAML app in Google Workspace.
  2. Login to Google Workspace admin
  3. Go to Apps > Web and mobile apps
  4. Click Add app > Add custom SAML app
  5. For the App name enter Infracost Cloud
  6. Copy the SSO URL and download the Certificate. You will need to supply these to Infracost in a future step. Click Continue.
  7. In the ACS URL enter: https://login.infracost.io/login/callback?connection=<YOUR INFRACOST ORG ID>
  8. In the Entity ID enter: urn:auth0:infracost:<YOUR INFRACOST ORG ID>
  9. Tick Signed response
  10. For Name ID format choose UNSPECIFIED and for Name ID choose Basic Information > Primary email. The form should look like the following:Google Workspace Service Provider form
  11. Click Continue
  12. Add the following Attributes and click Finish:Google Workspace Service Provider form
  13. Fill out the SSO setup form here, providing the SSO URL, Certificate and the domain you want enabled for SSO.
Other SAML providers
  1. In the Infracost Cloud dashboard go to Org Settings and copy your Org ID. You will need to provide this in the next step.
  2. Fill out the SSO setup form here, providing the SSO URL, certificate and the domain you want enabled for SSO.
diff --git a/docs/integrations/cicd.mdx b/docs/integrations/cicd.mdx index 8c3361cd..67c76b38 100644 --- a/docs/integrations/cicd.mdx +++ b/docs/integrations/cicd.mdx @@ -49,13 +49,13 @@ Infracost supports direct integration with GitHub and GitLab. We recommend these integrations as they are much simpler to setup, and faster to run. [This page](/docs/guides/source_control_benefits/) explains more about the benefits of source control integrations over CI/CD integrations. ## Third-party integrations diff --git a/docs/integrations/terraform_cloud_enterprise.md b/docs/integrations/terraform_cloud_enterprise.md index b484c4ad..ce3197e3 100644 --- a/docs/integrations/terraform_cloud_enterprise.md +++ b/docs/integrations/terraform_cloud_enterprise.md @@ -78,7 +78,7 @@ Infracost is a [verified](https://www.hashicorp.com/partners/tech/infracost) Ter | Terraform Cloud dashboard | Details link | |--------------|-----------| -Infracost running as a Run Task | Infracost details link +Infracost running as a Run Task | Infracost details link ## Running Infracost on local dev machines diff --git a/docs/support.md b/docs/support.md index cd42a169..7effabcf 100644 --- a/docs/support.md +++ b/docs/support.md @@ -5,7 +5,7 @@ title: Support If you need help using Infracost, or want to talk about something else, please join our [community Slack channel](https://www.infracost.io/community-chat) to chat with us 😄 You can also email us at [hello@infracost.io](mailto:hello@infracost.io). -If you notice a bug, please first [upgrade](/docs#installation) to the latest version of `infracost` to see if the bug has already been fixed. If not, [create an issue](https://github.com/infracost/infracost/issues/new/choose). Please use the `--debug-report` and include the `infracost-debug-report.json` file in your issue. +If you notice a bug, please first [upgrade](/#installation) to the latest version of `infracost` to see if the bug has already been fixed. If not, [create an issue](https://github.com/infracost/infracost/issues/new/choose). Please use the `--debug-report` and include the `infracost-debug-report.json` file in your issue. You might find our [troubleshooting](/docs/troubleshooting) guide helpful. diff --git a/docs/supported_resources/overview.md b/docs/supported_resources/overview.md index 588c16ec..9ddeecc3 100644 --- a/docs/supported_resources/overview.md +++ b/docs/supported_resources/overview.md @@ -5,7 +5,7 @@ title: Overview Infracost supports over **1,100** Terraform resources across [AWS](/docs/supported_resources/aws), [Azure](/docs/supported_resources/azure) and [Google](/docs/supported_resources/google). That number is growing fast thanks to our [large open source community](https://github.com/infracost/infracost/#community-and-contributing) of contributors. -The quickest way to find out if your Terraform resources are supported is to run [`infracost breakdown`](/docs#usage) with the `--show-skipped` flag. This shows the unsupported resources at the bottom of the output +The quickest way to find out if your Terraform resources are supported is to run [`infracost breakdown`](/#usage) with the `--show-skipped` flag. This shows the unsupported resources at the bottom of the output You could also run the following command to only see the unsupported resources: `infracost breakdown --path . --format=json | jq ".summary.unsupportedResourceCounts"` diff --git a/docusaurus.config.js b/docusaurus.config.js index 225f9a98..fb140e06 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -1,19 +1,18 @@ /* eslint-disable @typescript-eslint/no-var-requires */ /* eslint-disable global-require */ -const remarkExternalLinks = require('remark-external-links'); require('dotenv').config(); module.exports = { - title: "Infracost", - url: "https://www.infracost.io", - baseUrl: "/", - onBrokenLinks: "throw", - onBrokenMarkdownLinks: "throw", + title: 'Infracost', + url: 'https://www.infracost.io', + baseUrl: '/docs/', + onBrokenLinks: 'throw', + onBrokenMarkdownLinks: 'throw', trailingSlash: true, - favicon: "img/favicon.png", - organizationName: "infracost", - projectName: "docs", + favicon: 'img/favicon.png', + organizationName: 'infracost', + projectName: 'docs', customFields: { infracostDocsApiToken: process.env.INFRACOST_DOCS_API_TOKEN, infracostDashboardApiEndpoint: process.env.INFRACOST_DASHBOARD_API_ENDPOINT, @@ -21,231 +20,139 @@ module.exports = { }, plugins: [ [ - "@docusaurus/plugin-client-redirects", + '@docusaurus/plugin-client-redirects', { redirects: [ { - from: "/docs/integrations", - to: "/docs/integrations/github_actions", + from: '/integrations', + to: '/integrations/github_actions', }, { - from: [ - "/docs/environment_variables", - "/docs/integrations/environment_variables", - ], - to: "/docs/features/environment_variables", + from: ['/environment_variables', '/integrations/environment_variables'], + to: '/features/environment_variables', }, { - from: "/docs/infracost_api", - to: "/docs/integrations/infracost_api", + from: '/infracost_api', + to: '/integrations/infracost_api', }, { - from: "/docs/terraform_cloud_enterprise", - to: "/docs/integrations/terraform_cloud_enterprise", + from: '/terraform_cloud_enterprise', + to: '/integrations/terraform_cloud_enterprise', }, { - from: "/docs/terragrunt", - to: "/docs/features/terragrunt", + from: '/terragrunt', + to: '/features/terragrunt', }, { - from: "/docs/config_file", - to: "/docs/features/config_file", + from: '/config_file', + to: '/features/config_file', }, { - from: "/docs/report", - to: "/docs/features/cli_commands", + from: '/report', + to: '/features/cli_commands', }, { - from: "/docs/supported_resources", - to: "/docs/supported_resources/overview", + from: '/supported_resources', + to: '/supported_resources/overview', }, { - from: "/docs/iac_tools/terraform_cloud_enterprise", - to: "/docs/integrations/terraform_cloud_enterprise", + from: '/iac_tools/terraform_cloud_enterprise', + to: '/integrations/terraform_cloud_enterprise', }, { - from: "/docs/iac_tools/terragrunt", - to: "/docs/features/terragrunt", + from: '/iac_tools/terragrunt', + to: '/features/terragrunt', }, { - from: "/docs/multi_project/config_file", - to: "/docs/features/config_file", + from: '/multi_project/config_file', + to: '/features/config_file', }, { - from: "/docs/features/config_file_template/", - to: "/docs/features/config_file", + from: '/features/config_file_template/', + to: '/features/config_file', }, { - from: "/docs/usage_based_resources/", - to: "/docs/features/usage_based_resources/", + from: '/usage_based_resources/', + to: '/features/usage_based_resources/', }, { - from: "/docs/multi_project/report", - to: "/docs/features/cli_commands", + from: '/multi_project/report', + to: '/features/cli_commands', }, { - from: "/docs/terraform_modules", - to: "/docs/features/terraform_modules", + from: '/terraform_modules', + to: '/features/terraform_modules', }, { - from: "/docs/guides/terraform_modules", - to: "/docs/features/terraform_modules", + from: '/guides/terraform_modules', + to: '/features/terraform_modules', }, { - from: "/docs/infracost_cloud/overview", - to: "/docs/infracost_cloud/get_started", + from: '/infracost_cloud/overview', + to: '/infracost_cloud/get_started', }, { - from: "/docs/integrations/jira", - to: "/docs/infracost_cloud/jira_integration", + from: '/integrations/jira', + to: '/infracost_cloud/jira_integration', }, { - from: "/docs/infracost_cloud/authentication", - to: "/docs/infracost_cloud/key_concepts", + from: '/infracost_cloud/authentication', + to: '/infracost_cloud/key_concepts', }, { - from: '/docs/infracost_cloud/sso/overview', - to: '/docs/infracost_cloud/sso', + from: '/infracost_cloud/sso/overview', + to: '/infracost_cloud/sso', }, ], }, ], ], themeConfig: { - image: "img/social-image.png", + image: 'docs/img/social-image.png', colorMode: { - defaultMode: "light", + defaultMode: 'light', disableSwitch: true, respectPrefersColorScheme: false, }, announcementBar: { - id: "support_us", + id: 'support_us', content: - 'If you like Infracost, give it a star on GitHub!Star icon', - backgroundColor: "#2A2A5B", - textColor: "#EBEBF2", + 'If you like Infracost, give it a star on GitHub!Star icon', + backgroundColor: '#2A2A5B', + textColor: '#EBEBF2', }, prism: { - theme: require("prism-react-renderer/themes/dracula"), - additionalLanguages: ["hcl"], + theme: require('prism-react-renderer/themes/dracula'), + additionalLanguages: ['hcl'], }, algolia: { - appId: "ERN68FLCI1", - apiKey: "e62759e664aae55a8bfef8e93ecf6111", - indexName: "infracost", + appId: 'ERN68FLCI1', + apiKey: 'e62759e664aae55a8bfef8e93ecf6111', + indexName: 'infracost', contextualSearch: false, searchParameters: { facetFilters: [], }, }, - navbar: { - logo: { - alt: "Infracost logo", - src: "img/logo.svg", - }, - items: [ - { - to: "docs/", - activeBasePath: "docs", - label: "Docs", - position: "right", - }, - { - to: "blog", - blog: "blog", - label: "Blog", - position: "right", - }, - ], - }, - footer: { - links: [ - { - title: "Docs", - items: [ - { - label: "Getting started", - to: "docs/", - }, - { - label: "CI/CD integrations", - to: "docs/integrations/cicd", - }, - { - label: "Support", - to: "docs/support", - }, - ], - }, - { - title: "Community", - items: [ - { - label: "Slack", - href: "https://www.infracost.io/community-chat", - }, - { - label: "GitHub", - href: `https://github.com/infracost/infracost`, - }, - ], - }, - { - title: "More", - items: [ - { - label: "hello@infracost.io", - href: `mailto:hello@infracost.io`, - }, - { - label: "Blog", - to: "blog/", - }, - { - label: "Twitter", - href: "https://twitter.com/infracost", - }, - ], - }, - ], - copyright: `Copyright © ${new Date().getFullYear()} Infracost`, - }, }, presets: [ [ - "@docusaurus/preset-classic", + '@docusaurus/preset-classic', { docs: { - routeBasePath: "/docs", - sidebarPath: require.resolve("./sidebars.js"), + routeBasePath: '/', + sidebarPath: require.resolve('./sidebars.js'), editUrl: `https://github.com/infracost/docs/edit/master`, }, - blog: { - blogDescription: - "Infracost blog - Cloud cost estimates for Terraform", - blogSidebarCount: "ALL", - blogSidebarTitle: "All posts", - include: ["**/*.md", "**/*.mdx"], - postsPerPage: 12, - archiveBasePath: null, - remarkPlugins: [ - [ - remarkExternalLinks, - { - rel: ["noopener"], - }, - ], - ], - }, theme: { - customCss: require.resolve("./src/css/index.css"), + customCss: require.resolve('./src/css/index.css'), }, sitemap: { - changefreq: "weekly", + changefreq: 'weekly', priority: 0.5, }, gtag: { - trackingID: "G-9GFV9Z9NNZ", + trackingID: 'G-9GFV9Z9NNZ', anonymizeIP: true, }, googleTagManager: { diff --git a/package-lock.json b/package-lock.json index 15a7d933..150463e2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -29,8 +29,7 @@ "react": "^16.8.4", "react-dom": "^16.8.4", "react-helmet-async": "^1.3.0", - "react-markdown": "^8.0.7", - "remark-external-links": "^8.0.0" + "react-markdown": "^8.0.7" }, "devDependencies": { "@babel/eslint-parser": "^7.5.4", @@ -9340,14 +9339,6 @@ "node": ">= 10" } }, - "node_modules/is-absolute-url": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/is-absolute-url/-/is-absolute-url-3.0.3.tgz", - "integrity": "sha512-opmNIX7uFnS96NtPmhWQgQx6/NYFgsUXYMllcfzwWKUMwfo8kku1TvE6hkNcH+Q1ts5cMVrsY7j0bxXQDciu9Q==", - "engines": { - "node": ">=8" - } - }, "node_modules/is-alphabetical": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-1.0.4.tgz", @@ -13220,22 +13211,6 @@ "unist-util-visit": "^2.0.3" } }, - "node_modules/remark-external-links": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/remark-external-links/-/remark-external-links-8.0.0.tgz", - "integrity": "sha512-5vPSX0kHoSsqtdftSHhIYofVINC8qmp0nctkeU9YoJwV3YfiBRiI6cbFRJ0oI/1F9xS+bopXG0m2KS8VFscuKA==", - "dependencies": { - "extend": "^3.0.0", - "is-absolute-url": "^3.0.0", - "mdast-util-definitions": "^4.0.0", - "space-separated-tokens": "^1.0.0", - "unist-util-visit": "^2.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, "node_modules/remark-footnotes": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/remark-footnotes/-/remark-footnotes-2.0.0.tgz", @@ -22940,11 +22915,6 @@ "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-2.0.1.tgz", "integrity": "sha512-1qTgH9NG+IIJ4yfKs2e6Pp1bZg8wbDbKHT21HrLIeYBTRLgMYKnMTPAuI3Lcs61nfx5h1xlXnbJtH1kX5/d/ng==" }, - "is-absolute-url": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/is-absolute-url/-/is-absolute-url-3.0.3.tgz", - "integrity": "sha512-opmNIX7uFnS96NtPmhWQgQx6/NYFgsUXYMllcfzwWKUMwfo8kku1TvE6hkNcH+Q1ts5cMVrsY7j0bxXQDciu9Q==" - }, "is-alphabetical": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-1.0.4.tgz", @@ -25574,18 +25544,6 @@ "unist-util-visit": "^2.0.3" } }, - "remark-external-links": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/remark-external-links/-/remark-external-links-8.0.0.tgz", - "integrity": "sha512-5vPSX0kHoSsqtdftSHhIYofVINC8qmp0nctkeU9YoJwV3YfiBRiI6cbFRJ0oI/1F9xS+bopXG0m2KS8VFscuKA==", - "requires": { - "extend": "^3.0.0", - "is-absolute-url": "^3.0.0", - "mdast-util-definitions": "^4.0.0", - "space-separated-tokens": "^1.0.0", - "unist-util-visit": "^2.0.0" - } - }, "remark-footnotes": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/remark-footnotes/-/remark-footnotes-2.0.0.tgz", diff --git a/package.json b/package.json index cdd90a64..7dff0f36 100644 --- a/package.json +++ b/package.json @@ -37,8 +37,7 @@ "react": "^16.8.4", "react-dom": "^16.8.4", "react-helmet-async": "^1.3.0", - "react-markdown": "^8.0.7", - "remark-external-links": "^8.0.0" + "react-markdown": "^8.0.7" }, "browserslist": { "production": [ diff --git a/src/components/CTA.js b/src/components/CTA.js index 75c2aea2..520615da 100644 --- a/src/components/CTA.js +++ b/src/components/CTA.js @@ -4,7 +4,7 @@ function CTA() { return (
- Infracost icon + Infracost icon

Try Infracost for free

Signup and get started now diff --git a/src/components/FinopsSection/ScrollPrompt.tsx b/src/components/FinopsSection/ScrollPrompt.tsx index e6ae8ac0..36d65219 100644 --- a/src/components/FinopsSection/ScrollPrompt.tsx +++ b/src/components/FinopsSection/ScrollPrompt.tsx @@ -16,7 +16,7 @@ const ScrollPrompt = () => { return ( - Scroll down + Scroll down ); }; diff --git a/src/components/FinopsSection/index.tsx b/src/components/FinopsSection/index.tsx index 8a4edf0b..e54b5fc3 100644 --- a/src/components/FinopsSection/index.tsx +++ b/src/components/FinopsSection/index.tsx @@ -7,7 +7,7 @@ import LiWithCheck from '../LiWithCheck'; import ContactForm from './ContactForm'; const url = (name: string, wrap = false) => - `${wrap ? 'url(' : ''}/img/finops/${name}${wrap ? ')' : ''}`; + `${wrap ? 'url(' : ''}/docs/img/finops/${name}${wrap ? ')' : ''}`; const Index = () => { const parallax = useRef(null); diff --git a/src/components/Footer.js b/src/components/Footer.js index aa700980..a48d7ecc 100644 --- a/src/components/Footer.js +++ b/src/components/Footer.js @@ -11,19 +11,19 @@ function Footer() {

Documentation

@@ -31,7 +31,7 @@ function Footer() {

Community

@@ -92,10 +87,10 @@ function Footer() {
diff --git a/src/components/GitHubStarCount.js b/src/components/GitHubStarCount.js index 104e50d5..ca6faa50 100644 --- a/src/components/GitHubStarCount.js +++ b/src/components/GitHubStarCount.js @@ -60,7 +60,7 @@ function GitHubStarCount() {
GitHub star icon (