mammoth-microphone-92343
03/07/2023, 12:09 PMLocation Type: Zonal
. I believe it is not supported by infracost. Correct me if am wrong here.mammoth-microphone-92343
03/07/2023, 12:10 PMzonal
clusters under free tier ??fancy-scientist-81076
03/07/2023, 6:31 PMaloof-memory-96366
03/09/2023, 12:09 PMflat-quill-76005
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.able-pencil-95187
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.mammoth-microphone-92343
03/15/2023, 12:32 PMkind-planet-77251
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
ancient-shoe-76686
03/17/2023, 12:15 AMmillions-plumber-38090
03/17/2023, 12:27 PMacceptable-caravan-50612
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 []
most-sugar-17243
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 thanksmillions-plumber-38090
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 regionorange-helicopter-53505
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.able-pencil-95187
03/21/2023, 3:56 PMAzure Container App
resource file. I'm looking in infracost/internal/resources/azure/
able-pencil-95187
03/21/2023, 3:56 PMable-pencil-95187
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"),
},
}
}
able-pencil-95187
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?broad-zoo-34077
03/23/2023, 7:07 PMmost-sugar-17243
03/27/2023, 5:13 PMable-pencil-95187
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?gifted-garage-23885
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 🙏ancient-shoe-76686
03/29/2023, 12:56 AMenough-sundown-27979
03/31/2023, 3:37 PMinfracost.exe breakdown --path ./terraform/ --terraform-var-file ./vars/uat.tfvars --format json --out-file infracost-base-uat2.json
infracost.exe upload --path infracost-base-uat2.json
But when I use the comment command i am getting an error (trying to get data on the dashboard)
infracost.exe comment gitlab --repo /path/to/repo --merge-request 17 --path=infracost-base-uat2.json --gitlab-token xxxxxxxxx --gitlab-server-url <https://baseurl.com>
Estimate uploaded to organization 'xxx' in Infracost Cloud
Error: The pull request comment was generated successfully but could not be posted:
Error creating comment: 404 Not Found
Wondering if you have an idea whynarrow-refrigerator-50651
04/03/2023, 1:11 PMgifted-journalist-92338
04/04/2023, 5:59 AMazurerm_kubernetes_cluster.k8s
├─ Uptime SLA 730 hours $73.00
└─ default_node_pool
└─ Instance usage (pay as you go, Standard_E8ds_v4) 730 hours $420.48
azurerm_kubernetes_cluster_node_pool.worker
├─ Instance usage (pay as you go, Standard_) 730 hours $0.00
└─ os_disk
└─ Storage (P10, LRS) 1 months $19.71
rapid-salesmen-91626
04/05/2023, 11:43 AMinfracost-usage.yml
without them being erased with the next --sync-usage-file
?
My intention is to write helpful comments for the rest of team why some usage param was chosen how it was chosen. E.g.
azurerm_monitor_action_group.default:
monthly_notifications: 90 # 1 notification per every day per every environment
Now it seems that some comments get persisted (when there was a generic comment on the line generated before), but others get erased. Is there some special comment syntax to instruct the sync functionality to ignore that particular comments and leave them in the file? Or some other way how to achieve what I'm trying to achieve? 🙂faint-oyster-21329
04/07/2023, 5:16 PMterraform.tfstate
file instead of the plan? basically, if a user changes values in the params file and saves, but doesn't deploy, we don't want an updated cost based on the params. we just want to know the estimated cost based on what's listed in the state file 🤞great-market-18788
04/17/2023, 5:23 PMProject Previous New Diff
gitlab/terraform-project/development $369 $0 -$368.80
2. The "Getting Started" configuration on my Infracosts Dashboard is not recognising this pull request, so is stuck on Step 6. Send a test pull request to see the cost estimate
green-carpet-57925
04/18/2023, 8:18 AM