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

data source returns empty tuple when module is disabled #30

Open
brian-skafte opened this issue Aug 29, 2022 · 1 comment
Open

data source returns empty tuple when module is disabled #30

brian-skafte opened this issue Aug 29, 2022 · 1 comment
Labels
bug 🐛 An issue with the system

Comments

@brian-skafte
Copy link

brian-skafte commented Aug 29, 2022

Found a bug? Maybe our Slack Community can help.

Slack Community

Describe the Bug

When setting enabled to false, terraform errors out, due to data source is referenced in locals, but it disabled a few lines below.

Expected Behavior

Ability to disable the module, without errors appearing when doing terraform plan & apply

Steps to Reproduce

Steps to reproduce the behavior:
Set parameter "enabled" to false and do terraform plan

Screenshots

│ Error: Invalid template interpolation value
│
│   on .terraform/modules/aws_transfer_service_sftp/main.tf line 4, in locals:
│    4:   s3_arn_prefix = "arn:${one(data.aws_partition.default[*].partition)}:s3:::"
│     ├────────────────
│     │ data.aws_partition.default is empty tuple
│
│ The expression result is null. Cannot include a null value in a string template.

Environment (please complete the following information):

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

  • OS: Mac OS 12.15.1 or using official docker image hashicorp/terraform:1.2.8
  • Version: Terraform v1.0.1 & Terraform v1.2.8, AWS Provider: v3.71.0
@brian-skafte brian-skafte added the bug 🐛 An issue with the system label Aug 29, 2022
@PLeS207
Copy link

PLeS207 commented Jul 12, 2023

Same issue

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

2 participants