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

Option create_security_group can't be false currently #216

Open
stefanstaykov opened this issue Nov 1, 2022 · 0 comments
Open

Option create_security_group can't be false currently #216

stefanstaykov opened this issue Nov 1, 2022 · 0 comments
Labels
bug 🐛 An issue with the system

Comments

@stefanstaykov
Copy link

Found a bug? Maybe our Slack Community can help.

Slack Community

Describe the Bug

Setting create_security_group to false will not work as the module currently expects module.aws_security_group.id every time.

Expected Behavior

Setting create_security_group to false and associated_security_group_ids to a list of string should associate the eb environment with the selected security groups but it fails because module.aws_security_group.id can't be null.

Steps to Reproduce

Steps to reproduce the behavior:
Set:
create_security_group = false
associated_security_group_ids = ['some-string']
Run:
terraform plan

Screenshots

Error: Error in function call

│ on .terraform/modules/elastic_beanstalk_environment/main.tf line 645, in resource "aws_elastic_beanstalk_environment" "default":
│ 645: value = join(",", compact(sort(concat([module.aws_security_group.id], var.associated_security_group_ids))))
│ ├────────────────
│ │ while calling sort(list)
│ │ module.aws_security_group.id is null
│ │ var.associated_security_group_ids is list of string with 1 element

│ Call to function "sort" failed: given list element 0 is null; a null string cannot be sorted.

Environment (please complete the following information):

Anything that will help us triage the bug will help. Here are some ideas:

  • OS: OSX
  • Version 12.6
  • cloudposse/elastic-beanstalk-environment/aws - version 0.47.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 An issue with the system
Projects
None yet
Development

No branches or pull requests

1 participant