Cost Savings through Tagging
    • Dark
      Light
    • PDF

    Cost Savings through Tagging

    • Dark
      Light
    • PDF

    Article summary

    #ServerlessTips - Azure Cost Management
    Author: Iryna Tyshchenko Azure MVP

    What is tagging?

    Tagging assigns key-value pairs (tags) to cloud resources for better management and organization. Tags categorize and manage resources like virtual machines, storage, databases, and networking components based on criteria. Tags are flexible, allowing dynamic addition, modification, and removal

    Establish Tagging Standards:

    1. Choose tags purposefully.
    2. Collaborate on standardized tags.
    3. Ensure naming consistency.
    4. Share standards organization-wide.
    5. Tag resources as needed.
      The tags can be assigned in the tags section of the Azure resource. For instance, there are some tags for the storage account in the picture below:
      Cost savings through tagging

    Automate Tagging

    • Utilize automation tools like CloudFormation, Terraform, and others IAC tools for tagging processes.
    • Ensure automation tools align with standard tags, you defined for consistent configuration and application.

    Tagging types:

    1. Business Unit Tags
    Assign tags related to different organizational business units or departments. These tags assist in resource allocation, cost tracking, and accountability within specific units.

    2. Application Name Tags
    Tags specifying an application's name or identifier associated with a resource aid in resource identification and management, enabling easier tracking of resources linked to particular applications or services.

    3. Environment Tags
    Utilize tags indicating the environment of a resource (e.g., development, quality assurance, production) to differentiate resources deployed in various environments, ensuring proper resource isolation and streamlined management.

    4. Project Name Tags
    Assign tags containing project names or identifiers to track and manage resources based on specific projects, facilitating efficient resource allocation and cost tracking for individual projects.

    Other examples of tags:

    • Project: project-a, project-b
    • Business Unit: finance, analytics
    • Service Tier: web, db, cache
    • App: nginx, payment, login, dash
    • Schedule: 24/7, 6-9am UTC
    • Env: dev/qa/prod
    • Backup Retention: 365d, 12m
    • Cost Center: finance, eng, marketing, module-A
    • Expiry: 2024-07-30
    • Owner: team@domain.com
    • Managed By: terraform, cloudformation

    Azure Tagging Best Practices

    • Define standardized tag keys and values.
    • Leverage Azure Resource Graph for querying and filtering resources based on tags.
    • Use Azure Policy to enforce tagging requirements during resource deployments.
    • Utilize Azure Cost Management and Billing for cost tracking and optimization through tags.

    For instance, you can use Azure Cost Analysis to group your resources by custom tags:
    Cost Savings through tagging-2

    Business outcomes

    Scenario:

    Imagine a medium-sized product-selling company that hosts its infrastructure on Azure Cloud Provider. The company has various business departments responsible for different aspects of the project, including analytics, pricing, sales, etc. Without proper tagging, it's hard to allocate costs accurately, control spending, and optimize resources effectively.

    1. Accurate Cost Allocation

    Savings: The company identifies that the DEV environment business department's resources were over-provisioned. By right-sizing these resources, they reduce their monthly Azure bill by 10%.

    2. Budget Management and Control:

    By using tags, the company can set department-specific budgets and receive alerts when spending approaches predefined thresholds.

    Example Savings: By setting and adhering to departmental budgets, the company avoids budget overruns and reduces unplanned spending by 10%.

    3. Resource Optimization:

    The company can right-size or decommission resources based on tags, optimizing performance and reducing costs.

    Example Savings: Through resource optimization, the company reduces VM expenses by 20% by eliminating underutilized instances.

    4. Compliance and Security:

    Tagging resources with compliance requirements and securities helps the company quickly identify non-compliant resources.

    Example Savings: Avoiding compliance fines and security leaks saves the company $10,000 in potential penalties.

    Practice example

    Let's use a tag "ENV" with values "Dev" and "Test.” And for business unit we will use tags analytics and pricing.

    Access Cost Management and Billing

    1. In the Azure Portal, click on "All services" in the left-hand menu.
    2. In the search bar, type "Cost Management + Billing" and select it from the results.

    Navigate to Cost Analysis

    1. In the Cost Management + Billing blade, click on "Cost analysis" under the "Cost Management" section.

    Define Your Scope

    1. In the Cost Analysis interface, you can set the scope for your analysis. To visualize cost allocation by department, you can use tags. Click on the "Scope" button at the top of the page.
    2. Choose the desired scope, such as a specific subscription, resource group, or the entire billing account.

    Apply Tag Filters

    1. Once you've defined the scope, navigate to the "Groups" section. Click on the "Tags" button.
    2. Select the specific tag you want to use for departmental allocation. For example, if you've tagged resources with "Department," select that tag.

    Cost Savings through tagging-3

    Visualize the Data

    1. After applying the tag filter, the Cost Analysis page will update to display cost data based on the selected tag. You can see cost breakdowns by department, project, or any other tag you've applied.
    2. You can further refine the visualization by adjusting the date range, grouping by specific criteria, and customizing the view to suit your needs.

    By using this Azure feature, we can now identify which business unit consumes how much cost. By investigating further by environment tags, the company can further investigate resources that result in a high cost and contact the specific team (let's say business unit to reduce the cost or clarify if this cost is reasonable).
    Cost Savings through tagging-4

    Export or Save the Visualization

    1. If you need to share or save the visualization, you can use the export options available in Cost Analysis. Click on the "Export" button to save the data or create custom reports.

    Analyze and Take Action

    1. With the visualized cost data, you can analyze the allocation of costs by department. Identify areas where costs can be optimized or where budget adjustments are needed.

    It is common that some resources are overprovisioned. Let's say the customer expects free tier VM on the test environment, but the machines with basic pricing were used due to a mistake in the deployment script. The customer will be charged way more than expected, therefore it is necessary to analyze the resources as early as possible.

    To sum up, creating and tagging cheap resources in Azure for analysis can help you optimize Azure costs effectively. By using Azure Cost Management and Billing, you can visualize and analyze your organization's cost allocation by department or any other relevant criteria, enabling informed decision-making and cost-saving actions.

    MicrosoftTeams-image 491


    Was this article helpful?

    ESC

    Eddy AI, facilitating knowledge discovery through conversational intelligence