{"action":"created","issue":{"url":"https://api.github.com/repos/hashicorp/terraform/issues/3121","labels_url":"https://api.github.com/repos/hashicorp/terraform/issues/3121/labels{/name}","comments_url":"https://api.github.com/repos/hashicorp/terraform/issues/3121/comments","events_url":"https://api.github.com/repos/hashicorp/terraform/issues/3121/events","html_url":"https://github.com/hashicorp/terraform/issues/3121","id":103867697,"number":3121,"title":"AWS: Elasticache Redis snapshot_arns cannot be blank","user":{"login":"jonhatalla","id":2230183,"avatar_url":"https://avatars.githubusercontent.com/u/2230183?v=3","gravatar_id":"","url":"https://api.github.com/users/jonhatalla","html_url":"https://github.com/jonhatalla","followers_url":"https://api.github.com/users/jonhatalla/followers","following_url":"https://api.github.com/users/jonhatalla/following{/other_user}","gists_url":"https://api.github.com/users/jonhatalla/gists{/gist_id}","starred_url":"https://api.github.com/users/jonhatalla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonhatalla/subscriptions","organizations_url":"https://api.github.com/users/jonhatalla/orgs","repos_url":"https://api.github.com/users/jonhatalla/repos","events_url":"https://api.github.com/users/jonhatalla/events{/privacy}","received_events_url":"https://api.github.com/users/jonhatalla/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/hashicorp/terraform/labels/bug","name":"bug","color":"f7c6c7"},{"url":"https://api.github.com/repos/hashicorp/terraform/labels/provider/aws","name":"provider/aws","color":"bfdadc"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-08-29T18:07:33Z","updated_at":"2015-12-04T14:48:47Z","closed_at":null,"body":"This is not a terraform issue, as AWS will not let the `snapshot_arns` param be blank.\r\n\r\nHowever, for certain environments, we have parameters that will preload redis with a snapshot.  For other environments, we would like an empty redis instance.  \r\n\r\nA couple of possible solutions:\r\n1. If `snapshot_arns` is empty, don't send the parameter\r\n2. Wrap the `snapshot_arns = [\"snapshot_id\"]` line in a conditional statement (i know there are a ton of threads already created on conditionals)\r\n\r\nMy workaround in code is to create 2 blocks for elasticache redis and two route 53 endpoints.  I created a couple of flags which set the count to 1 or 0 depending on what option the environment variables passed in needs.\r\n\r\nThere is a lot of tooling around this in my code now, but wanted to throw this out there as others might run into this. \r\n\r\n "},"comment":{"url":"https://api.github.com/repos/hashicorp/terraform/issues/comments/161984340","html_url":"https://github.com/hashicorp/terraform/issues/3121#issuecomment-161984340","issue_url":"https://api.github.com/repos/hashicorp/terraform/issues/3121","id":161984340,"user":{"login":"nTraum","id":866318,"avatar_url":"https://avatars.githubusercontent.com/u/866318?v=3","gravatar_id":"","url":"https://api.github.com/users/nTraum","html_url":"https://github.com/nTraum","followers_url":"https://api.github.com/users/nTraum/followers","following_url":"https://api.github.com/users/nTraum/following{/other_user}","gists_url":"https://api.github.com/users/nTraum/gists{/gist_id}","starred_url":"https://api.github.com/users/nTraum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nTraum/subscriptions","organizations_url":"https://api.github.com/users/nTraum/orgs","repos_url":"https://api.github.com/users/nTraum/repos","events_url":"https://api.github.com/users/nTraum/events{/privacy}","received_events_url":"https://api.github.com/users/nTraum/received_events","type":"User","site_admin":false},"created_at":"2015-12-04T14:48:47Z","updated_at":"2015-12-04T14:48:47Z","body":"Stumbled upon the same issue. If you are looking for a workaround until this is fixed:\r\n\r\nExtract the value for the `snapshot_arns` parameter into a variable and let it default to an empty dump file (that you upload to S3). This is ugly, but works for us:\r\n\r\n```tf\r\nvariable \"snapshot_arns\" {\r\n  description = \"foo bar\"\r\n  default     = \"arn:aws:s3:::redis-dumps/empty-dump.rdb\"\r\n}\r\n```\r\nYou still need to use the `split` magic to create an array out of the string (terraform 0.6.8)."}}