tf_aws_elasticsearch
tf_aws_elasticsearch copied to clipboard
Value of count cannot be computed
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.aws_elasticsearch_domain.es: aws_elasticsearch_domain.es: value of 'count' cannot be computed ` I have set vpc_options and passed in security groups and subnet IDs as follows
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