Skip to content

Refactor SC tagging to ensure consistent tags on all resources (AWS + GCP) and auto-apply on existing resources #154

@Cre-eD

Description

@Cre-eD

Description

We need to refactor how tags (AWS) / labels (GCP) are handled in SC.

Currently, tagging is not consistently applied to all resources, which limits our ability to use cost allocation and Cost Explorer features effectively.

We need a unified and reliable tagging strategy that:

  1. Applies required tags to all supported resources during creation.
  2. Automatically adds missing tags to existing resources on subsequent runs, without causing errors or breaking changes.
  3. Works consistently across AWS (tags) and GCP (labels).

Required Tags / Labels

The following metadata must be applied to all applicable resources:

  • parent_stack_name
  • client_stack_name
  • env_name

Naming convention can follow existing SC standards (snake_case or existing convention).


Requirements

1. Tagging During Resource Creation

  • All SC-managed resources must include the required tags at creation time.
  • Applies to all supported AWS resource types.
  • Applies to all supported GCP resource types (via labels).

2. Tag Backfill for Existing Resources

  • On a new SC run:

    • If a managed resource is missing required tags/labels,
    • SC should add them automatically,
    • Without recreating the resource,
    • Without producing errors or destructive changes.

This should be idempotent and safe.

3. Cross-Cloud Consistency

  • AWS → use tags
  • GCP → use labels
  • Logical structure and naming must remain consistent between clouds.

Motivation

  • Enable proper use of AWS Cost Explorer and cost allocation reporting.

  • Enable similar cost analysis capabilities in GCP.

  • Ensure consistent cost visibility by:

    • Parent stack
    • Client stack
    • Environment
  • Reduce manual tagging and human error.

  • Improve governance and FinOps practices.


Acceptance Criteria

  • All newly created SC resources contain required tags/labels.
  • Running SC on existing stacks automatically applies missing tags.
  • No resource recreation is triggered solely due to missing tags.
  • Behavior is consistent across AWS and GCP.
  • Cost Explorer / billing reports can filter by required tags.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureTriggers Simple Forge's Product Manager role to start working on the issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions