Skip to content

Conversation

@jwadolowski
Copy link
Contributor

what

Allow the user to define a list of Docker labels without providing the entire ECS task definition.

why

Some discovery mechanisms rely on dockerLabels (e.g., "find all containers with label FOO=bar"). The module already uses cloudposse/ecs-container-definition/aws (referenced by cloudposse/ecs-alb-service-task/aws later on to put together a complete ECS task definition) which allows for Docker label configuration, but until now the parameter was not exposed as a variable.

references

Allow the user to define a list of Docker labels without providing the
entire task definition.
@jwadolowski jwadolowski requested review from a team as code owners August 27, 2025 15:22
@jwadolowski jwadolowski requested review from gberenice and oycyc August 27, 2025 15:22
@coderabbitai
Copy link

coderabbitai bot commented Aug 27, 2025

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbit review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

📝 Walkthrough

Walkthrough

Added Atmos ignore entry to .gitignore. Introduced a new Terraform variable docker_labels and passed it to the container_definition module in main.tf.

Changes

Cohort / File(s) Summary
Ignore rules
\.gitignore
Appended Atmos section with comment and .atmos pattern.
Terraform inputs and wiring
main.tf, variables.tf
Declared variable "docker_labels" as map(string) with default null; passed docker_labels = var.docker_labels to module "container_definition".

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbit in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbit in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbit gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbit read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbit help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbit ignore or @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbit summary or @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbit or @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@mergify mergify bot added the triage Needs triage label Aug 27, 2025
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
variables.tf (1)

99-104: New variable docker_labels — LGTM; remember docs.

Backward-compatible default and type look right. Please also update README/Inputs table and an example showing label usage.

I can open a docs PR snippet if you want.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between f22aa23 and 4ae9351.

⛔ Files ignored due to path filters (1)
  • README.md is excluded by !README.md
📒 Files selected for processing (3)
  • .gitignore (1 hunks)
  • main.tf (1 hunks)
  • variables.tf (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Summary
🔇 Additional comments (2)
.gitignore (1)

15-17: Add Atmos ignore — LGTM.

Good call excluding local Atmos state from the repo.

main.tf (1)

84-84: Verify docker_labels input support in upstream module
Please confirm that the pinned version of the upstream module (cloudposse/ecs-container-definition/aws v0.58.1) declares a docker_labels variable of type map(string) and forwards it to the ECS container definition’s dockerLabels attribute. If you find that this variable is not present or not wired through:

  • Open the module’s variables.tf (or equivalent) for v0.58.1 and look for a block similar to:
    variable "docker_labels" {
      type        = map(string)
      description = "Labels to apply to the container"
      default     = {}
    }
  • In the module’s main.tf, verify that docker_labels is passed into the container definition resource, e.g.:
    docker_labels = var.docker_labels
  • If the input is missing or unsupported, bump the module version to the earliest release that adds docker_labels support (check the CHANGELOG or GitHub releases).

This will prevent potential “argument not expected” errors when Terraform validates your configuration.

@RoseSecurity
Copy link
Contributor

/terratest

oycyc
oycyc previously approved these changes Aug 28, 2025
@mergify mergify bot removed the triage Needs triage label Aug 28, 2025
@oycyc
Copy link

oycyc commented Aug 28, 2025

Posted in Slack as well:
ah I see the error
Error: Unsupported argument
on .terraform/modules/subnets/main.tf line 286, in resource "aws_eip" "default":
286: vpc = true

An argument named "vpc" is not expected here.
AWS provider v6 deprecated vpc = true for the AWS EIP resource. Can you update the dynamic subnet module references in the /examples/ to use the latest version https://github.com/cloudposse/terraform-aws-dynamic-subnets/releases?

…ersion

AWS provider v6 deprecated `vpc = true` for the EIP resource
@mergify mergify bot added the triage Needs triage label Aug 28, 2025
@RoseSecurity
Copy link
Contributor

/terratest

1. Bucket names now include a timestamp (10 digits) to ensure they're
always unique (previously it was a random number between 0 and 999,
which increased the risk of a name collision)
2. `rand.Seed` is deprecated, so it was removed. As of Go 1.20, there is
no reason to call Seed with a random value
@RoseSecurity
Copy link
Contributor

/terratest

@RoseSecurity RoseSecurity enabled auto-merge (squash) August 28, 2025 14:28
@mergify mergify bot removed the triage Needs triage label Aug 28, 2025
@RoseSecurity RoseSecurity merged commit c71d0a6 into cloudposse:main Aug 28, 2025
33 checks passed
@github-actions
Copy link
Contributor

These changes were released in v2.4.2.

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.

3 participants