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

docs: update CI/CD integrations #604

Merged
merged 2 commits into from
Feb 18, 2024
Merged
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
18 changes: 8 additions & 10 deletions docs/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@ title: FAQ

## How does Infracost work?

Infracost has a [CLI](https://github.com/infracost/infracost) and a [Cloud Pricing API](/docs/cloud_pricing_api/overview) backend service, as well as many [CI/CD integrations](/docs/integrations/cicd). There is also a SaaS product, <a href="https://www.infracost.io/pricing/" target="_self" rel="">Infracost Cloud</a>, that complements the open source CLI by giving teams advanced visibility and controls.
Infracost has a [CLI](https://github.com/infracost/infracost) and a [Cloud Pricing API](/docs/supported_resources/cloud_pricing_api) backend service, as well as many [CI/CD integrations](/docs/integrations/cicd). There is also a SaaS product, <a href="https://www.infracost.io/pricing/" target="_self" rel="">Infracost Cloud</a>, that complements the open source CLI by giving teams advanced visibility and controls.
When the CLI runs, it:

1. **Extracts cost-related parameters**<br />
The CLI parses Terraform HCL code to extract only [cost-related parameters](/docs/faq#example-request), such as the instance type or disk size.

2. **Retrieves prices from the Cloud Pricing API**<br />
The CLI retrieves prices from the Cloud Pricing API. The CLI **does not** send the actual plan JSON file, or any cloud credentials or secrets to the Cloud Pricing API. The API [returns the prices](/docs/faq#example-response).
The CLI retrieves prices from the Cloud Pricing API. The CLI **does not** send the Terraform plan JSON file, or any cloud credentials or secrets to the Cloud Pricing API. The API [returns the prices](/docs/faq#example-response).

3. **Calculates the monthly costs**<br />
The CLI calculates the monthly costs. The results can be output in table, JSON format or [other formats](/docs/features/cli_commands/#combined-output-formats).
The CLI calculates the monthly costs. The results can be output in [various formats](/docs/features/cli_commands/#combined-output-formats) including JSON or text table.

4. **Infracost Cloud**<br />
If you have enabled this product, the CLI sends the final cost estimate in JSON format to your account in Infracost Cloud.
If you use Infracost Cloud, the CLI sends the final cost estimate in JSON format to your dashboard, the JSON does not contain any cloud credentials or secrets.

## Security and Privacy

Expand Down Expand Up @@ -80,15 +80,15 @@ query {

### Does Infracost need cloud credentials?

No! Infracost parses code and uses pricing data to estimate costs.
No! Infracost parses code directly and uses pricing data to estimate costs.

### Does the Infracost CLI send the Terraform plan to the Cloud Pricing API?

No. The Infracost CLI parses the Terraform plan JSON file to find [cost-related parameters](/docs/faq#example-request) and uses those to lookup cloud prices.
No. The Infracost CLI parses the Terraform HCL code directly or the plan JSON file to find [cost-related parameters](/docs/faq#example-request) and uses those to lookup cloud prices.

### What data is sent to Infracost Cloud?

If you have [enabled](/docs/infracost_cloud/get_started/) this, the CLI sends its [JSON output](/docs/features/cli_commands/#examples) to your account in Infracost Cloud; you can generate and inspect this JSON. It does not contain any cloud credentials or secrets.
If you use [Infracost Cloud](/docs/infracost_cloud/get_started/), the CLI sends its [JSON output](/docs/features/cli_commands/#combined-output-formats) to your dashboard; you can generate and inspect this JSON. It does not contain any cloud credentials or secrets.

### Do you sell my data?

Expand Down Expand Up @@ -135,9 +135,7 @@ Sure! See the [currency](/docs/features/environment_variables/#infracost_currenc

### What's the difference between source control and CI/CD integration?

Source control integration is when you connect Infracost directly to your GitHub or GitLab. CI/CD integration is when you install the Infracost CLI in your CI/CD pipelines and run commands.

We recommend source control integration as it is 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.
Source control integration is when you connect Infracost directly to your GitHub or GitLab. CI/CD integration is when you install the Infracost CLI in your CI/CD pipelines and run commands. We recommend source control integration as it is simpler to setup and faster to run.

### Do you offer support?

Expand Down
12 changes: 0 additions & 12 deletions docs/features/cli_commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ This is the **default and recommended** option. It does not require a Terraform
Usually no extra setup is needed for handling the following on your local development machines. For CI/CD, see the corresponding pages.
- **Private modules** see [this page](/docs/features/terraform_modules/) for more details.
- **Terragrunt** see [this page](/docs/features/terragrunt/) for more details.
- **Terraform Cloud/Enterprise** see [this page](/docs/integrations/terraform_cloud_enterprise/#running-infracost-on-local-dev-machines) for more details.

### Option 2: Terraform plan JSON

Expand Down Expand Up @@ -314,7 +313,6 @@ infracost comment github --path=infracost.json \
- `--github-token`: required, use `$GITHUB_TOKEN`.
- `--github-api-url`: optional (default "https://api.github.com"), GitHub Enterprise users can set this to `$GITHUB_API_URL` in GitHub Actions. Also see `--github-tls-cert-file`, `--github-tls-key-file` and `--github-tls-insecure-skip-verify`.
- `--tag`: optional, customize hidden markdown tag used to detect comments posted by Infracost.
- `--policy-path`: optional, path to Infracost [cost policy](/docs/features/cost_policies/) files, glob patterns need quotes (experimental).
- `--show-all-projects`: optional, show all projects in the table of the comment output.

#### Azure Pipelines with GitHub
Expand All @@ -334,7 +332,6 @@ infracost comment github --path=infracost.json \
- `--github-token`: required, use `$GITHUB_TOKEN`.
- `--github-api-url`: optional (default "https://api.github.com"), GitHub Enterprise users can set this to `https://GITHUB_SERVER/api`.
- `--tag`: optional, customize hidden markdown tag used to detect comments posted by Infracost.
- `--policy-path`: optional, path to Infracost [cost policy](/docs/features/cost_policies/) files, glob patterns need quotes (experimental).
- `--show-all-projects`: optional, show all projects in the table of the comment output.

#### Atlantis with GitHub
Expand All @@ -354,7 +351,6 @@ infracost comment github --path=infracost.json \
- `--github-token`: required, provide your GitHub token, for example, as an environment variable `$GITHUB_TOKEN`.
- `--github-api-url`: optional (default "https://api.github.com"), GitHub Enterprise users can set this to `https://GITHUB_SERVER/api`.
- `--tag`: optional, customize hidden markdown tag used to detect comments posted by Infracost.
- `--policy-path`: optional, path to Infracost [cost policy](/docs/features/cost_policies/) files, glob patterns need quotes (experimental).
- `--show-all-projects`: optional, show all projects in the table of the comment output.

#### CircleCI with GitHub
Expand All @@ -374,7 +370,6 @@ infracost comment github --path=infracost.json \
- `--github-token`: required, provide your GitHub token, for example, as an environment variable `$GITHUB_TOKEN`.
- `--github-api-url`: optional (default "https://api.github.com"), GitHub Enterprise users can set this to `https://GITHUB_SERVER/api`.
- `--tag`: optional, customize hidden markdown tag used to detect comments posted by Infracost.
- `--policy-path`: optional, path to Infracost [cost policy](/docs/features/cost_policies/) files, glob patterns need quotes (experimental).
- `--show-all-projects`: optional, show all projects in the table of the comment output.

### GitLab
Expand All @@ -398,7 +393,6 @@ infracost comment gitlab --path=infracost.json \
- `--gitlab-token`: required, use `$GITLAB_TOKEN`.
- `--gitlab-server-url`: optional, URL for GitLab Enterprise users (default "https://gitlab.com"). In GitLab CI you can set this to `$CI_SERVER_URL`.
- `--tag`: optional, customize hidden markdown tag used to detect comments posted by Infracost.
- `--policy-path`: optional, path to Infracost [cost policy](/docs/features/cost_policies/) files, glob patterns need quotes (experimental).
- `--show-all-projects`: optional, show all projects in the table of the comment output.

#### Atlantis with GitLab
Expand All @@ -418,7 +412,6 @@ infracost comment gitlab --path=infracost.json \
- `--gitlab-token`: required, provide your GitLab token as an environment variable, for example as `$GITLAB_TOKEN`.
- `--gitlab-server-url`: optional, URL for GitLab Enterprise users (default "https://gitlab.com").
- `--tag`: optional, customize hidden markdown tag used to detect comments posted by Infracost.
- `--policy-path`: optional, path to Infracost [cost policy](/docs/features/cost_policies/) files, glob patterns need quotes (experimental).
- `--show-all-projects`: optional, show all projects in the table of the comment output.

### Azure Repos
Expand All @@ -440,7 +433,6 @@ infracost comment azure-repos --path=infracost.json \
- `--pull-request`: required to post on a pull request, `$SYSTEM_PULLREQUEST_PULLREQUESTID`.
- `--azure-access-token`: required, use `$SYSTEM_ACCESSTOKEN`.
- `--tag`: optional, customize hidden markdown tag used to detect comments posted by Infracost.
- `--policy-path`: optional, path to Infracost [cost policy](/docs/features/cost_policies/) files, glob patterns need quotes (experimental).
- `--show-all-projects`: optional, show all projects in the table of the comment output.

#### Atlantis with Azure Repos
Expand All @@ -458,7 +450,6 @@ infracost comment azure-repos --path=infracost.json \
- `--pull-request`: required to post on a pull request, use `$PULL_NUM`.
- `--azure-access-token`: required, provide your Azure DevOps access token, for example, as an environment variable `$AZURE_ACCESS_TOKEN`.
- `--tag`: optional, customize hidden markdown tag used to detect comments posted by Infracost.
- `--policy-path`: optional, path to Infracost [cost policy](/docs/features/cost_policies/) files, glob patterns need quotes (experimental).
- `--show-all-projects`: optional, show all projects in the table of the comment output.

### Bitbucket
Expand All @@ -483,7 +474,6 @@ infracost comment bitbucket --path=infracost.json \
- `--bitbucket-server-url`: optional, URL for Bitbucket Server/Data Center users (default "https://bitbucket.org").
- `--exclude-cli-output`: optional, exclude CLI output so comment has just the summary table.
- `--tag`: optional, customize hidden markdown tag used to detect comments posted by Infracost.
- `--policy-path`: optional, path to Infracost [cost policy](/docs/features/cost_policies/) files, glob patterns need quotes (experimental).
- `--show-all-projects`: optional, show all projects in the table of the comment output.

#### CircleCI with Bitbucket
Expand All @@ -504,7 +494,6 @@ infracost comment bitbucket --path infracost.json \
- `--bitbucket-server-url`: optional, URL for Bitbucket Server/Data Center users (default "https://bitbucket.org").
- `--exclude-cli-output`: optional, exclude CLI output so comment has just the summary table.
- `--tag`: optional, customize hidden markdown tag used to detect comments posted by Infracost.
- `--policy-path`: optional, path to Infracost [cost policy](/docs/features/cost_policies/) files, glob patterns need quotes (experimental).
- `--show-all-projects`: optional, show all projects in the table of the comment output.

#### Atlantis with Bitbucket
Expand All @@ -525,7 +514,6 @@ infracost comment bitbucket --path=infracost.json \
- `--bitbucket-server-url`: optional, URL for Bitbucket Server/Data Center users (default "https://bitbucket.org").
- `--exclude-cli-output`: optional, exclude CLI output so comment has just the summary table.
- `--tag`: optional, customize hidden markdown tag used to detect comments posted by Infracost.
- `--policy-path`: optional, path to Infracost [cost policy](/docs/features/cost_policies/) files, glob patterns need quotes (experimental).
- `--show-all-projects`: optional, show all projects in the table of the comment output.

## Upload runs
Expand Down
File renamed without changes.
4 changes: 0 additions & 4 deletions docs/getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,3 @@ Example output:
If you run into any issues, please join our [community Slack channel](https://www.infracost.io/community-chat), we'll help you very quickly 😄

<img src={useBaseUrl("img/screenshots/actions-pull-request.png")} alt="Infracost pull request comment" />

If you use VS Code, checkout our [VS Code extension](https://github.com/infracost/vscode-infracost/) to also see cost estimates right in your editor!

<img src={useBaseUrl("img/screenshots/get-started-vscode.gif")} alt="Infracost VS Code extension" />
114 changes: 0 additions & 114 deletions docs/guides/actions_migration.md

This file was deleted.

Loading
Loading