{"action":"opened","issue":{"url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/issues/7022","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/7022/labels{/name}","comments_url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/issues/7022/comments","events_url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/issues/7022/events","html_url":"https://github.com/terraform-providers/terraform-provider-aws/issues/7022","id":395621624,"node_id":"MDU6SXNzdWUzOTU2MjE2MjQ=","number":7022,"title":"Unable to terraform elasticsearch domain within existing vpc","user":{"login":"elizajanus","id":32393963,"node_id":"MDQ6VXNlcjMyMzkzOTYz","avatar_url":"https://avatars0.githubusercontent.com/u/32393963?v=4","gravatar_id":"","url":"https://api.github.com/users/elizajanus","html_url":"https://github.com/elizajanus","followers_url":"https://api.github.com/users/elizajanus/followers","following_url":"https://api.github.com/users/elizajanus/following{/other_user}","gists_url":"https://api.github.com/users/elizajanus/gists{/gist_id}","starred_url":"https://api.github.com/users/elizajanus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elizajanus/subscriptions","organizations_url":"https://api.github.com/users/elizajanus/orgs","repos_url":"https://api.github.com/users/elizajanus/repos","events_url":"https://api.github.com/users/elizajanus/events{/privacy}","received_events_url":"https://api.github.com/users/elizajanus/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2019-01-03T15:47:33Z","updated_at":"2019-01-03T15:47:33Z","closed_at":null,"author_association":"NONE","body":"<!--- 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\r\n<!--- Thank you for keeping this note for the community --->\r\n\r\n### Terraform Version\r\nTerraform v0.11.10\r\n+ provider.aws v1.54.0\r\n\r\n### Affected Resource(s)\r\naws_elasticsearch_domain\r\nvpc_options\r\n\r\n### Terraform Configuration Files\r\n\r\n```\r\nresource \"aws_elasticsearch_domain\" \"elastic_domain\" {\r\n  domain_name           = \"*********-es\"\r\n  elasticsearch_version = \"6.2.4\"\r\n\r\n  cluster_config {\r\n    instance_type = \"r4.large.elasticsearch\"\r\n  }\r\n\r\n  snapshot_options {\r\n    automated_snapshot_start_hour = 23\r\n  }\r\n\r\n  tags = {\r\n    Domain = \"********-ES\"\r\n  }\r\n  \r\n  ebs_options {\r\n    ebs_enabled = true\r\n    volume_type = \"General Purpose (SSD)\"\r\n    volume_size = 10\r\n  }\r\n\r\n  vpc_options {\r\n    vpc_id             = \"${data.terraform_remote_state.production_vpc.production_vpc_id}\"\r\n    subnet_ids         = [\"${data.terraform_remote_state.production_vpc.private_subnet_ids.aws_subnet.1fprivate.id}\"]\r\n    security_group_ids = [\"${data.terraform_remote_state.production_sec.prodinternal}, ${data.terraform_remote_state.production_sec.*********}, ${data.terraform_remote_state.production_sec.********}, ${data.terraform_remote_state.production_sec.natgw}, ${data.terraform_remote_state.production_sec.registry}\"]\r\n  }\r\n\r\n  log_publishing_options {\r\n    cloudwatch_log_group_arn = \"${aws_cloudwatch_log_group.elastic_logs.arn}\"\r\n    log_type                 = \"INDEX_SLOW_LOGS\"\r\n  }\r\n}\r\n```\r\nfull file with sensitive info removed: https://gist.github.com/elizajanus/81bf61f8a0ae2499165b6f0ba6fb2621\r\n\r\n### Debug Output\r\n\r\nhttps://gist.github.com/elizajanus/ed28d432491b519aae3f7175f462a701\r\n\r\n### Expected Behavior\r\nI expect terraform to create an elasticsearch domain within our already existing vpc using the vpc id. \r\n\r\n### Actual Behavior\r\n\r\nIf I specify vpc_options.0.vpc_id, I get the error:\r\nError: aws_elasticsearch_domain.elastic_domain: \"vpc_options.0.vpc_id\": this field cannot be set\r\n\r\nIf I comment out the vpc_id field and use terraform plan, the value of vpc_options.0.vpc_id is <computed>, and we do not want to create a new vpc.\r\n\r\n### Steps to Reproduce\r\n\r\nterraform plan\r\n\r\n### References\r\nN/A\r\nhttps://www.terraform.io/docs/providers/aws/r/elasticsearch_domain.html\r\n"}}
{"actor":{"display_login":"elizajanus"}}