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

Plan fails when enabled set to false #45

Closed
januaryjon opened this issue Apr 20, 2022 · 2 comments
Closed

Plan fails when enabled set to false #45

januaryjon opened this issue Apr 20, 2022 · 2 comments

Comments

@januaryjon
Copy link

januaryjon commented Apr 20, 2022

Describe the Bug

When using this module in an workspace, but setting the enabled flag to false, running a terraform plan for the workspace will result in the following error:

Error: Invalid function argument

on .terraform/modules/memcached_setting_apigw/outputs.tf line 12, in output "security_group_arn":
12:   value       = join("", module.aws_security_group.*.arn)
  module.aws_security_group is object with 4 attributes

Invalid value for "lists" parameter: element 0 is null; cannot concatenate
null values.

Expected Behavior

Terraform plan should run successfully without creating any resources

Steps to Reproduce

Steps to reproduce the behavior:

  1. Create an new terraform workspace with aws provider
  2. Add this module to the workspace, use one of the following methods for security group configuration:
    • allowed_cidr_blocks
    • allowed_ipv6_cidr_blocks
    • allowed_ipv6_prefix_list_ids
    • allowed_security_groups
  3. Disable this module (set enabled=false for this module)

Environment

  • Terraform version: v1.1.8
  • AWS provider: v4.8.0
@z0rc
Copy link

z0rc commented May 6, 2022

Same issue when create_security_group = false.

@dmytrozhivotovsky
Copy link

I think I found a way to fix it:
e1f9f29

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

No branches or pull requests

3 participants