opencost / opencost-website

OpenCost website, blog, documentation.
https://opencost.io
Apache License 2.0
14 stars 51 forks source link

More Info regarding AWS cloud cost integration using Terraform #192

Open prasoon-pxc opened 11 months ago

prasoon-pxc commented 11 months ago

I want to integrate AWS-cloud cost to opencost but could not able to find out enough documentation about how we can create different stuff like:

with terraform

mattray commented 10 months ago

The OpenCost Helm chart doesn't do anything related to IAM, Athena or S3. Is the documentation here insufficient? https://www.opencost.io/docs/configuration/aws

prasoon-pxc commented 10 months ago

In this section, it is mentioned to use CUR report and Athena database which uses AWS Glue behind the scene, but it is not mentioned here how we can create all that resources which is compatible with opencost currently we need to refer kube-cost doc for all these things

mattray commented 10 months ago

I'm going to move this over to https://github.com/opencost/opencost-website and try to give the docs a walk-through to recreate

vishnu-anil commented 10 months ago

Same here. Doc talks about some Cloudformation template to create the dependent resources but cannot find it anywhere.

vishnu-anil commented 10 months ago

The OpenCost Helm chart doesn't do anything related to IAM, Athena or S3. Is the documentation here insufficient? https://www.opencost.io/docs/configuration/aws

yes its insufficient. What table/columns etc required for athena is not specified anywhere

vishnu-anil commented 10 months ago

Anyone looking for this, I was able to create required table and columns using below steps

CREATE EXTERNAL TABLE IF NOT EXISTS opencost(
  year VARCHAR(4), month VARCHAR(2), date VARCHAR(2), line_item_usage_start_date DATE, line_item_line_item_type STRING, line_item_resource_id STRING, bill_payer_account_id STRING, line_item_usage_account_id STRING, line_item_product_code STRING, line_item_usage_type STRING, line_item_unblended_cost DOUBLE)
LOCATION 's3://yourbucket/'

opencost is the table name I refer inside the json secret in kubernetes