Skip to content

fix: Remove unused variables regarding listener ARNs count #292

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

adamantike
Copy link
Contributor

what

The following variables have been removed from upstream module cloudposse/alb-ingress/aws, and stopped being used since v0.58.0 [1]:

  • alb_ingress_unauthenticated_listener_arns_count
  • alb_ingress_authenticated_listener_arns_count

references

[1] 20a8d1c

@adamantike adamantike requested review from a team as code owners October 16, 2024 13:43
@mergify mergify bot added the triage Needs triage label Oct 16, 2024
Copy link

mergify bot commented May 29, 2025

💥 This pull request now has conflicts. Could you fix it @adamantike? 🙏

@mergify mergify bot added the conflict This PR has conflicts label May 29, 2025
@mergify mergify bot closed this May 29, 2025
Copy link

mergify bot commented May 29, 2025

This PR was closed due to inactivity and merge conflicts. 😭
Please resolve the conflicts and reopen if necessary.

Copy link

coderabbitai bot commented May 29, 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 @coderabbitai review command.

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

📝 Walkthrough

Walkthrough

This change removes the alb_ingress_authenticated_listener_arns_count and alb_ingress_unauthenticated_listener_arns_count variables from the Terraform module, its documentation, and all usage examples. Associated configuration and documentation are updated to reference only the relevant ARN lists, eliminating the need for explicit count parameters.

Changes

Files/Paths Change Summary
variables.tf Removed variables for ALB listener ARN counts.
docs/terraform.md Removed documentation of the two count input variables.
examples/complete/main.tf,
examples/without_authentication/main.tf
Removed usage of unauthenticated listener ARN count; reformatted related input assignments.
examples/with_cognito_authentication/main.tf,
examples/with_google_oidc_authentication/main.tf
Removed usage of authenticated listener ARN count; consolidated ARN assignment.
README.yaml Removed example usage of unauthenticated listener ARN count in configuration snippet.
✨ 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.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai 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:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

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

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai auto-generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @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

Documentation and Community

  • 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 removed conflict This PR has conflicts triage Needs triage labels May 29, 2025
@adamantike
Copy link
Contributor Author

I've seen a more aggresive bot configuration to close unmerged and unreviewed changes lately. Does this mean CloudPosse is slowly reducing maintenance for many of their Terraform modules?

@Gowiem
Copy link
Member

Gowiem commented May 30, 2025

@adamantike I wouldn't say that. From what I know, we are just pushing ourselves to get things merged faster + not sit as long. If we don't then the idea is that it must not be important... which of course, isn't always the case and we expect contributors to speak up like you just did.

That said... I'm not sure why this got closed within a single day of pinging you on merge conflicts. I will bring this up with the Cloud Posse team 👍

Reopening as I know you have contributed multiple times before and I imagine this is likely a good change that we should review. I'll put eyes on it.

@Gowiem Gowiem reopened this May 30, 2025
Copy link

mergify bot commented May 30, 2025

💥 This pull request now has conflicts. Could you fix it @adamantike? 🙏

@mergify mergify bot added conflict This PR has conflicts triage Needs triage labels May 30, 2025
Gowiem
Gowiem previously approved these changes May 30, 2025
Copy link
Member

@Gowiem Gowiem left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@Gowiem
Copy link
Member

Gowiem commented May 30, 2025

@adamantike can you address the merge conflicts and push the result? I'll re-review and we'll get this merged. Thanks!

@mergify mergify bot removed the triage Needs triage label May 30, 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: 2

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5cdf77c and de63d45.

⛔ Files ignored due to path filters (1)
  • README.md is excluded by !README.md
📒 Files selected for processing (7)
  • README.yaml (0 hunks)
  • docs/terraform.md (0 hunks)
  • examples/complete/main.tf (1 hunks)
  • examples/with_cognito_authentication/main.tf (1 hunks)
  • examples/with_google_oidc_authentication/main.tf (1 hunks)
  • examples/without_authentication/main.tf (1 hunks)
  • variables.tf (0 hunks)
💤 Files with no reviewable changes (3)
  • README.yaml
  • variables.tf
  • docs/terraform.md
