Skip to content

More Info regarding AWS cloud cost integration using Terraform #192

Open

Description

@prasoon-pxc

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:

  • IAM-roles
  • Policies
  • Athena Query
  • S3-bucket

with terraform

Activity

  1. mattray commented on Jan 11, 2024

    @mattray
    Contributor

    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

  2. prasoon-pxc commented on Jan 12, 2024

    @prasoon-pxc
    Author

    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

  3. mattray commented on Jan 15, 2024

    @mattray
    Contributor

    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

  4. vishnu-anil commented on Feb 2, 2024

    @vishnu-anil

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

  5. vishnu-anil commented on Feb 2, 2024

    @vishnu-anil

    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

  6. vishnu-anil commented on Feb 2, 2024

    @vishnu-anil

    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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions