{"action":"created","issue":{"url":"https://api.github.com/repos/hashicorp/terraform/issues/5471","repository_url":"https://api.github.com/repos/hashicorp/terraform","labels_url":"https://api.github.com/repos/hashicorp/terraform/issues/5471/labels{/name}","comments_url":"https://api.github.com/repos/hashicorp/terraform/issues/5471/comments","events_url":"https://api.github.com/repos/hashicorp/terraform/issues/5471/events","html_url":"https://github.com/hashicorp/terraform/issues/5471","id":138781781,"number":5471,"title":"How to set undefined value","user":{"login":"joshuaspence","id":234676,"avatar_url":"https://avatars3.githubusercontent.com/u/234676?v=4","gravatar_id":"","url":"https://api.github.com/users/joshuaspence","html_url":"https://github.com/joshuaspence","followers_url":"https://api.github.com/users/joshuaspence/followers","following_url":"https://api.github.com/users/joshuaspence/following{/other_user}","gists_url":"https://api.github.com/users/joshuaspence/gists{/gist_id}","starred_url":"https://api.github.com/users/joshuaspence/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshuaspence/subscriptions","organizations_url":"https://api.github.com/users/joshuaspence/orgs","repos_url":"https://api.github.com/users/joshuaspence/repos","events_url":"https://api.github.com/users/joshuaspence/events{/privacy}","received_events_url":"https://api.github.com/users/joshuaspence/received_events","type":"User","site_admin":false},"labels":[{"id":127939292,"url":"https://api.github.com/repos/hashicorp/terraform/labels/core","name":"core","color":"cccccc","default":false},{"id":85946961,"url":"https://api.github.com/repos/hashicorp/terraform/labels/question","name":"question","color":"cc317c","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":19,"created_at":"2016-03-06T10:57:48Z","updated_at":"2018-03-09T16:00:08Z","closed_at":"2016-12-04T00:23:13Z","author_association":"CONTRIBUTOR","body":"I am writing a module for creating EC2 instances. We have a lot of duplication between our EC2 instance configuration (tags, user data, common security groups, etc) and creating a module eliminates code duplication. I am not sure, however, how to set a value to be undefined. For example, suppose that my module looked like this:\n\n```\nvariable \"availability_zone\" {\n  type = \"string\"\n  default = \"\"\n}\n\nresource \"aws_instance\" \"instance\" {\n  availability_zone = \"${var.availability_zone}\"\n}\n```\n\nMy question here is what is the correct default value for the `availability_zone` variable such that it is essential an optional parameter? Empty string seems to work in some cases, but I'm not sure if this would work in all cases? Basically I am looking for the Terraform equivalent of puppet's `undef`.\n"},"comment":{"url":"https://api.github.com/repos/hashicorp/terraform/issues/comments/371854641","html_url":"https://github.com/hashicorp/terraform/issues/5471#issuecomment-371854641","issue_url":"https://api.github.com/repos/hashicorp/terraform/issues/5471","id":371854641,"user":{"login":"abferm","id":3749715,"avatar_url":"https://avatars3.githubusercontent.com/u/3749715?v=4","gravatar_id":"","url":"https://api.github.com/users/abferm","html_url":"https://github.com/abferm","followers_url":"https://api.github.com/users/abferm/followers","following_url":"https://api.github.com/users/abferm/following{/other_user}","gists_url":"https://api.github.com/users/abferm/gists{/gist_id}","starred_url":"https://api.github.com/users/abferm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abferm/subscriptions","organizations_url":"https://api.github.com/users/abferm/orgs","repos_url":"https://api.github.com/users/abferm/repos","events_url":"https://api.github.com/users/abferm/events{/privacy}","received_events_url":"https://api.github.com/users/abferm/received_events","type":"User","site_admin":false},"created_at":"2018-03-09T16:00:08Z","updated_at":"2018-03-09T16:00:08Z","author_association":"NONE","body":"I have a module to create an AWS LB target group, listener rule, and dns record and found this issue because I was trying to make listener_rule_priority optional. I really don't want to make two different \"resources\" and use some messy \"count\" options to switch which one is created."}}
{"actor":{"display_login":"abferm"}}