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

create variable leads to module failing if set to false #193

Open
schealex opened this issue Sep 5, 2024 · 1 comment
Open

create variable leads to module failing if set to false #193

schealex opened this issue Sep 5, 2024 · 1 comment
Labels
bug 🐛 An issue with the system

Comments

@schealex
Copy link

schealex commented Sep 5, 2024

Describe the Bug

If you use the module and pass the variable create with the value false you get a lot of errors regarding the coalesce function used inside the module: Call to function "coalesce" failed: no non-null, non-empty-string arguments which breaks the module completely

Expected Behavior

Setting create to false should allow terraform to succeed and just not create the module (or even remove it if it had been created before)

Steps to Reproduce

Setup the module and pass create with the value false

Screenshots


│ Error: Error in function call

│ on .terraform/modules/tds_opensearch_public.elasticsearch/main.tf line 7, in locals:
│ 7: aws_service_domain_arn = coalesce(join("", aws_elasticsearch_domain.default[].arn), join("", aws_opensearch_domain.default[].arn))
│ ├────────────────
│ │ while calling coalesce(vals...)
│ │ aws_elasticsearch_domain.default is empty tuple
│ │ aws_opensearch_domain.default is empty tuple

│ Call to function "coalesce" failed: no non-null, non-empty-string
│ arguments.


│ Error: Error in function call

│ on .terraform/modules/tds_opensearch_public.elasticsearch/main.tf line 8, in locals:
│ 8: aws_service_domain_endpoint = coalesce(join("", aws_elasticsearch_domain.default[].endpoint), join("", aws_opensearch_domain.default[].endpoint))
│ ├────────────────
│ │ while calling coalesce(vals...)
│ │ aws_elasticsearch_domain.default is empty tuple
│ │ aws_opensearch_domain.default is empty tuple

│ Call to function "coalesce" failed: no non-null, non-empty-string
│ arguments.


│ Error: Error in function call

│ on .terraform/modules/tds_opensearch_public.elasticsearch/main.tf line 9, in locals:
│ 9: aws_service_domain_id = coalesce(join("", aws_elasticsearch_domain.default[].domain_id), join("", aws_opensearch_domain.default[].domain_id))
│ ├────────────────
│ │ while calling coalesce(vals...)
│ │ aws_elasticsearch_domain.default is empty tuple
│ │ aws_opensearch_domain.default is empty tuple

│ Call to function "coalesce" failed: no non-null, non-empty-string
│ arguments.


│ Error: Error in function call

│ on .terraform/modules/tds_opensearch_public.elasticsearch/main.tf line 10, in locals:
│ 10: aws_service_domain_name = coalesce(join("", aws_elasticsearch_domain.default[].domain_name), join("", aws_opensearch_domain.default[].domain_name))
│ ├────────────────
│ │ while calling coalesce(vals...)
│ │ aws_elasticsearch_domain.default is empty tuple
│ │ aws_opensearch_domain.default is empty tuple

│ Call to function "coalesce" failed: no non-null, non-empty-string
│ arguments.


│ Error: Error in function call

│ on .terraform/modules/tds_opensearch_public.elasticsearch/main.tf line 11, in locals:
│ 11: aws_service_domain_kibana_endpoint = coalesce(join("", aws_elasticsearch_domain.default[].kibana_endpoint), join("", aws_opensearch_domain.default[].kibana_endpoint))
│ ├────────────────
│ │ while calling coalesce(vals...)
│ │ aws_elasticsearch_domain.default is empty tuple
│ │ aws_opensearch_domain.default is empty tuple

│ Call to function "coalesce" failed: no non-null, non-empty-string
│ arguments.

Environment

No response

Additional Context

No response

@schealex schealex added the bug 🐛 An issue with the system label Sep 5, 2024
@schealex
Copy link
Author

@maximmi @osterman sorry for tagging but this is currently completly preventing us from using this module. Any suggestions or advice regarding this?

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