{"action":"created","issue":{"url":"https://api.github.com/repos/oracle/terraform-provider-oci/issues/300","repository_url":"https://api.github.com/repos/oracle/terraform-provider-oci","labels_url":"https://api.github.com/repos/oracle/terraform-provider-oci/issues/300/labels{/name}","comments_url":"https://api.github.com/repos/oracle/terraform-provider-oci/issues/300/comments","events_url":"https://api.github.com/repos/oracle/terraform-provider-oci/issues/300/events","html_url":"https://github.com/oracle/terraform-provider-oci/issues/300","id":264402915,"number":300,"title":"oci_identity_availability_domains does not support splat syntax","user":{"login":"lhdomenech","id":10566773,"avatar_url":"https://avatars0.githubusercontent.com/u/10566773?v=4","gravatar_id":"","url":"https://api.github.com/users/lhdomenech","html_url":"https://github.com/lhdomenech","followers_url":"https://api.github.com/users/lhdomenech/followers","following_url":"https://api.github.com/users/lhdomenech/following{/other_user}","gists_url":"https://api.github.com/users/lhdomenech/gists{/gist_id}","starred_url":"https://api.github.com/users/lhdomenech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lhdomenech/subscriptions","organizations_url":"https://api.github.com/users/lhdomenech/orgs","repos_url":"https://api.github.com/users/lhdomenech/repos","events_url":"https://api.github.com/users/lhdomenech/events{/privacy}","received_events_url":"https://api.github.com/users/lhdomenech/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-10-10T22:56:17Z","updated_at":"2017-10-12T19:40:49Z","closed_at":null,"author_association":"NONE","body":"### Terraform Version\r\n0.10.7\r\n### OCI Provider Version\r\nterraform-provider-oci 2.0.1\r\n\r\n### Description:\r\noci_identity_availability_domains does not work with splat syntax. \r\n\r\nFor example using:\r\n```\r\n\"${lookup(data.oci_identity_availability_domains.ADs.availability_domains.*.name, count.index)}\"\r\n```\r\n\r\nproduces the error:\r\n```\r\n* oci_core_subnet.test[1]: At column 3, line 1: lookup: argument 1 should be type map, got type string in:\r\n\r\n${lookup(data.oci_identity_availability_domains.ADs.availability_domains.*.name, count.index)}\r\n```\r\n\r\nThis prevent its usage with count. When used with splay syntax, it should be a list but it is of type string instead.\r\n\r\n### Terraform Plan\r\n\r\n```\r\nvariable \"tenancy_ocid\" {}\r\nvariable \"user_ocid\" {}\r\nvariable \"fingerprint\" {}\r\nvariable \"private_key_path\" {}\r\nvariable \"region\" {}\r\nvariable \"private_key_password\" {}\r\nvariable \"compartment_ocid\" {}\r\n\r\nprovider \"oci\" {\r\n  tenancy_ocid = \"${var.tenancy_ocid}\"\r\n  user_ocid = \"${var.user_ocid}\"\r\n  fingerprint = \"${var.fingerprint}\"\r\n  private_key_path = \"${var.private_key_path}\"\r\n  private_key_password = \"${var.private_key_password}\"\r\n  region = \"${var.region}\"\r\n}\r\n\r\ndata \"oci_identity_availability_domains\" \"ADs\" {\r\n  compartment_id = \"${var.compartment_ocid}\"\r\n}\r\n\r\nresource \"oci_core_virtual_network\" \"test\" {\r\n  compartment_id = \"${var.compartment_ocid}\"\r\n\r\n  cidr_block = \"10.0.0.0/16\"\r\n  display_name = \"test\"\r\n}\r\n\r\nresource \"oci_core_subnet\" \"test\" {\r\n  count = 2\r\n\r\n  compartment_id = \"${var.compartment_ocid}\"\r\n\r\n  availability_domain = \"${lookup(data.oci_identity_availability_domains.ADs.availability_domains.*.name, count.index)}\"\r\n  route_table_id = \"${oci_core_virtual_network.test.default_route_table_id}\"\r\n  security_list_ids = [\"${oci_core_virtual_network.test.default_security_list_id}\"]\r\n  vcn_id = \"${oci_core_virtual_network.test.id}\"\r\n  dhcp_options_id = \"${oci_core_virtual_network.test.default_dhcp_options_id}\"\r\n\r\n  display_name = \"test\"\r\n  cidr_block = \"${cidrsubnet(\"10.0.0.0/16\", 8, count.index)}\"\r\n}\r\n```\r\n\r\nplan results:\r\n```\r\nError running plan: 1 error(s) occurred:\r\n\r\n* oci_core_subnet.test: 2 error(s) occurred:\r\n\r\n* oci_core_subnet.test[0]: At column 3, line 1: lookup: argument 1 should be type map, got type string in:\r\n\r\n${lookup(data.oci_identity_availability_domains.ADs.availability_domains.*.name, count.index)}\r\n* oci_core_subnet.test[1]: At column 3, line 1: lookup: argument 1 should be type map, got type string in:\r\n\r\n${lookup(data.oci_identity_availability_domains.ADs.availability_domains.*.name, count.index)}\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/oracle/terraform-provider-oci/issues/comments/336244230","html_url":"https://github.com/oracle/terraform-provider-oci/issues/300#issuecomment-336244230","issue_url":"https://api.github.com/repos/oracle/terraform-provider-oci/issues/300","id":336244230,"user":{"login":"alapidas","id":2326611,"avatar_url":"https://avatars3.githubusercontent.com/u/2326611?v=4","gravatar_id":"","url":"https://api.github.com/users/alapidas","html_url":"https://github.com/alapidas","followers_url":"https://api.github.com/users/alapidas/followers","following_url":"https://api.github.com/users/alapidas/following{/other_user}","gists_url":"https://api.github.com/users/alapidas/gists{/gist_id}","starred_url":"https://api.github.com/users/alapidas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alapidas/subscriptions","organizations_url":"https://api.github.com/users/alapidas/orgs","repos_url":"https://api.github.com/users/alapidas/repos","events_url":"https://api.github.com/users/alapidas/events{/privacy}","received_events_url":"https://api.github.com/users/alapidas/received_events","type":"User","site_admin":false},"created_at":"2017-10-12T19:40:49Z","updated_at":"2017-10-12T19:40:49Z","author_association":"MEMBER","body":"The same behavior can be seen with compartments datasource.  In my particular use case, I want to make a map of compartment OCID to name via zipmap, but since splat doesn't work, I can't do it."}}
{"actor":{"display_login":"alapidas"}}