ARUN Thundyill Saseendran
02/22/2023, 8:27 PMNoah
02/23/2023, 7:58 PMCloud Pricing API
server but POST custom GraphQL queries, I can bypass the infracost
cli altogether? Scope: I want to programmatically query for pricing but w/o using Terraform.ARUN Thundyill Saseendran
02/24/2023, 11:31 AMSlackbot
02/24/2023, 1:06 PMMayank Khudia
02/27/2023, 7:17 AMScott Emberson
03/03/2023, 8:13 AMterraform plan -var 'geo=us' -var 'environment=ecos'
How can we build this into our pull requests to say env ecos cost X, env qa2 cost X, prod1 will cost X.Paulo Correia
03/06/2023, 2:22 PMMayank Khudia
03/07/2023, 12:09 PMLocation Type: Zonal
. I believe it is not supported by infracost. Correct me if am wrong here.Mayank Khudia
03/07/2023, 12:10 PMzonal
clusters under free tier ??Harshul Goel
03/07/2023, 6:31 PMMax Kruger
03/09/2023, 12:09 PMHarikrishna Kuchibhotla
03/10/2023, 9:05 PM./tf-repo
├── .github
│ └── workflow.yml
└── infras
├── account1
│ └── us-east-1
│ ├── app1
│ │ └── <http://main.tf|main.tf>
│ ├── app2
│ │ └── <http://main.tf|main.tf>
│ └── app3
│ └── <http://main.tf|main.tf>
└── account2
The PR integration is in-place and the infracost check runs successfully but nothing is displayed on the dashboard. how is the usage file supposed to work? The folder depth is 5 from the root.Noah
03/13/2023, 5:03 PMinfracost
? Our team doesn't use Terraform, but I'm interested in the Cloud Pricing API
server. I'm looking to dynamically construct a GraphQL query to submit to a self-hosted Cloud Pricing
server, and I'm looking to see how infracost breakdown
works. Taking this Terraform example:
$ cat <http://ec2_simple.tf|ec2_simple.tf>
resources "aws_instance" "my-web-service" {
instance_type = "t2.micro"
}
Running infracost breakdown -p .
gives us: OVERALL TOTAL $9.27
. I'm looking to see what the GraphQL query looks like in this simple example, then to construct larger Terraform files to see how the query changes.Mayank Khudia
03/15/2023, 12:32 PMOliver Schoenborn
03/16/2023, 1:37 AMdb.t3.medium
. The infracost says class is mock, little weird. Latest release 0.10.18 and command used was: infracost breakdown --path .
in the folder that has the tf files and tfvars etc. This stack is live.
Name Monthly Qty Unit Monthly Cost
module.dss_comp_database.aws_db_instance.postgres[0]
├─ Database instance (on-demand, Single-AZ, db_instance_class-mock) 730 hours $0.00
└─ Storage (general purpose SSD, gp2) 20 GB $2.54
Sam L'Huillier
03/17/2023, 12:15 AMScott Emberson
03/17/2023, 12:27 PMJulius Oh
03/19/2023, 7:10 AMinfracost comment github --path /tmp/infracost.json --repo juliusoh/portfolio-aws-terraform --github-token ${{ github.token }} --behavior=update --commit $GITHUB_SHA
Errors with
POST <https://api.github.com/repos/juliusoh/portfolio-aws-terraform/commits/8ebabc614fa7b69c006ea450661a2026c40ac179/comments>: 403 Resource not accessible by integration []
Mengying Li
03/21/2023, 12:49 AM- run: terragrunt show -json "$$PLANFILE" > "$$SHOWFILE"
- run: |
infracost breakdown --path="$$SHOWFILE" \
--format=json \
--log-level=info \
--out-file="$$INFRACOST_OUTPUT" \
--project-name="$$REPO_REL_DIR"
- run: |
infracost comment github --repo xxx \
--pull-request $$PULL_NUM \
--path $$INFRACOST_OUTPUT \
--github-token $$ATLANTIS_GH_TOKEN \
--tag $$INFRACOST_COMMENT_TAG \
--behavior new
I guess I’m trying to understand generally why we don’t need infracost diff inside cicd set up. I’m using terragrunt with atlantis as my set up. Any help would be appreciated, many thanksScott Emberson
03/21/2023, 10:04 AMUsing eastus for resource module.network.azurerm_virtual_network_peering.vnet_hub_adm as its 'location' property could not be found.
as infracost is not picking up the regionJohn
03/21/2023, 3:30 PMon: pull_request
but Infracost syntax runs only with this syntax on: [pull_request]
. Is there any other option to fix this issue? Thank you in advance.Noah
03/21/2023, 3:56 PMAzure Container App
resource file. I'm looking in infracost/internal/resources/azure/
Noah
03/21/2023, 3:56 PMNoah
03/21/2023, 7:44 PMschema.AttributeFilter
s is removed, will the Cloud Pricing API Server
respond successfully? E.g.:
// computeCostComponent returns a cost component for server compute requirements.
func (r *PostgreSQLFlexibleServer) computeCostComponent() *schema.CostComponent {
attrs := getFlexibleServerFilterAttributes(r.Tier, r.InstanceType, r.InstanceVersion)
return &schema.CostComponent{
Name: fmt.Sprintf("Compute (%s)", r.SKU),
Unit: "hours",
UnitMultiplier: decimal.NewFromInt(1),
HourlyQuantity: decimalPtr(decimal.NewFromInt(1)),
ProductFilter: &schema.ProductFilter{
VendorName: strPtr("azure"),
Region: strPtr(r.Region),
Service: strPtr("Azure Database for PostgreSQL"),
ProductFamily: strPtr("Databases"),
AttributeFilters: []*schema.AttributeFilter{
{Key: "productName", ValueRegex: strPtr(fmt.Sprintf("/^Azure Database for PostgreSQL Flexible Server %s %s/i", attrs.TierName, attrs.Series))}, // <-------------
{Key: "skuName", ValueRegex: regexPtr(fmt.Sprintf("^%s$", attrs.SKUName))}, // <-------------
{Key: "meterName", ValueRegex: regexPtr(fmt.Sprintf("^%s$", attrs.MeterName))}, // <-------------
},
},
PriceFilter: &schema.PriceFilter{
PurchaseOption: strPtr("Consumption"),
},
}
}
Noah
03/22/2023, 6:48 PMCloud Pricing API
server, I get this:
~/cloud-pricing-api $ curl -X POST <http://localhost:4000>
{"error":"Invalid API key"}
What is the format for including the API credential in the POST
request?Slackbot
03/23/2023, 7:07 PMMengying Li
03/27/2023, 5:13 PMNoah
03/27/2023, 8:12 PMinfracost/infracost
source code, as I am building a custom interface to the Cloud Pricing API Server
(we do not use terraform
).
I am looking at internal/providers/terraform/azure/application_gateway.go
, and see the following:
• Data processing cost component
• Capacity units cost component
• Gateway cost component
• Fixed for V2 cost component
For a custom interface to the pricing API, is the GraphQL query a composite of the 4 price components? E.g. the 4 need to get calculated then added up?Ilya Zhorov
03/28/2023, 2:05 PMgit clone '<ssh://git@github.com/contentsquare/platform_terraform_modules.git?ref=7.24.7>'
which will indeed fail than maybe drop to wrong error handling?
some direction appreciated 🙏Sam L'Huillier
03/29/2023, 12:56 AMSam L'Huillier
03/29/2023, 12:56 AMAli (Infracost)
03/29/2023, 2:51 AMSam L'Huillier
03/29/2023, 2:54 AMAli (Infracost)
03/29/2023, 5:46 AM