{"action":"closed","issue":{"url":"https://api.github.com/repos/terraform-providers/terraform-provider-google/issues/3113","repository_url":"https://api.github.com/repos/terraform-providers/terraform-provider-google","labels_url":"https://api.github.com/repos/terraform-providers/terraform-provider-google/issues/3113/labels{/name}","comments_url":"https://api.github.com/repos/terraform-providers/terraform-provider-google/issues/3113/comments","events_url":"https://api.github.com/repos/terraform-providers/terraform-provider-google/issues/3113/events","html_url":"https://github.com/terraform-providers/terraform-provider-google/issues/3113","id":414031350,"node_id":"MDU6SXNzdWU0MTQwMzEzNTA=","number":3113,"title":"The google_compute_url_map fails with '\"path_matcher.0.name\": required field is not set or 'path_matcher: should be a list'","user":{"login":"movergan","id":37698960,"node_id":"MDQ6VXNlcjM3Njk4OTYw","avatar_url":"https://avatars0.githubusercontent.com/u/37698960?v=4","gravatar_id":"","url":"https://api.github.com/users/movergan","html_url":"https://github.com/movergan","followers_url":"https://api.github.com/users/movergan/followers","following_url":"https://api.github.com/users/movergan/following{/other_user}","gists_url":"https://api.github.com/users/movergan/gists{/gist_id}","starred_url":"https://api.github.com/users/movergan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/movergan/subscriptions","organizations_url":"https://api.github.com/users/movergan/orgs","repos_url":"https://api.github.com/users/movergan/repos","events_url":"https://api.github.com/users/movergan/events{/privacy}","received_events_url":"https://api.github.com/users/movergan/received_events","type":"User","site_admin":false},"labels":[{"id":620326519,"node_id":"MDU6TGFiZWw2MjAzMjY1MTk=","url":"https://api.github.com/repos/terraform-providers/terraform-provider-google/labels/bug","name":"bug","color":"f7c6c7","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2019-02-25T10:20:17Z","updated_at":"2019-02-27T22:13:30Z","closed_at":"2019-02-27T22:13:30Z","author_association":"NONE","body":"<!--- Please leave this line, it helps our automation: [issue-type:bug-report] --->\r\n<!--- Please keep this note for the community --->\r\n\r\n### Community Note\r\n\r\n* Please vote on this issue by adding a 👍 [reaction](https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) to the original issue to help the community and maintainers prioritize this request\r\n* Please do not leave \"+1\" or \"me too\" comments, they generate extra noise for issue followers and do not help prioritize the request\r\n* If you are interested in working on this issue or have submitted a pull request, please leave a comment\r\n* If an issue is assigned to the \"modular-magician\" user, it is either in the process of being autogenerated, or is planned to be autogenerated soon. If an issue is assigned to a user, that user is claiming responsibility for the issue. If an issue is assigned to \"hashibot\", a community member has claimed the issue already.\r\n\r\n<!--- Thank you for keeping this note for the community --->\r\n\r\n### Terraform Version\r\n\r\nTerraform v0.11.11\r\n+ provider.google v2.0.0\r\n+ provider.null v2.0.0\r\n\r\n### Affected Resource(s)\r\n\r\n\"google_compute_url_map\"\r\n\r\n### Terraform Configuration Files\r\n\r\n```tf\r\nresource \"null_resource\" \"path_matcher\" {\r\n  count = \"${length(var.host_rule)}\"\r\n  triggers {\r\n    name = \"${lookup(var.host_rule[count.index], \"path_matcher\")}\"\r\n    default_service = \"${module.gce-lb-https.backend_services[count.index]}\"\r\n  }\r\n\r\n}\r\n\r\nresource \"google_compute_url_map\" \"url-map\" {\r\n  // note that this is the name of the load balancer\r\n  name            = \"${var.name}\"\r\n  default_service = \"${module.gce-lb-https.backend_services[0]}\"\r\n\r\n\r\n  host_rule = \"${var.host_rule}\"\r\n\r\n  path_matcher = \"${null_resource.path_matcher.*.triggers}\"\r\n\r\n}\r\n```\r\n\r\nstate for the Null resource is:\r\n```\r\n                \"null_resource.path_matcher.0\": {\r\n                    \"type\": \"null_resource\",\r\n                    \"depends_on\": [\r\n                        \"module.gce-lb-https\"\r\n                    ],\r\n                    \"primary\": {\r\n                        \"id\": \"8829969477972640304\",\r\n                        \"attributes\": {\r\n                            \"id\": \"8829969477972640304\",\r\n                            \"triggers.%\": \"2\",\r\n                            \"triggers.default_service\": \"https://www.googleapis.com/compute/v1/projects/project-name/global/backendServices/d001-loadbalancer-backend-0\",\r\n                            \"triggers.name\": \"backend-0\"\r\n                        },\r\n                        \"meta\": {},\r\n                        \"tainted\": false\r\n                    },\r\n                    \"deposed\": [],\r\n                    \"provider\": \"provider.null\"\r\n                },\r\n                \"null_resource.path_matcher.1\": {\r\n                    \"type\": \"null_resource\",\r\n                    \"depends_on\": [\r\n                        \"module.gce-lb-https\"\r\n                    ],\r\n                    \"primary\": {\r\n                        \"id\": \"6616983559536597915\",\r\n                        \"attributes\": {\r\n                            \"id\": \"6616983559536597915\",\r\n                            \"triggers.%\": \"2\",\r\n                            \"triggers.default_service\": \"https://www.googleapis.com/compute/v1/projects/project-name/global/backendServices/d001-loadbalancer-backend-1\",\r\n                            \"triggers.name\": \"backend-1\"\r\n                        },\r\n                        \"meta\": {},\r\n                        \"tainted\": false\r\n                    },\r\n                    \"deposed\": [],\r\n                    \"provider\": \"provider.null\"\r\n                }\r\n```\r\n\r\n### Expected Behavior\r\n\r\npath_matcher should not fail when list is given.\r\n\r\n### Actual Behavior\r\nWith:\r\n```tf\r\npath_matcher = \"${null_resource.path_matcher.*.triggers}\"\r\n```\r\nThe error:\r\n```\r\nError: module.d001-loadbalancer.google_compute_url_map.url-map: path_matcher: should be a list\r\n```\r\n\r\nWith known W/A:\r\n```\r\npath_matcher = [\"${null_resource.path_matcher.*.triggers}\"]\r\n```\r\n\r\nThe error is:\r\n```\r\nError: module.d001-loadbalancer.google_compute_url_map.url-map: \"path_matcher.0.default_service\": required field is not set\r\n\r\nError: module.d001-loadbalancer.google_compute_url_map.url-map: \"path_matcher.0.name\": required field is not set\r\n```\r\n### Steps to Reproduce\r\n\r\n1. With the configuration above run `terraform plan`\r\n\r\n### Important Factoids\r\nI am trying to build a TF module based on Google LB module, In order to do that I need to generate path_matcher dynamically. I am trying to use null_resource as a workaround here. \r\n### References\r\n\r\n<!---\r\nInformation about referencing Github Issues: https://help.github.com/articles/basic-writing-and-formatting-syntax/#referencing-issues-and-pull-requests\r\n\r\nAre there any other GitHub issues (open or closed) or pull requests that should be linked here? Vendor documentation? For example:\r\n--->\r\n\r\n* #0000\r\n"}}
{"actor":{"display_login":"ndmckinley"}}