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

Add security group name and description #80

Conversation

miguelaferreira
Copy link
Contributor

Description

This PR adds name (tag) and description attributes to the security group and its rules.

In addition, to prevent errors when (for example) importing resources with this module present in the configuration, this PR also replaces the hard-coded access to index 0 of conditional resources by a call to join function using the splat notation.

An example of the error I was getting while importing resources form other modules, while having this module in my terraform config:

Error: Invalid index

  on ../../modules/aws-rds-aurora/main.tf line 4, in locals:
   4:   db_subnet_group_name = var.db_subnet_group_name == "" ? aws_db_subnet_group.this[0].name : var.db_subnet_group_name
    |----------------
    | aws_db_subnet_group.this is empty tuple

... to prevent errors like

Error: Invalid index

  on ../../modules/aws-rds-aurora/main.tf line 4, in locals:
   4:   db_subnet_group_name = var.db_subnet_group_name == "" ?
aws_db_subnet_group.this[0].name : var.db_subnet_group_name
    |----------------
    | aws_db_subnet_group.this is empty tuple

when calling import with this module in the configuration.
@antonbabenko antonbabenko merged commit 8b10943 into terraform-aws-modules:master Nov 28, 2019
@antonbabenko
Copy link
Member

Thanks, Miguel!

v2.10.0 has been just released.

@github-actions
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 Apr 15, 2023
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.

2 participants