Skip to content
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

fix: TFlint warnings #328

Closed
wants to merge 1 commit into from

Conversation

foxdalas
Copy link

@foxdalas foxdalas commented Sep 9, 2024

Description

I have addressed the TFLint warnings by making the necessary adjustments to the code.

Motivation and Context

These changes resolve TFLint warnings related to the use of deprecated index access for list items and an unused variable declaration.

Warning: [Fixable] List items should be accessed using square brackets (terraform_deprecated_index)

  on main.tf line 5:
   5:   this_sg_id = var.create_sg ? concat(aws_security_group.this.*.id, aws_security_group.this_name_prefix.*.id, [""])[0] : var.security_group_id

Reference: https://github.com/terraform-linters/tflint-ruleset-terraform/blob/v0.5.0/docs/rules/terraform_deprecated_index.md

Warning: [Fixable] List items should be accessed using square brackets (terraform_deprecated_index)

  on main.tf line 5:
   5:   this_sg_id = var.create_sg ? concat(aws_security_group.this.*.id, aws_security_group.this_name_prefix.*.id, [""])[0] : var.security_group_id

Reference: https://github.com/terraform-linters/tflint-ruleset-terraform/blob/v0.5.0/docs/rules/terraform_deprecated_index.md

Warning: [Fixable] variable "auto_groups" is declared but not used (terraform_unused_declarations)

  on rules.tf line 192:
 192: variable "auto_groups" {

Reference: https://github.com/terraform-linters/tflint-ruleset-terraform/blob/v0.5.0/docs/rules/terraform_unused_declarations.md

Breaking Changes

How Has This Been Tested?

  • I have updated at least one of the examples/* to demonstrate and validate my change(s)
  • I have tested and validated these changes using one or more of the provided examples/* projects
  • I have executed pre-commit run -a on my pull request

@foxdalas foxdalas changed the title fix: tflint warnings fix: TFlint warnings Sep 9, 2024
@foxdalas
Copy link
Author

@bryantbiggs @antonbabenko
One of you can watch this PR. Thank you

Copy link

This PR has been automatically marked as stale because it has been open 30 days
with no activity. Remove stale label or comment or this PR will be closed in 10 days

@github-actions github-actions bot added the stale label Oct 11, 2024
Copy link

This PR was automatically closed because of stale in 10 days

@github-actions github-actions bot closed this Oct 21, 2024
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant