XgridInc / xc3

XC3 is a cloud agnostic and risk free package offering powered by Cloud Custodian that provides resource inventory, tagging compliance, unused or invalid resources cleanup, account maintenance, cost control, backups, monitoring and alerting.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Implement Federated IAM User-Based Cost Feature in XC3

muhammad-irfan-xgrid opened this issue · comments

User Stories:

As a DevOps engineer, I want to implement a feature to get resources by Federated IAM users in the organization, allowing users to see resource costs associated with each Federated IAM user and notify users thorugh slack/email if tags are missing in resources. 

What We Want:

Currently, XC3 displays costs by IAM user, but we now aim to expand this functionality to show costs for each Federated IAM user in the organization. This entails retrieving a list of all Federated IAM users, identifying resources provisioned by each user, checking proper resource tagging, calculating costs, and displaying them in Grafana. In cases of improper tagging, Slack or email notifications should be sent.

Acceptance Criteria:

  • Retrieve Federated IAM user information:
    Implement functionality to fetch a list of all Federated IAM users within the organization.
    Ensure the retrieval process is efficient and scalable for large organizations.
    Obtain resources provisioned by each Federated IAM user:

  • Develop logic to identify resources provisioned by each Federated IAM user.
    Ensure accurate identification of resources, considering all types and configurations.
    Verify resource tagging:
    Check if resources provisioned by Federated IAM users are properly tagged for cost allocation.
    Implement mechanisms to handle cases where resources are not tagged correctly.

  • Calculate and display cost breakdown:
    Integrate with cost calculation mechanisms to accurately compute the cost associated with resources provisioned by each Federated IAM user.
    Display the cost breakdown in a clear and understandable format within Grafana or a similar dashboard tool.

  • Notification for untagged resources:
    Implement functionality to send Slack or email notifications when resources provisioned by Federated IAM users are not properly tagged for cost allocation.
    Include relevant details in the notification to facilitate corrective actions by users or administrators.

  • Design Solution and Infrastructure Diagram:
    Design a scalable and efficient solution for retrieving Federated IAM user information and resource cost.
    Create an infrastructure diagram outlining the components and their interactions within the system.

  • Testing and debugging:
    Conduct thorough testing to ensure the feature functions correctly under various scenarios and conditions.
    Address any bugs or issues identified during testing to ensure reliable performance.

  • Documentation and knowledge sharing:
    Create comprehensive documentation explaining the functionality and usage of the Federated IAM User-Based Cost Breakdown feature.
    Share knowledge about the feature with relevant stakeholders to promote understanding and adoption.
    Review and acceptance:

  • Collaborate with team members, to review the implemented feature.
    Incorporate feedback and make necessary adjustments to ensure the feature meets requirements and expectations before considering it complete.
    By addressing these criteria, we can successfully implement the Federated IAM User-Based Cost Breakdown feature in XC3, enhancing visibility and accountability for resource expenses associated with Federated IAM users.