diff --git a/example/main.tf b/example/main.tf new file mode 100644 index 0000000..3587f96 --- /dev/null +++ b/example/main.tf @@ -0,0 +1,49 @@ +# Configure the AWS Provider +provider "aws" { + version = "~> 2.0" + region = "eu-central-1" +} + +data "aws_vpc" "default" { + default = true +} + +data "aws_subnet_ids" "default" { + vpc_id = "${data.aws_vpc.default.id}" +} + +data "aws_subnet" "default" { + count = "${length(data.aws_subnet_ids.default.ids)}" + id = "${tolist(data.aws_subnet_ids.default.ids)[count.index]}" +} + +data "aws_route53_zone" "selected" { + name = "qndesign.studio" +} + +module "es-cluster" { + source = "../" + + name = "example" + vpc_id = "${data.aws_vpc.default.id}" + subnet_ids = "${tolist(data.aws_subnet_ids.default.ids)}" + zone_id = "${data.aws_route53_zone.selected.zone_id}" + itype = "m4.large.elasticsearch" + ingress_allow_cidr_blocks = "${tolist(data.aws_subnet.default.*.cidr_block)}" + access_policies = <