🧰 Additional context used
📓 Path-based instructions (1)
`examples/complete/*.tf`: This is framework for testing and standards are very relaxed, plus certain things need to be certain ways for testing. Exclude from review unless you find...

examples/complete/*.tf: This is framework for testing and standards are very relaxed, plus certain things need to be certain ways for testing. Exclude from review unless you find misspelling or similar error in comments or serious errors in code.

  • examples/complete/main.tf
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Summary
🔇 Additional comments (2)
examples/complete/main.tf (1)

112-115: Skipping review for example file (complete/main.tf)
This example file follows relaxed standards and no spelling or serious errors were detected in the removed count variable segment.

examples/without_authentication/main.tf (1)

130-130: Configuration update verified
The explicit count variable for unauthenticated listener ARNs has been removed correctly, and the assignment
alb_ingress_unauthenticated_listener_arns = module.alb.listener_arns matches the expected list type returned by the upstream module.

@@ -127,8 +127,7 @@ module "web_app" {
alb_ingress_healthcheck_path = "/"

# NOTE: Cognito and OIDC authentication only supported on HTTPS endpoints; here we provide `https_listener_arn` from ALB
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Wrap single ARN in a list
The variable alb_ingress_authenticated_listener_arns is defined as a list of strings, but here it's assigned a single string (module.alb.https_listener_arn), causing a type mismatch. Wrap the ARN in a list.

Apply this diff:

-  alb_ingress_authenticated_listener_arns = module.alb.https_listener_arn
+  alb_ingress_authenticated_listener_arns = [module.alb.https_listener_arn]
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# NOTE: Cognito and OIDC authentication only supported on HTTPS endpoints; here we provide `https_listener_arn` from ALB
# NOTE: Cognito and OIDC authentication only supported on HTTPS endpoints; here we provide `https_listener_arn` from ALB
alb_ingress_authenticated_listener_arns = [module.alb.https_listener_arn]
🤖 Prompt for AI Agents
In examples/with_google_oidc_authentication/main.tf at line 129, the variable
alb_ingress_authenticated_listener_arns expects a list of strings but is
assigned a single string module.alb.https_listener_arn. Fix this by wrapping
module.alb.https_listener_arn in square brackets to make it a single-element
list.

@@ -126,8 +126,7 @@ module "web_app" {
alb_ingress_healthcheck_path = "/"

# NOTE: Cognito and OIDC authentication only supported on HTTPS endpoints; here we provide `https_listener_arn` from ALB
alb_ingress_authenticated_listener_arns = module.alb.https_listener_arn
alb_ingress_authenticated_listener_arns_count = 1
alb_ingress_authenticated_listener_arns = module.alb.https_listener_arn
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Wrap single ARN in a list
The variable alb_ingress_authenticated_listener_arns expects a list of strings but is being assigned a single string. Wrap it in a list to satisfy the variable type.

Apply this diff:

-  alb_ingress_authenticated_listener_arns = module.alb.https_listener_arn
+  alb_ingress_authenticated_listener_arns = [module.alb.https_listener_arn]
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
alb_ingress_authenticated_listener_arns = module.alb.https_listener_arn
alb_ingress_authenticated_listener_arns = [module.alb.https_listener_arn]
🤖 Prompt for AI Agents
In examples/with_cognito_authentication/main.tf at line 129, the variable
alb_ingress_authenticated_listener_arns expects a list of strings but is
currently assigned a single string. Fix this by wrapping
module.alb.https_listener_arn in square brackets to create a list containing
that single ARN.

The following variables have been removed from upstream module
`cloudposse/alb-ingress/aws`, and stopped being used since `v0.58.0`
[1]:

* `alb_ingress_unauthenticated_listener_arns_count`
* `alb_ingress_authenticated_listener_arns_count`

[1] cloudposse@20a8d1c#diff-dc46acf24afd63ef8c556b77c126ccc6e578bc87e3aa09a931f33d9bf2532fbbR24
@adamantike adamantike force-pushed the fix/remove-unused-variables-listener-arns-count branch from de63d45 to 3a5eae0 Compare July 3, 2025 18:56
@mergify mergify bot added triage Needs triage and removed conflict This PR has conflicts labels Jul 3, 2025
@adamantike
Copy link
Contributor Author

Just rebased!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage Needs triage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants