resource-tagging
Apply and enforce cloud resource tagging strategies across AWS, Azure, GCP, and Kubernetes for cost allocation, ownership tracking, compliance, and automation. Use when implementing cloud governance, optimizing costs, or automating infrastructure management.
What this skill does
# Resource Tagging Apply comprehensive cloud resource tagging strategies to enable cost allocation, ownership tracking, compliance enforcement, and infrastructure automation across multi-cloud environments. ## Purpose Resource tagging provides the foundational metadata layer for cloud governance. Tags enable precise cost allocation (reducing unallocated spend by up to 80%), rapid ownership identification, compliance scope definition, and automated lifecycle management. Without proper tagging, cloud costs become untrackable, security incidents lack context, and automation policies fail to target resources effectively. ## When to Use Use resource tagging when: - Implementing cloud governance frameworks for cost allocation and accountability - Building FinOps practices requiring spend visibility by team, project, or department - Enforcing compliance requirements (PCI, HIPAA, SOC2) through automated policies - Setting up automated resource lifecycle management (backup, monitoring, shutdown) - Managing multi-tenant or multi-project cloud environments - Implementing disaster recovery and backup policies based on criticality - Tracking resource ownership for security incident response - Optimizing cloud costs through spend analysis and showback/chargeback ## Minimum Viable Tagging Strategy Start with the **"Big Six"** required tags for all cloud resources: | Tag | Purpose | Example Value | |-----|---------|---------------| | **Name** | Human-readable identifier | `prod-api-server-01` | | **Environment** | Lifecycle stage | `prod` \| `staging` \| `dev` | | **Owner** | Responsible team contact | `[email protected]` | | **CostCenter** | Finance code for billing | `CC-1234` | | **Project** | Business initiative | `ecommerce-platform` | | **ManagedBy** | Resource creation method | `terraform` \| `pulumi` \| `manual` | **Optional tags** to add based on specific needs: - **Application**: Multi-app projects requiring app-level isolation - **Component**: Resource role (`web`, `api`, `database`, `cache`) - **Backup**: Backup policy (`daily`, `weekly`, `none`) - **Compliance**: Regulatory scope (`PCI`, `HIPAA`, `SOC2`) - **SLA**: Service level (`critical`, `high`, `medium`, `low`) ## Tag Naming Conventions Choose ONE naming convention organization-wide and enforce consistently: | Convention | Format | Example | Best For | |------------|--------|---------|----------| | **PascalCase** | `CostCenter`, `ProjectName` | AWS standard | AWS-first orgs | | **lowercase** | `costcenter`, `project` | GCP labels (required) | GCP-first orgs | | **kebab-case** | `cost-center`, `project-name` | Azure (case-insensitive) | Azure-first orgs | | **Namespaced** | `company:environment`, `team:owner` | Multi-org tag policies | Large enterprises | **Critical:** Case sensitivity varies by provider: - **AWS**: Case-sensitive (`Environment` ≠ `environment`) - **Azure**: Case-insensitive (`Environment` = `environment`) - **GCP**: Lowercase required (`environment` only) - **Kubernetes**: Case-sensitive (`environment` ≠ `Environment`) ## Tag Categories For detailed taxonomy of all tag categories, see `references/tag-taxonomy.md`. ### Technical Tags Operations-focused metadata: Name, Environment, Version, ManagedBy ### Business Tags Cost allocation metadata: Owner, CostCenter, Project, Department ### Security Tags Compliance metadata: Confidentiality, Compliance, DataClassification, SecurityZone ### Automation Tags Lifecycle metadata: Backup, Monitoring, Schedule, AutoShutdown ### Operational Tags Support metadata: SLA, ChangeManagement, CreatedBy, CreatedDate ### Custom Tags Organization-specific metadata: Customer, Application, Component, Stack ## Cloud Provider Tag Limits | Provider | Tag Limit | Key Length | Value Length | Case Sensitive | Inheritance | |----------|-----------|------------|--------------|----------------|-------------| | **AWS** | 50 user-defined | 128 chars | 256 chars | Yes | Via tag policies | | **Azure** | 50 pairs | 512 chars | 256 chars | No | Via Azure Policy | | **GCP** | 64 labels | 63 chars | 63 chars | No | Via org policies | | **Kubernetes** | Unlimited | 253 prefix + 63 name | 63 chars | Yes | Via namespace | ## Tag Enforcement Patterns ### Infrastructure as Code (Recommended) Apply tags automatically via Terraform/Pulumi to reduce manual errors by 95%: ```hcl # Terraform: Provider-level default tags provider "aws" { default_tags { tags = { Environment = var.environment Owner = var.owner CostCenter = var.cost_center Project = var.project ManagedBy = "terraform" } } } ``` All resources automatically inherit these tags. Resource-specific tags merge with defaults. For complete Terraform, Pulumi, and CloudFormation examples, see `examples/terraform/`, `examples/pulumi/`, and `examples/cloudformation/`. ### Policy-Based Enforcement Enforce tagging at resource creation time: **AWS**: Use AWS Config rules to check tag compliance (alert or deny) **Azure**: Use Azure Policy for tag inheritance and enforcement **GCP**: Use Organization Policies to restrict label values **Kubernetes**: Use OPA Gatekeeper or Kyverno for admission control For enforcement implementation patterns, see `references/enforcement-patterns.md`. ### Tag Compliance Auditing Run regular audits (weekly recommended) to identify untagged resources: **AWS Config Query** (SQL): ```sql SELECT resourceId, resourceType, configuration.tags WHERE resourceType IN ('AWS::EC2::Instance', 'AWS::RDS::DBInstance') AND (configuration.tags IS NULL OR NOT configuration.tags.Environment EXISTS) ``` **Azure Resource Graph Query** (KQL): ```kusto Resources | where type in~ ('microsoft.compute/virtualmachines') | where isnull(tags.Environment) or isnull(tags.Owner) | project name, type, resourceGroup, tags ``` **GCP Cloud Asset Inventory**: ```bash gcloud asset search-all-resources \ --query="NOT labels:environment OR NOT labels:owner" \ --format="table(name,assetType,labels)" ``` For complete audit queries and scripts, see `references/compliance-auditing.md` and `scripts/audit_tags.py`. ## Cost Allocation with Tags Enable cost allocation tags to track spending by team, project, or department: ### AWS Cost Explorer Activate cost allocation tags (up to 24 hours for activation): ```hcl # Enable cost allocation tags via Terraform resource "aws_ce_cost_allocation_tag" "environment" { tag_key = "Environment" status = "Active" } resource "aws_ce_cost_allocation_tag" "project" { tag_key = "Project" status = "Active" } ``` Set up cost anomaly detection by tag to catch unusual spending: ```hcl resource "aws_ce_anomaly_monitor" "project_monitor" { name = "project-cost-monitor" monitor_type = "DIMENSIONAL" monitor_specification = jsonencode({ Tags = { Key = "Project" Values = ["ecommerce", "mobile-app"] } }) } ``` ### Azure Cost Management Group costs by tags in Azure Cost Management dashboards. Export cost data with tag breakdowns: ```bash az consumption usage list \ --start-date 2025-12-01 \ --query "[].{Cost:pretaxCost, Project:tags.Project, Team:tags.Owner}" ``` ### GCP Cloud Billing Export billing data to BigQuery with label breakdowns: ```sql SELECT labels.key AS label_key, labels.value AS label_value, SUM(cost) AS total_cost FROM `project.dataset.gcp_billing_export_v1_XXXXX` CROSS JOIN UNNEST(labels) AS labels WHERE labels.key IN ('environment', 'project', 'costcenter') GROUP BY label_key, label_value ORDER BY total_cost DESC ``` For cost allocation implementation details, see `references/cost-allocation.md`. ## Decision Framework: Required vs. Optional Tags Determine which tags to enforce at creation time: **REQUIRED (enforce with hard deny)**: - Cost allocation: Owner, CostCenter, Project - Lifecycle: Environment, ManagedBy - Identification: Name **RECOMMENDED (soft enforcement - alert only)**: - Operational: Backup, Monitoring, Schedule - S
Related in Cloud & DevOps
appbuilder-action-scaffolder
IncludedCreate, implement, deploy, and debug Adobe Runtime actions with consistent layout, validation, and error handling. Use this skill whenever the user needs to add actions to an App Builder project, understand action structure (params, response format, web/raw actions), configure actions in the manifest, use App Builder SDKs (State, Files, Events, database), deploy and invoke actions via CLI, debug action issues, or implement patterns such as webhook receivers, custom event providers, journaling consumers, large payload redirects, action sequence pipelines, and Asset Compute workers. Also trigger when users mention serverless functions in Adobe context, action logging, IMS authentication for actions, or cron-style scheduled actions.
orchestrating-datacloud
IncludedSalesforce Data Cloud product orchestrator for connect→prepare→harmonize→segment→act workflows. Use this skill when the user needs a multi-step Data Cloud pipeline, cross-phase troubleshooting, or data space and data kit management. TRIGGER when: user needs a multi-step Data Cloud pipeline, asks to set up or troubleshoot Data Cloud across phases, manages data spaces or data kits, or wants a cross-phase sf data360 workflow. DO NOT TRIGGER when: work is isolated to a single phase (use the matching phase-specific skill), the task is STDM/session tracing/parquet telemetry (use observing-agentforce), standard CRM SOQL (use querying-soql), or Apex implementation (use generating-apex).
github-project-automation
IncludedAutomate GitHub repository setup with CI/CD workflows, issue templates, Dependabot, and CodeQL security scanning. Includes 12 production-tested workflows and prevents 18 errors: YAML syntax, action pinning, and configuration. Use when: setting up GitHub Actions CI/CD, creating issue/PR templates, enabling Dependabot or CodeQL scanning, deploying to Cloudflare Workers, implementing matrix testing, or troubleshooting YAML indentation, action version pinning, secrets syntax, runner versions, or CodeQL configuration. Keywords: github actions, github workflow, ci/cd, issue templates, pull request templates, dependabot, codeql, security scanning, yaml syntax, github automation, repository setup, workflow templates, github actions matrix, secrets management, branch protection, codeowners, github projects, continuous integration, continuous deployment, workflow syntax error, action version pinning, runner version, github context, yaml indentation error
sf-datacloud
IncludedSalesforce Data Cloud product orchestrator for connect→prepare→harmonize→segment→act workflows. TRIGGER when: user needs a multi-step Data Cloud pipeline, asks to set up or troubleshoot Data Cloud across phases, manages data spaces or data kits, or wants a cross-phase `sf data360` workflow. DO NOT TRIGGER when: work is isolated to a single phase (use the matching sf-datacloud-* skill), the task is STDM/session tracing/parquet telemetry (use sf-ai-agentforce-observability), standard CRM SOQL (use sf-soql), or Apex implementation (use sf-apex).
fabric-cli
IncludedUse this skill for Fabric.so CLI workflows with the `fabric` terminal command: diagnose/install/login, search or browse a Fabric library, save notes/links/files, create folders, ask the Fabric AI assistant, manage tasks/workspaces, generate shell completion, check subscription usage, produce JSON output, and use Fabric as persistent agent memory. Do not use for Microsoft Fabric/Azure/Power BI `fab`, Daniel Miessler's Fabric framework, Python Fabric SSH, Fabric.js, or textile/fashion fabric.
lark
IncludedLark/Feishu CLI skills: lark-cli operations for docs, markdown, sheets, base, calendar, im, mail, task, okr, drive, wiki, slides, whiteboard, apps, approval, attendance, contact, vc, minutes, event. Use when the user needs to operate Lark/Feishu resources via lark-cli, send messages, manage documents, spreadsheets, calendars, tasks, OKRs, deploy web pages, or any Feishu/Lark workspace operations.