{"action":"opened","issue":{"url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/issues/1124","repository_url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws","labels_url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/issues/1124/labels{/name}","comments_url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/issues/1124/comments","events_url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/issues/1124/events","html_url":"https://github.com/terraform-providers/terraform-provider-aws/issues/1124","id":242156428,"number":1124,"title":"CloudFront doesn't pick up changes in Lambda version","user":{"login":"jsonmaur","id":911274,"avatar_url":"https://avatars2.githubusercontent.com/u/911274?v=3","gravatar_id":"","url":"https://api.github.com/users/jsonmaur","html_url":"https://github.com/jsonmaur","followers_url":"https://api.github.com/users/jsonmaur/followers","following_url":"https://api.github.com/users/jsonmaur/following{/other_user}","gists_url":"https://api.github.com/users/jsonmaur/gists{/gist_id}","starred_url":"https://api.github.com/users/jsonmaur/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsonmaur/subscriptions","organizations_url":"https://api.github.com/users/jsonmaur/orgs","repos_url":"https://api.github.com/users/jsonmaur/repos","events_url":"https://api.github.com/users/jsonmaur/events{/privacy}","received_events_url":"https://api.github.com/users/jsonmaur/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-07-11T19:23:00Z","updated_at":"2017-07-11T19:23:00Z","closed_at":null,"body":"### Terraform Version\r\nv0.9.11\r\n\r\n### Affected Resource(s)\r\n- aws_lambda_function\r\n- aws_cloudfront_distribution\r\n\r\n### Terraform Configuration Files\r\n```hcl\r\nresource \"aws_lambda_function\" \"main\" {\r\n  filename = \"${data.archive_file.main.output_path}\"\r\n  source_code_hash = \"${data.archive_file.main.output_base64sha256}\"\r\n  publish = true\r\n  # ...\r\n}\r\n\r\nresource \"aws_cloudfront_distribution\" \"main\" {\r\n  default_cache_behavior {\r\n    # ...\r\n    lambda_function_association {\r\n      event_type = \"origin-request\"\r\n      lambda_arn = \"${aws_lambda_function.main.qualified_arn}\"\r\n    }\r\n  }\r\n  # ...\r\n}\r\n```\r\n\r\n### Expected Behavior\r\nAny updates to the function source code should update the lambda function (and increment the version), then apply the new version to the CloudFront distribution.\r\n\r\n### Actual Behavior\r\nIt only updates the function during the first apply. You have to run `terraform apply` again to update the CF distro with the new function version.\r\n\r\n### Steps to Reproduce\r\nRun `terraform apply` twice.\r\n"}}
{"actor":{"display_login":"jsonmaur"}}