Skip to content

Conversation

@drernie
Copy link
Member

@drernie drernie commented Apr 23, 2025

Description

Companion to https://github.com/quiltdata/deployment/pull/2042
Match id and stack name for Terraform-created resources

  • Added common_tags and stack_dependent_tags in /modules/quilt/locals.tf to standardize tag structure
  • Added comprehensive tag testing framework in /tests directory to verify tag behavior

TODO

  • CHANGELOG entry
  • I promise to deploy to dev stacks (including nightly) soon after PR is merged so we really have these changes tested

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

This PR adds resource tagging functionality across AWS resources for better cost tracking and resource management in Quilt stacks.

  • Added common_tags and stack_dependent_tags in /modules/quilt/locals.tf to standardize tag structure
  • Critical issue: Empty stack_dependent_tags initialization in both /modules/db/main.tf and /modules/search/main.tf prevents proper tag propagation
  • Added comprehensive tag testing framework in /tests directory to verify tag behavior
  • Accidentally committed temporary Terraform files (.terraform.tfstate.lock.info) that should be gitignored
  • Missing CHANGELOG entry for tracking these changes

11 file(s) reviewed, 4 comment(s)
Edit PR Review Bot Settings | Greptile

Comment on lines 1 to 3
locals {
stack_dependent_tags = {}
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logic: Empty tags map will not propagate parent module's stack-dependent tags. Should receive tags as a variable or inherit from parent module.

@drernie drernie marked this pull request as draft April 23, 2025 00:38
@drernie drernie requested a review from Copilot April 23, 2025 01:11
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds cost tags functionality by standardizing tag structure and introducing new tests to verify tagging behavior on AWS resources. Key changes include:

  • Adding common_tags and stack_dependent_tags in the Quilt module for Terraform.
  • Introducing a comprehensive test framework under the /tests directory.
  • Providing documentation in tests/README.md on how to execute the tests.

Reviewed Changes

Copilot reviewed 4 out of 13 changed files in this pull request and generated no comments.

File Description
tests/test.yml Provides a minimal CloudFormation template for testing.
tests/README.md Documents the test prerequisites and steps.
Files not reviewed (9)
  • modules/db/main.tf: Language not supported
  • modules/db/variables.tf: Language not supported
  • modules/quilt/locals.tf: Language not supported
  • modules/quilt/main.tf: Language not supported
  • modules/quilt/outputs.tf: Language not supported
  • modules/search/main.tf: Language not supported
  • modules/search/variables.tf: Language not supported
  • tests/.terraform.lock.hcl: Language not supported
  • tests/test_tags.tf: Language not supported

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants