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

[crash] Bug using variable with 'any' type #24652

Closed
fernando1989mg opened this issue Apr 13, 2020 · 4 comments
Closed

[crash] Bug using variable with 'any' type #24652

fernando1989mg opened this issue Apr 13, 2020 · 4 comments

Comments

@fernando1989mg
Copy link

fernando1989mg commented Apr 13, 2020

crash.log

Terraform Version

Terraform v0.12.24
+ provider.aws v2.54.0
+ provider.local v1.4.0
+ provider.template v2.1.2

Terraform Configuration Files

/*in variables.tf*/
variable "rules" {
  type = map(object({
    listener_key = string,
    priority = number,
    tg_key = string,
    path_pattern = list(string),
    filter_ip = list(string),
    http_header = any
  }))
}

/*in provider.tf, the module declaration....*/
      ruleTwilioLogger = {
          listener_key = "listener_https",
          priority = 9
          tg_key = "tgTwilioLogs"
          path_pattern = ["/twilio-logger/*"]
          filter_ip = null
          http_header = {http_header_name = "ApiGatewayAuth", values = ["Asf1234$.@"]}
      },
      ruleScheduling = {
          listener_key = "listener_https",
          priority = 10
          tg_key = "tgScheduling"
          path_pattern = ["/scheduling/*"]
          filter_ip = null
          http_header = []
      },

/*in main.tf, the module code....*/
  dynamic "condition" {
    for_each = each.value.http_header
    content {
        http_header {
          http_header_name = condition.value["http_header_name"]
          values           = condition.value["values"]
        }
    }
  }

Debug Output

Crash Output

https://raw.githubusercontent.com/fernando1989mg/uploadsPublics/master/crash.log

Expected Behavior

I understand that the type of variable any should accept any value, so that should happen, that accept the values provided

Actual Behavior

!!!!!!!!!!!!!!!!!!!!!!!!!!! TERRAFORM CRASH !!!!!!!!!!!!!!!!!!!!!!!!!!!!

Terraform crashed! This is always indicative of a bug within Terraform.
A crash log has been placed at "crash.log" relative to your current
working directory. It would be immensely helpful if you could please
report the crash with Terraform1 so that we can fix this.

When reporting bugs, please include your terraform version. That
information is available on the first line of crash.log. You can also
get it by running 'terraform --version' on the command line.

SECURITY WARNING: the "crash.log" file that was created may contain
sensitive information that must be redacted before it is safe to share
on the issue tracker.

!!!!!!!!!!!!!!!!!!!!!!!!!!! TERRAFORM CRASH !!!!!!!!!!!!!!!!!!!!!!!!!!!!

Steps to Reproduce

Additional Context

References

@fernando1989mg fernando1989mg changed the title Bug using variable with 'any' type [crash] Bug using variable with 'any' type Apr 13, 2020
@danieldreier
Copy link
Contributor

Hi @fernando1989mg! Thanks for reporting this. This looks like a valid issue report. Based on the context you've provided, I have some clues about what might be causing it, but not quite enough of a reproduction case to just run locally and reproduce the crash.

If you can, it would really help if you could provide a minimal full example, for example in a tiny github repository, that I could clone and run locally. Ideally, this would use the null resource to reduce test dependencies. Is that something you can help add in?

@danieldreier danieldreier added the waiting-response An issue/pull request is waiting for a response from the community label Apr 13, 2020
@techdragon
Copy link

Not the original poster, but this appears to be similar if not the same as #23508 and #24801

@ghost ghost removed the waiting-response An issue/pull request is waiting for a response from the community label May 6, 2020
@jbardin
Copy link
Member

jbardin commented May 13, 2020

Thanks @techdragon, we can track this in #24801

@jbardin jbardin closed this as completed May 13, 2020
@ghost
Copy link

ghost commented Jun 13, 2020

I'm going to lock this issue 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 similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Jun 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants