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

Open
wants to merge 1 commit into
base: master
Choose a base branch
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant