binbashar / le-tf-infra-aws

Terraform code for Leverage Reference Architecture for AWS, designed under optimal configs for the most popular modern web and mobile applications needs.
https://www.binbash.co/leverage
Apache License 2.0
26 stars 8 forks source link

Feature |  Add a Tag to Resources Indicating the Layer #518

Open exequielrafaela opened 1 year ago

exequielrafaela commented 1 year ago

Describe the Feature

Expected Behavior

Once implemented, each resource should have a tag indicating the layer. This should aid in tracking the code that created the implementation.

Use Case

This feature is valuable for improving code traceability and documentation. It will provide a direct link between resources and the layer that created them, making it easier to understand and manage the codebase.

Describe Ideal Solution

The ideal solution would involve adding a tag to each resource during its creation, indicating the layer. The tag should be easily visible and accessible for reference. Consideration should be given to whether the tag can be obtained through a function or similar method to avoid the hardcoded example below.

locals {
  tags = {
    Terraform   = "true"
    Environment = var.environment
    Layer = "base-dns/binbash.co"
  }
}

Alternatives Considered

An alternative could be to continue without these tags, relying on developers to remember or find the relevant layer for each resource. However, this could lead to inefficiencies and potential errors.

Additional Context

This feature request arose from a discussion about improving code traceability and documentation. The addition of a layer tag to each resource was suggested as a potential solution.