{"action":"created","issue":{"url":"https://api.github.com/repos/hashicorp/terraform/issues/7883","repository_url":"https://api.github.com/repos/hashicorp/terraform","labels_url":"https://api.github.com/repos/hashicorp/terraform/issues/7883/labels{/name}","comments_url":"https://api.github.com/repos/hashicorp/terraform/issues/7883/comments","events_url":"https://api.github.com/repos/hashicorp/terraform/issues/7883/events","html_url":"https://github.com/hashicorp/terraform/pull/7883","id":168449939,"number":7883,"title":"Fix S3 provider redirect_all_requests_to behavior. #5142","user":{"login":"jbiel","id":961717,"avatar_url":"https://avatars.githubusercontent.com/u/961717?v=3","gravatar_id":"","url":"https://api.github.com/users/jbiel","html_url":"https://github.com/jbiel","followers_url":"https://api.github.com/users/jbiel/followers","following_url":"https://api.github.com/users/jbiel/following{/other_user}","gists_url":"https://api.github.com/users/jbiel/gists{/gist_id}","starred_url":"https://api.github.com/users/jbiel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbiel/subscriptions","organizations_url":"https://api.github.com/users/jbiel/orgs","repos_url":"https://api.github.com/users/jbiel/repos","events_url":"https://api.github.com/users/jbiel/events{/privacy}","received_events_url":"https://api.github.com/users/jbiel/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,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-07-30T05:11:15Z","updated_at":"2016-08-07T07:16:28Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/hashicorp/terraform/pulls/7883","html_url":"https://github.com/hashicorp/terraform/pull/7883","diff_url":"https://github.com/hashicorp/terraform/pull/7883.diff","patch_url":"https://github.com/hashicorp/terraform/pull/7883.patch"},"body":"The S3 API has two parameters that can be passed to it (HostName\r\nand Protocol) for the RedirectAllRequestsTo functionality.\r\nHostName is somewhat poorly named because it need not be only a\r\nhostname (it can contain a path too.)\r\n\r\nThe terraform code for this was treating the API as the parameter\r\nname suggests and was truncating out any paths that were passed."},"comment":{"url":"https://api.github.com/repos/hashicorp/terraform/issues/comments/238067913","html_url":"https://github.com/hashicorp/terraform/pull/7883#issuecomment-238067913","issue_url":"https://api.github.com/repos/hashicorp/terraform/issues/7883","id":238067913,"user":{"login":"stack72","id":227823,"avatar_url":"https://avatars.githubusercontent.com/u/227823?v=3","gravatar_id":"","url":"https://api.github.com/users/stack72","html_url":"https://github.com/stack72","followers_url":"https://api.github.com/users/stack72/followers","following_url":"https://api.github.com/users/stack72/following{/other_user}","gists_url":"https://api.github.com/users/stack72/gists{/gist_id}","starred_url":"https://api.github.com/users/stack72/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stack72/subscriptions","organizations_url":"https://api.github.com/users/stack72/orgs","repos_url":"https://api.github.com/users/stack72/repos","events_url":"https://api.github.com/users/stack72/events{/privacy}","received_events_url":"https://api.github.com/users/stack72/received_events","type":"User","site_admin":false},"created_at":"2016-08-07T07:16:28Z","updated_at":"2016-08-07T07:16:28Z","body":"Hi @jbiel \r\n\r\nThanks so much for the work on this PR - this LGTM!\r\n\r\nPre this fix, I ran your config and was getting this:\r\n\r\n```\r\n~ aws_s3_bucket.bucket\r\n    website.0.redirect_all_requests_to: \"https://www.foo.com\" => \"https://www.foo.com/bar\"\r\n```\r\n\r\nPost fix:\r\n\r\n```\r\n% terraform plan\r\n[WARN] /Users/stacko/Code/go/bin/terraform-provider-aws overrides an internal plugin for aws-provider.\r\n  If you did not expect to see this message you will need to remove the old plugin.\r\n  See https://www.terraform.io/docs/internals/internal-plugins.html\r\nprovider.aws.region\r\n  The region where AWS operations will take place. Examples\r\n  are us-east-1, us-west-2, etc.\r\n\r\n  Default: us-east-1\r\n  Enter a value: us-west-2\r\n\r\nRefreshing Terraform state in-memory prior to plan...\r\nThe refreshed state will be used to calculate this plan, but\r\nwill not be persisted to local or remote state storage.\r\n\r\naws_s3_bucket.bucket: Refreshing state... (ID: foo-5142)\r\n\r\nNo changes. Infrastructure is up-to-date. This means that Terraform\r\ncould not detect any differences between your configuration and\r\nthe real physical resources that exist. As a result, Terraform\r\ndoesn't need to do anything.\r\n```\r\n\r\nThe tests also look good :)\r\n\r\n```\r\n% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSS3Bucket_'                                               1 ↵\r\n==> Checking that code complies with gofmt requirements...\r\n/Users/stacko/Code/go/bin/stringer\r\ngo generate $(go list ./... | grep -v /terraform/vendor/)\r\n2016/08/07 18:53:45 Generated command/internal_plugin_list.go\r\nTF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSS3Bucket_ -timeout 120m\r\n=== RUN   TestAccAWSS3Bucket_Notification\r\n--- PASS: TestAccAWSS3Bucket_Notification (155.64s)\r\n=== RUN   TestAccAWSS3Bucket_NotificationWithoutFilter\r\n--- PASS: TestAccAWSS3Bucket_NotificationWithoutFilter (66.69s)\r\n=== RUN   TestAccAWSS3Bucket_basic\r\n--- PASS: TestAccAWSS3Bucket_basic (49.63s)\r\n=== RUN   TestAccAWSS3Bucket_acceleration\r\n--- PASS: TestAccAWSS3Bucket_acceleration (90.61s)\r\n=== RUN   TestAccAWSS3Bucket_Policy\r\n--- PASS: TestAccAWSS3Bucket_Policy (119.39s)\r\n=== RUN   TestAccAWSS3Bucket_UpdateAcl\r\n--- PASS: TestAccAWSS3Bucket_UpdateAcl (86.27s)\r\n=== RUN   TestAccAWSS3Bucket_Website_Simple\r\n--- PASS: TestAccAWSS3Bucket_Website_Simple (129.30s)\r\n=== RUN   TestAccAWSS3Bucket_WebsiteRedirect\r\n--- PASS: TestAccAWSS3Bucket_WebsiteRedirect (132.83s)\r\n=== RUN   TestAccAWSS3Bucket_WebsiteRoutingRules\r\n--- PASS: TestAccAWSS3Bucket_WebsiteRoutingRules (95.09s)\r\n=== RUN   TestAccAWSS3Bucket_shouldFailNotFound\r\n--- PASS: TestAccAWSS3Bucket_shouldFailNotFound (33.75s)\r\n=== RUN   TestAccAWSS3Bucket_Versioning\r\n--- PASS: TestAccAWSS3Bucket_Versioning (127.20s)\r\n=== RUN   TestAccAWSS3Bucket_Cors\r\n--- PASS: TestAccAWSS3Bucket_Cors (50.36s)\r\n=== RUN   TestAccAWSS3Bucket_Logging\r\n--- PASS: TestAccAWSS3Bucket_Logging (74.75s)\r\n=== RUN   TestAccAWSS3Bucket_Lifecycle\r\n--- PASS: TestAccAWSS3Bucket_Lifecycle (94.85s)\r\nPASS\r\nok  \tgithub.com/hashicorp/terraform/builtin/providers/aws\t1306.368s\r\n```\r\n\r\nMerging now :)\r\n\r\nPaul"}}
{"actor":{"display_login":"stack72"}}