terraform-community-modules / tf_aws_elasticsearch

[DEPRECATED] Use https://github.com/terraform-aws-modules/terraform-aws-opensearch
MIT License
79 stars 97 forks source link

Value of count cannot be computed #39

Open micmoyles opened 4 years ago

micmoyles commented 4 years ago

Hi,

I am using v0.8.0 of the module with terraform 0.11.7 and trying to launch a simple cluster within my VPC but receive the following error

`* module.elasticsearch_cluster.aws_elasticsearch_domain.es_vpc: aws_elasticsearch_domain.es_vpc: value of 'count' cannot be computed

module "elasticsearch_cluster" { source = "git::https://github.com/terraform-community-modules/tf_aws_elasticsearch.git?ref=v0.8.0" es_version = "7.1" create_iam_service_linked_role = "false" management_iam_roles = ["${aws_iam_role.fluentd_asg.arn}"] vpc_options = { security_group_ids = ["${module.elasticsearch_sg.this_security_group_id}","${module.fluentd_sg.this_security_group_id}"] subnet_ids = ["${module.devops_vpc.private_subnets[0]}"] } instance_count = 3 instance_type = "${var.elasticsearch_node_instance_type}" dedicated_master_type = "${var.elasticsearch_node_instance_type}" es_zone_awareness = false ebs_volume_size = 50 }

I only get the error when I attempt to bring up all my infra at once (ie the VPC doesn't yet exist). When I bring up all my infra except for the elastic cluster and then add the cluster later, it works.

I hope I have provided enough info, please let me know if not. Mike